java - Whom is a twilio call from? -
for call made through api, how connect sip uri have on file twilio? whom, exactly, call "from"?
call sid ca4759gfrjklg45jfgklj54klfsgjf0073a date 10:55:04 utc 2016-07-06 start time 10:55:04 utc 2016-07-06 end time 10:55:19 utc 2016-07-06 duration 15 secs cost $0.015 (202) 456-1111 direction outgoing api secure trunking disabled status completed
i appreciate recorded message outgoing calls work, if don't? suppose have pony $ test outbound capability?
if indeed making sip calls via rest api, to
parameter sip uri want connect , from
value used populate username portion of from
header passed sip endpoint. may alphanumeric character, plus, minus, underscore, , period characters (+-_.). no spaces or other characters allowed.
an example create basic sip dial in java:
// install java helper library twilio.com/docs/java/install import com.twilio.sdk.twiliorestclient; import com.twilio.sdk.twiliorestexception; import com.twilio.sdk.resource.factory.callfactory; import com.twilio.sdk.resource.instance.call; import com.twilio.sdk.resource.list.calllist; import java.util.arraylist; import java.util.list; import org.apache.http.namevaluepair; import org.apache.http.message.basicnamevaluepair; public class example { // find account sid , token @ twilio.com/user/account public static final string account_sid = "acxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; public static final string auth_token = "your_auth_token"; public static void main(string[] args) throws twiliorestexception { twiliorestclient client = new twiliorestclient(account_sid, auth_token); // build filter calllist list<namevaluepair> params = new arraylist<namevaluepair>(); params.add(new basicnamevaluepair("url", "http://www.example.com/sipdial.xml")); params.add(new basicnamevaluepair("to", "sip:kate@example.com")); params.add(new basicnamevaluepair("from", "jack")); callfactory callfactory = client.getaccount().getcallfactory(); call call = callfactory.create(params); system.out.println(call.getsid()); } }
not sure trouble you're experiencing here, i'm happy offer more if it's needed.
Comments
Post a Comment