[asterisk-app-dev] ARI: How do I get the caller ID to set for calls going out through the SIP trunk?

Tickling Contest tickling.contest at gmail.com
Mon Feb 29 14:34:59 CST 2016


Hello,

I am using Asterisk 13.6.0. Consider a caller "Johnny Boy" <100> who is
connected as an endpoint to the Asterisk PBX. I wanted to know how to set
up the caller ID on my ARI originate () REST API so I PSTN callees will see
the caller ID "Johnny Boy" <2125551212> on their screen (where 2125551212
is the DID number granted by the SIP trunk for the PBX).

On extensions.conf, I could use dialplan application Set () and it works
(that is, I see the correct name appearing on the PSTN callee):

exten => 200,1,Answer()
same  =>      n,Set(CALLERID(name)=Johnny Boy)
same  =>      n,Set(CALLERID(num)=2125551212)
same  =>      n,Dial(PJSIP/+18565551212 at siptrunk)
same  =>      n,Hangup()

But when I try something similar using ARI, I call originate() with query
params like so (see
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-originate)
:

?app=sillyARIApp&endpoint=PJSIP%2F%2B18565551212%40siptrunk&appArgs=externalCall

and per
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-originate,
also provide body params like so:

{"variables" : { "CALLERID(name)": "Johnny Boy", "CALLERID(num)":
"2125551212" }}

Unfortunately, this does not work. What am I missing?

Any help is deeply appreciated.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20160229/99fe70da/attachment.html>


More information about the asterisk-app-dev mailing list