Make call
From PokeTALK developers
Contents |
Description
Triggers a callback from the users phone number to a given destination
Usage
ptBase.make_call(to_prefix,to_number,callback);
or
var result = ptBase.make_call(to_prefix,to_number);
Parameters
| Required | Name | Type | Description |
|---|---|---|---|
| required | to_prefix | string | destination country prefix (i.e. "1" for USA, "44" for UK, etc) |
| required | to_number | string | destination phone number without the country prefix |
| optional | callback | function | optional function to callback after execution |
Response
object (JSON)
[{"result":boolean,"code":intiger,"msg":string}]| Parameter | Type | Description |
|---|---|---|
| result | boolean | returns true if call triggered, false if otherwise |
| code | integer | error code |
| msg | string | error/success message |
Example
ptBase.make_call('1','5551234567',function(data){ if (!data.result) { alert(data.msg); } else { alert("Now connecting"); } });

