<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Jöran,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Would it be possible to see an example using curl of how you are passing the PAI Header through ARI create?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> asterisk-users <asterisk-users-bounces@lists.digium.com>
<b>On Behalf Of </b>Jöran Vinzens<br>
<b>Sent:</b> Friday, August 7, 2020 12:10 PM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Subject:</b> Re: [asterisk-users] With ARI, is it possible to create (originate) a call and pass both the caller id name and number?<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Dan,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><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><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">BR<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Jöran<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Aug 7, 2020 at 7:06 PM Dan Cropp <<a href="mailto:dan@amtelco.com">dan@amtelco.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’m trying to transition from AMI to ARI.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Running into a small hiccup when I try to create (originate a call) with the caller id name and number<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I can pass the Name and Number if the name has no spaces in it and it shows up in my PhonerLite application.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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>><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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 <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Here is an example of how we do this with AMI successfully.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Action: Originate<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ActionID: S40<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Channel: PJSIP/1003@1003<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Exten: createcall<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Context: IS<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Priority: 1<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Timeout: 60000<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">CallerID: Dan Cropp <291><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Variable: CALLERID(num-pres)=allowed_passed_screen,TrunkAllocateId=1,OriginateCallId=2<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Async: true<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dan<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">
http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" 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" 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" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<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><o:p></o:p></pre>
</div>
</div>
</div>
</body>
</html>