Personal tools

switchvox.outgoingCallerIdRules.search

From SwitchvoxExtendAPI

Revision as of 17:50, 3 June 2011 by Dblood (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Description

Returns information for outgoing caller id rules based on search criteria.

Arguments

See the Constructing Requests page to learn how to use arguments in requests.
Name Required Type Default Description
extension optional integer Expecting a 3 digit number.
outgoing_call_rule_id optional integer ID of an existing outgoing call rule.
caller_id_name optional string Name associated with an existing caller id rule.
caller_id_number optional string Number associated with an existing caller id rule.

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.search">
    <parameters>
        <extension>901</extension>
        <outgoing_call_rule_id>133</outgoing_call_rule_id>
        <caller_id_name>Mike</caller_id_name>
        <caller_id_number>5324454</caller_id_number>
    </parameters>
</request>

Response

<response method="switchvox.outgoingCallerIdRules.search">
	<result>
		<outgoing_caller_id_rules total_items="1">
			<outgoing_caller_id_rule id="60" title="Single Group Updated" priority="1" rule_type="single" caller_id_name="Jane" caller_id_number="52654645" extension_min="0" extension_max="0" caller_id_number_add="0" caller_id_number_prepend="" description="Single Group Description">
				<extension number="" status="" can_dial_from_ivr="" account_id="" display="" date_created="" type="" type_display="" />
				<extension_group id="1001" name="Group A" date_created="2010-06-28 14:11:59" vm_quota="100" member_count="2" />
				<outgoing_call_rule id="210" priority="3" is_final="1" name="Blue Rule" description="Blue Rule Description" pattern_begin="321" pattern_min="4" pattern_max="5" pattern_trim="3" pattern_prepend="34" >  
		    			<call_through>
		        			<channel_group id="1" name="Group 1" />
		    			</call_through>
					<failovers>
		                            	<failover>
		                                    	<sip_provider id="104" name="SIP 2" />
		                                    	<priority>"1"</priority>
		                		</failover>
		                    	</failovers>
				</outgoing_call_rule>
			</outgoing_caller_id_rule>
		</outgoing_caller_id_rules>
	</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
57982 Invalid Extension