<div dir="ltr">Hi Dan,<div><br></div><div>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.</div><div><a href="https://blogs.asterisk.org/2020/07/22/ari-create-channel-with-variables/">https://blogs.asterisk.org/2020/07/22/ari-create-channel-with-variables/</a></div><div>BR</div><div>Jöran</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2020 at 7:06 PM Dan Cropp <<a href="mailto:dan@amtelco.com">dan@amtelco.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-6904083575369514839WordSection1">
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> asterisk-users <<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>>
<b>On Behalf Of </b>Dan Cropp<br>
<b>Sent:</b> Friday, August 7, 2020 11:51 AM<br>
<b>To:</b> '<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>' <<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>><br>
<b>Subject:</b> [asterisk-users] With ARI, is it possible to create (originate) a call and pass both the caller id name and number?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying to transition from AMI to ARI.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Running into a small hiccup when I try to create (originate a call) with the caller id name and number<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I can pass the Name and Number if the name has no spaces in it and it shows up in my PhonerLite application.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">curl -v -u asterisk:asterisk -X POST <a href="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" target="_blank">
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</a>><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">curl -v -u asterisk:asterisk -X POST <a href="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" target="_blank">
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</a> Cropp<291><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Here is an example of how we do this with AMI successfully.<u></u><u></u></p>
<p class="MsoNormal">Action: Originate<u></u><u></u></p>
<p class="MsoNormal">ActionID: S40<u></u><u></u></p>
<p class="MsoNormal">Channel: PJSIP/1003@1003<u></u><u></u></p>
<p class="MsoNormal">Exten: createcall<u></u><u></u></p>
<p class="MsoNormal">Context: IS<u></u><u></u></p>
<p class="MsoNormal">Priority: 1<u></u><u></u></p>
<p class="MsoNormal">Timeout: 60000<u></u><u></u></p>
<p class="MsoNormal">CallerID: Dan Cropp <291><u></u><u></u></p>
<p class="MsoNormal">Variable: CALLERID(num-pres)=allowed_passed_screen,TrunkAllocateId=1,OriginateCallId=2<u></u><u></u></p>
<p class="MsoNormal">Async: true<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Dan<u></u><u></u></p>
</div>
</div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><pre>Jöran Vinzens - <a href="mailto:vinzens@sipgate.de" target="_blank">vinzens@sipgate.de</a><br>Telefon: +49 211-63 55 56-21<br>Telefax: +49 211-63 55 55-22<br><br>sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf<br>HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois<br>Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391<br><br><a href="http://www.sipgate.de" target="_blank">www.sipgate.de</a> - <a href="http://www.sipgate.co.uk" target="_blank">www.sipgate.co.uk</a><br></pre></div></div>