[asterisk-users] With ARI, is it possible to create (originate) a call and pass both the caller id name and number?

Dan Cropp dan at amtelco.com
Mon Aug 10 08:41:43 CDT 2020


Hi Jöran,

Would it be possible to see an example using curl of how you are passing the PAI Header through ARI create?

Dan

From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf Of Jöran Vinzens
Sent: Friday, August 7, 2020 12:10 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] With ARI, is it possible to create (originate) a call and pass both the caller id name and number?

Hi Dan,

as far as PPI and PAI Header, we use the channel Vars in order to do that. In Latest Asterisk you can set Channel vars within the create command in the Body. Just set the PJSIP(add,PAI) as you would do it in Dialplan.
https://blogs.asterisk.org/2020/07/22/ari-create-channel-with-variables/
BR
Jöran

On Fri, Aug 7, 2020 at 7:06 PM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote:
An additional follow-up question, if I need to set the P-Asserted-Identity on the create (originate), is there a way to do this with ARI?

From: asterisk-users <asterisk-users-bounces at lists.digium.com<mailto:asterisk-users-bounces at lists.digium.com>> On Behalf Of Dan Cropp
Sent: Friday, August 7, 2020 11:51 AM
To: 'asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>' <asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com>>
Subject: [asterisk-users] With ARI, is it possible to create (originate) a call and pass both the caller id name and number?

I’m trying to transition from AMI to ARI.

Running into a small hiccup when I try to create (originate a call) with the caller id name and number

I can pass the Name and Number if the name has no spaces in it and it shows up in my PhonerLite application.

curl -v -u asterisk:asterisk -X POST http://asterisk:astersk@localhost:8088/ari/channels/mycallerid.1?endpoint=PJSIP/1003@1003&app=hello-world&extension=1000&context=mycontext&priority=1&channelId=mycallerid.1&formats=ulaw&timeout=30&callerId=Dan<291<http://asterisk:astersk@localhost:8088/ari/channels/mycallerid.1?endpoint=PJSIP/1003@1003&app=hello-world&extension=1000&context=mycontext&priority=1&channelId=mycallerid.1&formats=ulaw&timeout=30&callerId=Dan%3c291>>

However, when the caller id name has a space in it, I can’t figure out how to pass the name and number successfully.  The following only displays asterisk for the number and Dan for the name

curl -v -u asterisk:asterisk -X POST http://asterisk:astersk@localhost:8088/ari/channels/mycallerid.1?endpoint=PJSIP/1003@1003&app=hello-world&extension=1000&context=mycontext&priority=1&channelId=mycallerid.1&formats=ulaw&timeout=30&callerId=Dan Cropp<291>

Here is an example of how we do this with AMI successfully.
Action: Originate
ActionID: S40
Channel: PJSIP/1003 at 1003
Exten: createcall
Context: IS
Priority: 1
Timeout: 60000
CallerID: Dan Cropp <291>
Variable: CALLERID(num-pres)=allowed_passed_screen,TrunkAllocateId=1,OriginateCallId=2
Async: true

Dan
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--

Jöran Vinzens - vinzens at sipgate.de<mailto:vinzens at sipgate.de>
Telefon: +49 211-63 55 56-21
Telefax: +49 211-63 55 55-22

sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

www.sipgate.de<http://www.sipgate.de> - www.sipgate.co.uk<http://www.sipgate.co.uk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200810/ab9ab52e/attachment.html>


More information about the asterisk-users mailing list