<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Hi Manish,<br></div>
<div> </div>
<div>First, no need to set nexmo_forwarded_for for outbound here, if you re-read my previous email you'll see that it was meant to be used for Nexmo DIDs you use to direct origination traffic into FS. <br></div>
<div> </div>
<div>As for the error you are getting with this dialplan, you need to remove "@sip.nexmo.com:5080" from your origination string.<br></div>
<div> </div>
<div>Hope it helps,<br></div>
<div> </div>
<div>Aviv<br></div>
<div> </div>
<div> </div>
<div> </div>
<div>On Fri, Nov 7, 2014, at 11:10 PM, Manish Talwar wrote:<br></div>
<blockquote type="cite"><div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;"><p style="margin-bottom: 0px; margin-top: 0px;">Hi,<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">Thanks for your suggestion, I have make these changes and removed the <span class="highlight" style="background-color: rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="size" style="font-size:12.7272720336914px">L16</span></span></span></span>
codec from request now. I have set "absolute_codec_string" and "nexmo_forwarded_for" and its not throwing any error message in SIP trace now.<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">But still, I am not able to make a call on my mobile number "<b>1919818753995</b>". Its show message on FreeSwitch log as
<span class="colour" style="color:rgb(255, 0, 0)">"[RECOVERY_ON_TIMER_EXPIRE]"</span> and hangup the freeswitch call. Also, there is no log created on Nexmo dashboard for this call's.<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">I am sending my call request to Nexmo from FreeSwitch by dialplan as.<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;"><b><extension name="Dial through Nexmo"></b><br> <b> <condition field="destination_number" expression="^19(1\d{10})$"></b><br> <b> <action application="set" data="absolute_codec_string=PCMU,GSM"/></b><br> <b> <action application="set" data="nexmo_forwarded_for=$1"/></b><br> <b> <action application="bridge" data="{origination_caller_id_name='18188535351',ignore_early_media=true}sofia/gateway/nexmo/$1@sip.nexmo.com:5080"/>
</b><br> <b> </condition></b><br> <b> </extension></b></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">Please find the attached SipTrace file now and let me know what I need to update now.<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">In this log, values passed in "From" and "To" attribute as: <b></b><br></p><p style="margin-bottom: 0px; margin-top: 0px;"><b></b><br></p><div><b>From: "18188535351" <sip:b9c280dd@sip.nexmo.com>;tag=D8g4a5NvH4emF</b><br></div>
<div> <b> To: <sip:19818753995@sip.nexmo.com:5080></b><br></div>
<p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">I feel there might be some wrong data passed in "To" attribute and it might expecting mobile number "19818753995" only instead on SIP value. Please suggest about these setting also.<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">Thanks,<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><p style="margin-bottom: 0px; margin-top: 0px;">Regards,<br></p><p style="margin-bottom: 0px; margin-top: 0px;">Manish Talwar<br></p><p style="margin-bottom: 0px; margin-top: 0px;"><br></p><div style="color: rgb(33, 33, 33);"><div><hr tabindex="-1" style="display:inline-block; width:98%"><br></div>
<div dir="ltr"><div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"><b>From:</b> Aviv Shaham <aviv@sent.com></span></span></span><br></div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"> <b>Sent:</b> 07 November 2014 21:48</span></span></span><br></div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"> <b>To:</b> freeswitch-users@lists.freeswitch.org<br> <b>Subject:</b> Re: [Freeswitch-users] SIP trunking with Nexmo</span></span></span></div>
<div> </div>
</div>
<div><div>Hi Manish,<br></div>
<div> </div>
<div>Nexmo doesn't seem to handle it well if your first specified codec is <span class="highlight" style="background-color: rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="size" style="font-size:12.7272720336914px">L16.
Try to set absolute_codec_string to PCMU and see if that helps.</span></span></span></span><br></div>
<div> </div>
<div><span class="highlight" style="background-color: rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="size" style="font-size:12.7272720336914px">Also note that there is no need to
include custom SIP headers such as api_key, api_secret, and answer_url when you make an outbound call.</span></span></span></span><br></div>
<div> </div>
<div><span class="highlight" style="background-color: rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="size" style="font-size:12.7272720336914px">Since you mentioned also needing inbound
- keep in mind that when you use Nexmo's built-in "Forward to SIP" setting for each number in the dashboard, the dialed number will not be passed as a SIP variable and you have no way of knowing it once you receive the SIP invite. One way to get around this
is to have your application buy & update numbers via the Nexmo API and set a custom SIP address per Nexmo DID, for example:
<a href="mailto:nexmo_12121115555@your-server.com">nexmo_12121115555@your-server.com</a> and then have a dialplan such as:</span></span></span></span><br></div>
<div> </div>
<div><extension name="IncomingNexmo"><br></div>
<div> <condition field="destination_number" expression="^nexmo_(\d+)$"><br></div>
<div> <action application="info"/><br></div>
<div> <action application="set" data="nexmo_forwarded_for=$1"/><br></div>
<div> <action application="lua" data="nexmo_handler.lua"/><br></div>
<div> </condition><br></div>
<div></extension><br></div>
<div> </div>
<div><span class="highlight" style="background-color: rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="size" style="font-size:12.7272720336914px">The nexmo_forwarded_for session variable
will now expose to you the dialed Nexmo phone number allowing your application or XML dialplan to use it.</span></span></span></span><br></div>
<div> </div>
<div><span class="highlight" style="background-color: rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="size" style="font-size:12.7272720336914px">Let me know if you are having any
other issues.</span></span></span></span><br></div>
<div> </div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:sans-serif"><span class="highlight" style="background-color: rgb(255, 255, 255)">Aviv</span></span></span><br></div>
<div> </div>
<div> </div>
<div>On Fri, Nov 7, 2014, at 01:05 AM, Manish Talwar wrote:<br></div>
<blockquote type="cite"><div style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif"><p style="margin-bottom:0px; margin-top:0px">Hi,<br></p><p style="margin-bottom:0px; margin-top:0px"><br></p><p style="margin-bottom:0px; margin-top:0px">Thanks for your suggestion, I have tried it and I am able to do a Inbound call via Nexmo now. But still I am not able to make any outbound call from my application.<br></p><p style="margin-bottom:0px; margin-top:0px"><br></p><p style="margin-bottom:0px; margin-top:0px">I have checked the FreeSwitch log by siptrace enable and found that my call was terminated with a SIP message as "<br></p><p style="margin-bottom:0px; margin-top:0px"><b><span class="colour" style="color:rgb(255, 0, 0)">IP/2.0 407 Proxy Authentication Required</span></b>".<br></p><p style="margin-bottom:0px; margin-top:0px"><br></p><p style="margin-bottom:0px; margin-top:0px">Please find the siptrace log for my call as an attachment. and let me know what changes or configuration I need to make for Proxy Authentication Header.<br></p><p style="margin-bottom:0px; margin-top:0px"><br></p><p style="margin-bottom:0px; margin-top:0px">Thanks,<br></p><p style="margin-bottom:0px; margin-top:0px"><br></p><p style="margin-bottom:0px; margin-top:0px"><span>Regards</span>,<br></p><p style="margin-bottom:0px; margin-top:0px">Manish Talwar<br></p><p style="margin-bottom:0px; margin-top:0px"><br></p><div style="color:rgb(33,33,33)"><div><hr tabindex="-1" style="display:inline-block; width:98%"> <br></div>
<div dir="ltr"><div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"><b>From:</b> freeswitch-users-bounces@lists.freeswitch.org <freeswitch-users-bounces@lists.freeswitch.org>
on behalf of Aviv Shaham <aviv@sent.com></span></span></span><br></div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"><b>Sent:</b> 06 November 2014 14:39</span></span></span><br></div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"><b>To:</b> freeswitch-users@lists.freeswitch.org</span></span></span><br></div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:Calibri, ' sans-serif'"><span class="size" style="font-size:11pt"> <b>Subject:</b> Re: [Freeswitch-users] SIP trunking with Nexmo</span></span></span><br></div>
<div> </div>
</div>
<div><div>Hi Manish,<br></div>
<div> </div>
<div>Nexmo expects your API KEY to be in the From header. To set the caller ID you will need to use "caller-id-name". Good timing btw, I just posted a reply to a similar question on Quora. Have a look: <a href="http://qr.ae/DEbk2">http://qr.ae/DEbk2</a> - also
covers Plivo.<br></div>
<div> </div>
<div>Aviv<br></div>
<div> </div>
<div> </div>
<div>On Thu, Nov 6, 2014, at 12:07 AM, Manish Talwar wrote:<br></div>
<blockquote type="cite"><div style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif"><div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; margin-top:0px; margin-bottom:0px">Hi,<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; margin-top:0px; margin-bottom:0px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; margin-top:0px; margin-bottom:0px">I have make a <span class="highlight" style="background-color: rgb(255, 255, 255)">SIP Trunking</span> (gateway) in FreeSwitch for connecting Nexmo via bridge. I have added this Nexmo file under "<b>\FreeSWITCH\conf\sip_profiles\external</b>" folder. Its successfully
registering "<span class="colour" style="color:rgb(75, 165, 36)"><span class="font" style="font-family:Calibri, Arial, Helvetica, sans-serif"><span class="size" style="font-size:small"><span class="size" style="font-size:16px">sip.nexmo.com</span></span></span></span>" Gateway
as mentioned below:<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; margin-top:0px; margin-bottom:0px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> Name Type Data State<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">================================================================================================<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> external-ipv6 profile sip:mod_sofia@[2001:0:9d38:90d7:102f:3fc4:3f57:fe73]:5080 RUNNING (0)<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> 192.168.1.140 alias internal ALIASED<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> external profile sip:mod_sofia@192.168.1.140:5080 RUNNING (0)<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> external::example.com gateway sip:joeuser@example.com NOREG<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"><span class="colour" style="color:rgb(75, 165, 36)">external::sip.nexmo.com gateway sip:b9c280dd:7678b8c4@sip.nexmo.com
REGED</span><br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> internal-ipv6 profile sip:mod_sofia@[2001:0:9d38:90d7:102f:3fc4:3f57:fe73]:5060 RUNNING (0)<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> internal profile sip:mod_sofia@192.168.1.140:5060 RUNNING (0)<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">================================================================================================<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">4 profiles 1 alias<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">But when I send the request to FreeSwitch by Dial command as:<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"><div><b><document type="xml/freeswitch-httapi"><params></params><work><execute application="set" data="sip_h_api_key=b9c280dd" /><execute application="set" data="sip_h_api_secret=7678b8c4" /><execute application="set" data="sip_h_to=919818753995"
/><execute application="set" data="sip_h_from=18188535351 <sip:b9c280dd@sip.nexmo.com>" /><execute application="set" data="sip_h_answer_url=http://services.qpayi.com:8080/ivr/assets/NexmoTransfer.vxml" /><dial name="exten" action="http://localhost:8080/ivr/fsdialmenu/dialendresponse/"
caller-id-name="HTTAPI Test" </b><br></div>
<div><b>caller-id-number="18188535351" context="default" Dialplan="XML" >919818753995</dial></work></document></b><br></div>
<div> </div>
<div> </div>
<div>here, <span class="font" style="font-family:Calibri, Arial, Helvetica, sans-serif"><span class="size" style="font-size:small"><span class="size" style="font-size:16px"><b>18188535351</b></span></span></span> = Nexmo virtual number for connecting call.<br></div>
<div><span class="font" style="font-family:Calibri, Arial, Helvetica, sans-serif"><span class="size" style="font-size:small"><span class="size" style="font-size:16px"><b>919818753995</b></span></span></span> = mobile number where I am looking for making a call.<br></div>
<div> </div>
<div>It will not connected to Nexmo and call will be terminated with message as:<br></div>
<div><div><span class="colour" style="color:red">2014-11-06 11:05:18.088340 [INFO] mod_dptools.c:3234 Originate Failed. Cause: NORMAL_UNSPECIFIED</span><br></div>
<div> </div>
</div>
<div>Please find the FreeSwitch call Log and <span class="font" style="font-family:Calibri, Arial, Helvetica, sans-serif"><span class="size" style="font-size:small"><span class="size" style="font-size:16px">Nexmo Gateway (which I have added in freeswitch conf external
folder) </span></span></span>as an attachment.<br></div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">Please let me know whether I am doing SIP trunking in correct way or need to change something.<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">Also, Please suggest me what will be my next step for making a call on mobile by this ways.<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">Thanks,<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"> </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">Regards,<br></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">Manish Talwar<br></div>
<p style="margin-bottom:0px; margin-top:0px"><br></p></div>
<div><u>_________________________________________________________________________</u><br></div>
<div>Professional FreeSWITCH Consulting Services:<br></div>
<div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br></div>
<div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br></div>
<div> </div>
<div>Official FreeSWITCH Sites<br></div>
<div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>
<div><a href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br></div>
<div><a href="http://www.cluecon.com">http://www.cluecon.com</a><br></div>
<div> </div>
<div>FreeSWITCH-users mailing list<br></div>
<div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br></div>
<div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br></div>
<div>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br></div>
<div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>
<p style="margin-bottom:0px; margin-top:0px">Email had 2 attachments:<br></p><ul><li><code>FsCall.txt</code><br>
15k (text/plain)</li><li><code>Nexmo.xml</code><br>
3k (text/xml)</li></ul></blockquote><div> </div>
</div>
</div>
</div>
<div><u>_________________________________________________________________________</u><br></div>
<div>Professional FreeSWITCH Consulting Services:<br></div>
<div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br></div>
<div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br></div>
<div> </div>
<div>Official FreeSWITCH Sites<br></div>
<div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>
<div><a href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br></div>
<div><a href="http://www.cluecon.com">http://www.cluecon.com</a><br></div>
<div> </div>
<div>FreeSWITCH-users mailing list<br></div>
<div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br></div>
<div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br></div>
<div>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br></div>
<div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>
<p style="margin-bottom:0px; margin-top:0px">Email had 1 attachment:<br></p><ul><li><code>SipTrace.txt</code><br>
9k (text/plain)</li></ul></blockquote><div> </div>
</div>
</div>
</div>
<div><u>_________________________________________________________________________</u><br></div>
<div>Professional FreeSWITCH Consulting Services:<br></div>
<div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br></div>
<div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br></div>
<div> </div>
<div>Official FreeSWITCH Sites<br></div>
<div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>
<div><a href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a><br></div>
<div><a href="http://www.cluecon.com">http://www.cluecon.com</a><br></div>
<div> </div>
<div>FreeSWITCH-users mailing list<br></div>
<div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br></div>
<div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br></div>
<div>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br></div>
<div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>
<p style="margin-bottom: 0px; margin-top: 0px;">Email had 1 attachment:<br></p><ul><li><code>SipTrace.txt</code><br> 16k (text/plain)</li></ul></blockquote><div> </div>
</body>
</html>