PhoneGnome API >> phonegnome.indirectDial
phonegnome.indirectDial
Sets up a an indirect (single stage) dial to a given destination from a specified phone using the specified PhoneGnome account.
The RPC instructs the PhoneGnome system that the user of the PhoneGnome account wishes to dial a specific destination number using a specific phone. The phonegnome.indirectDial XML-RPC causes the PhoneGnome system to prepare an indirect dial. The XML-RPC returns a PSTN number that when called from the number specified, will initiate an outbound call in the context of the PhoneGnome account to the number specified by the phonegnome.indirectDial XML-RPC.
An example use of this RPC is on a Mobile phone, when the user wishes to dial a number using their PhoneGnome account context, the phone could issue the phonegnome.indirectDial XML-RPC providing the source number (the number of associated with the mobile phone) and the destination number. The RPC will return a number. When that number is dialed from the Mobile phone, the call will be connected toan outbound call to destination number specified by the RPC.
URI
All XML-RPC requests should go to the following URI: http://my.phonegnome.com/RPC2
Parameters
- country_code (string): Country code of the PhoneGnome
- phone_number (string): Telephone number of the PhoneGnome placing the call
- md5_pin (string): MD5 hash of the PIN of the PhoneGnome account (PIN is same as that of the my.phonegnome.com dashboard)
- calling_number (string): the number from which the call will be placed (the caller ID of the calling phone)
- number_to_call (string): the number to call, just as it would be dialed from the PhoneGnome
Examples
Example XML-RPC request
<?xml version="1.0"?>
<methodCall>
<methodName>phonegnome.indirectDial</methodName>
<params>
<param>
<value><string>1</string></value>
</param>
<param>
<value><string>3605551212</string></value>
</param>
<param>
<value><string>844dda78e8a09008813020f47215e2a3</string></value>
</param>
<param>
<value><string>6505552244</string></value>
</param>
<param>
<value><string>18005551212</string></value>
</param>
</params>
</methodCall>
Successful Response
<?xml version="1.0"?> <methodResponse> <params> <param> <value><string>14255554462</string></value> </param> </params> </methodResponse>
Error Response
<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultString</name>
<value><string>dial failed</string></value>
</member>
<member>
<name>faultCode</name>
<value><int>600</int></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
