Personal tools

switchvox.outgoingCallerIdRules.add

From SwitchvoxExtendAPI

Jump to: navigation, search

Contents

Description

Creates a new outgoing caller id rule.

Arguments

See the Constructing Requests page to learn how to use arguments in requests.
Name Required Type Default Description
extension optional integer Must be a 3 digit extension which already exists in the system.
outgoing_call_rule_id required integer Call rule ID from and existing call rule.
caller_id_name required string Name of the caller id
caller_id_number required string Number for the caller id
description optional string Description of this caller id rule.
rule_type required string Possible values are "single" and "range"
title required string Name of the Caller Id Rule
priority required integer The priority order for this caller id rule.
extension_group optional integer Group ID for extension group.
extension_min optional integer Lower end of extension range
extension_max optional integer Upper end of extension range
caller_id_number_add optional integer Numbers to be added to caller id
caller_id_number_prepend optional integer Numbers to be prepended to the caller id

Example Requests & Responses

Please see the API Request and Response Format section for more information on various request encodings.

Example One

Request

<?xml version="1.0"?>
<request method="switchvox.outgoingCallerIdRules.add">
    <parameters>
        <rule_type>single</rule_type>
        <title>My New Caller Id Rule</title>
        <priority>1</priority>
        <outgoing_call_rule_id>109</outgoing_call_rule_id>
        <description>description of my new caller id rule</description>
        <extension>800</extension>
        <extension_group></extension_group>
        <caller_id_name>Jane</caller_id_name>
        <caller_id_number>3424232</caller_id_number>
        <extension_min></extension_min>
        <extension_max></extension_max>
        <caller_id_number_add></caller_id_number_add>
        <caller_id_number_prepend></caller_id_number_prepend>
    </parameters>
</request>

Response

<response method="switchvox.outgoingCallerIdRules.add">
	<result>
		<outgoing_cid_rule id="9" />
	</result>
</response>

Error Codes

See the Error Code Formatting section to see the xml structure when an error is returned.
See the Generic Error Codes section to see a list of general fault codes that may be returned.
Code Description
17482 Invalid Outgoing Call Rule
60968 An extension with that number () does not exist.
10000 Invalid extension (). Extension must be between 3 to 3 characters in length.
10000 Invalid extension (). Extensions may only contain digits or *.
53912 Invalid phone number.
80216 Invalid Rule Type
97352 Priority is a required field.