Re: ARI: How do I get the caller ID to set for calls going out through the SIP trunk?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Glad I could help with the number!  Unfortunately, I have no idea about the name.  Sorry.

Phil Mickelson

On Mon, Feb 29, 2016 at 3:56 PM, Tickling Contest <tickling.contest@xxxxxxxxx> wrote:
Thank you for your quick response! It did help. I was trying callerId="SomeURLEncodedName" and it did not work.

This worked: 

appArgs=externalCall&callerId="2125551212"

and it shows the DID number in the PSTN callee @ incoming call time. Thank you!

But this did not work:

appArgs=externalCall&callerId="Johnny Boy <2125551212>"

and neither did the body params based method in my original post above.

On Mon, Feb 29, 2016 at 3:42 PM, Phil Mickelson <phil@xxxxxxxxxxxxxxx> wrote:
I use the Node.js to access ARI but I think it's basically the same.  You'd use the option callerId instead of setting the variables value.  So, it might be something like:

appArgs=externalCall&callerId=2125551212.

I've never tried to set the name, just the number.

Hope this helps.

Phil Mickelson


On Mon, Feb 29, 2016 at 3:34 PM, Tickling Contest <tickling.contest@xxxxxxxxx> wrote:
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@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


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

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

Any help is deeply appreciated.

Thanks!

_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev



_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev



_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux