<div dir="ltr">Since there&#39;s only a 100 trying and no 18X, you won&#39;t get a ringing tone.<div class="gmail_extra">If it&#39;s short, just play a message after. If not, you can use lua/js and run this second call as a bgapi call and try to capture the response.<br clear="all"><div><div class="gmail_signature"><div dir="ltr">-Avi</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div><div class="gmail_quote">On Sun, Dec 7, 2014 at 1:47 PM, Notify Me <span dir="ltr">&lt;<a href="mailto:notify.sina@gmail.com" target="_blank">notify.sina@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The delay is very short, they send a100 Trying  and then a 480 temporarily<br>
<span class="">Unavailable back, as I can see in tcpdump. After they send the fail<br>
and its acknowledged, they end it and send an SMS back.<br>
</span>This is a full dump<br>
<br>
12:41:27.169928 IP (tos 0x0, ttl 64, id 34092, offset 0, flags [none],<br>
proto UDP (17), length 1146)<br>
    10.22.0.252.5080 &gt; othersipgw.ip.address.5060: SIP, length: 1118<br>
        INVITE <a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber SIP/2.0<br>
        Via: SIP/2.0/UDP<br>
my.public.ip.address:5080;rport;branch=z9hG4bK2S6KjD1jXFj1Q<br>
        Max-Forwards: 5<br>
        From: &quot;234diallednumber&quot;<br>
&lt;sip:+234diallednumber@my.public.ip.address&gt;;tag=04tDF6pXQU4Ng<br>
        To: &lt;<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber&gt;<br>
        Call-ID: d1ef2fdb-f8a8-1232-80a6-525400ecad09<br>
        CSeq: 68640179 INVITE<br>
        Contact: &lt;sip:mod_sofia@my.public.ip.address:5080&gt;<br>
        User-Agent:<br>
FreeSWITCH-mod_sofia/1.5.15b+git~20141120T035109Z~79de78a0fb~64bit<br>
        Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO,<br>
UPDATE, REGISTER, REFER, NOTIFY<br>
        Supported: timer, path, replaces<br>
        Allow-Events: talk, hold, conference, refer<br>
        Content-Type: application/sdp<br>
        Content-Disposition: session<br>
        Content-Length: 247<br>
        X-FS-Support: update_display,send_info<br>
        Remote-Party-ID: &quot;234diallednumber&quot;<br>
&lt;sip:+234diallednumber@my.public.ip.address&gt;;party=calling;screen=yes;privacy=off<br>
<br>
        v=0<br>
        o=FreeSWITCH 1417930197 1417930198 IN IP4 my.public.ip.address<br>
        s=FreeSWITCH<br>
        c=IN IP4 my.public.ip.address<br>
        t=0 0<br>
        m=audio 22290 RTP/AVP 8 0 101 13<br>
        a=rtpmap:8 PCMA/8000<br>
        a=rtpmap:0 PCMU/8000<br>
        a=rtpmap:101 telephone-event/8000<br>
        a=fmtp:101 0-16<br>
        a=ptime:20<br>
<br>
12:41:27.385419 IP (tos 0x0, ttl 53, id 5736, offset 0, flags [none],<br>
proto UDP (17), length 384)<br>
    othersipgw.ip.address.5060 &gt; 10.22.0.252.5080: SIP, length: 356<br>
        SIP/2.0 100 Trying<br>
        Via: SIP/2.0/UDP<br>
my.public.ip.address:5080;rport=5080;branch=z9hG4bK2S6KjD1jXFj1Q<br>
        From: &quot;234diallednumber&quot;<br>
&lt;sip:+234diallednumber@my.public.ip.address&gt;;tag=04tDF6pXQU4Ng<br>
        To: &lt;<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber&gt;<br>
        Call-ID: d1ef2fdb-f8a8-1232-80a6-525400ecad09<br>
        CSeq: 68640179 INVITE<br>
        User-Agent: FreeSWITCH-mod_sofia/1.2.14<br>
        Content-Length: 0<br>
<br>
<br>
12:41:27.424422 IP (tos 0x0, ttl 53, id 5737, offset 0, flags [none],<br>
<span class="">proto UDP (17), length 1015)<br>
</span>    othersipgw.ip.address.5060 &gt; 10.22.0.252.5080: SIP, length: 987<br>
<span class="">        SIP/2.0 480 Temporarily Unavailable<br>
        Via: SIP/2.0/UDP<br>
</span>my.public.ip.address:5080;rport=5080;branch=z9hG4bK2S6KjD1jXFj1Q<br>
        Max-Forwards: 4<br>
        From: &quot;234diallednumber&quot;<br>
&lt;sip:+234diallednumber@my.public.ip.address&gt;;tag=04tDF6pXQU4Ng<br>
        To: &lt;<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber&gt;;tag=8c8DZK1aK9mKN<br>
        Call-ID: d1ef2fdb-f8a8-1232-80a6-525400ecad09<br>
        CSeq: 68640179 INVITE<br>
        User-Agent: FreeSWITCH-mod_sofia/1.2.14<br>
        Accept: application/sdp<br>
        Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO,<br>
UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE<br>
        Supported: timer, precondition, path, replaces<br>
        Allow-Events: talk, hold, conference, presence, dialog,<br>
line-seize, call-info, sla, include-session-description,<br>
presence.winfo, message-summary, refer<br>
        Reason: Q.850;cause=16;text=&quot;NORMAL_CLEARING&quot;<br>
        Content-Length: 0<br>
        X-FS-Display-Name: sina.nowahala<br>
        X-FS-Display-Number: <a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a><br>
        Remote-Party-ID: &quot;sina.nowahala&quot;<br>
&lt;<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>&gt;;party=calling;privacy=off;screen=no<br>
<br>
<br>
12:41:27.424789 IP (tos 0x0, ttl 64, id 34093, offset 0, flags [none],<br>
proto UDP (17), length 412)<br>
    10.22.0.252.5080 &gt; othersipgw.ip.address.5060: SIP, length: 384<br>
        ACK <a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber SIP/2.0<br>
        Via: SIP/2.0/UDP<br>
my.public.ip.address:5080;rport;branch=z9hG4bK2S6KjD1jXFj1Q<br>
        Max-Forwards: 5<br>
        From: &quot;234diallednumber&quot;<br>
&lt;sip:+234diallednumber@my.public.ip.address&gt;;tag=04tDF6pXQU4Ng<br>
        To: &lt;<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber&gt;;tag=8c8DZK1aK9mKN<br>
        Call-ID: d1ef2fdb-f8a8-1232-80a6-525400ecad09<br>
        CSeq: 68640179 ACK<br>
        Content-Length: 0<br>
<span class="im HOEnZb"><br>
<br>
So you recommend a transfer on fail wav to be played? I have been<br>
tearing my hair out trying to play sounds before the call is<br>
transferred to them, so that the dialler hears something.<br>
<br>
On Sun, Dec 7, 2014 at 4:44 AM, Avi Marcus &lt;<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>&gt; wrote:<br>
&gt; How long is the delay? I assume they return a normal_clearing or fail 4XX?<br>
&gt; If the delay is short and they have a &quot;real&quot; status return, then.. for<br>
&gt; success, you can just queue a &quot;success.wav&quot; to play after.<br>
&gt; And for fails, you can use<br>
&gt; <a href="https://wiki.freeswitch.org/wiki/Variable_transfer_on_fail" target="_blank">https://wiki.freeswitch.org/wiki/Variable_transfer_on_fail</a> and transfer to<br>
&gt; an extension that plays an error message.<br>
&gt;<br>
&gt; This SMS sending sounds like a normal API call.. which if it was, could be<br>
&gt; done with curl or inside a lua/js script.<br>
&gt;<br>
&gt; -Avi<br>
&gt;<br>
&gt; On Fri, Dec 5, 2014 at 6:47 PM, Notify Me &lt;<a href="mailto:notify.sina@gmail.com">notify.sina@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
</span><div class="HOEnZb"><div class="h5">&gt;&gt; Hi Avi!<br>
&gt;&gt;<br>
&gt;&gt; Thanks for the reply, I did figure it out, thanks! This is what I did,<br>
&gt;&gt;<br>
&gt;&gt; &lt;include&gt;<br>
&gt;&gt;  &lt;extension name=&quot;firstsipgw-inbound&quot;&gt;<br>
&gt;&gt;   &lt;condition field=&quot;destination_number&quot;  expression=&quot;^0123450(\d{2})$&quot;/&gt;<br>
&gt;&gt;   &lt;condition field=&quot;caller_id_number&quot;  expression=&quot;^0(\d{10})$&quot;<br>
&gt;&gt; require-nested=&quot;true&quot;&gt;<br>
&gt;&gt;      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=+234$1&quot;/&gt;<br>
&gt;&gt;      &lt;action application=&quot;set&quot;<br>
&gt;&gt; data=&quot;caller_id_number=+234${effective_caller_id_number}&quot;/&gt;<br>
&gt;&gt;      &lt;action application=&quot;set&quot; data=&quot;transfer_ringback=$${us-ring}&quot;/&gt;<br>
&gt;&gt;      &lt;action application=&quot;set&quot;<br>
&gt;&gt; data=&quot;transfer_ringback=file_string://$${hold_music}&quot;/&gt;<br>
&gt;&gt;      &lt;action application=&quot;set&quot;<br>
&gt;&gt; data=&quot;transfer_ringback=local_stream://connecting&quot;/&gt;<br>
&gt;&gt;        &lt;action application=&quot;bridge&quot;<br>
&gt;&gt;<br>
&gt;&gt; data=&quot;sofia/external/<a href="mailto:sip%3Auser.name@sip.othersipgw.com">sip:user.name@sip.othersipgw.com</a>;${effective_caller_id_number}&quot;/&gt;<br>
&gt;&gt;   &lt;/condition&gt;<br>
&gt;&gt;  &lt;/extension&gt;<br>
&gt;&gt; &lt;/include&gt;<br>
&gt;&gt;<br>
&gt;&gt; I can see from the logs that dials the <a href="http://othersipgw.com" target="_blank">othersipgw.com</a> URI, and I can<br>
&gt;&gt; see tcpdumps that corresponds to the traffic being sent,  and the<br>
&gt;&gt; other side gets it. The other side immediately drops the call and does<br>
&gt;&gt; some processing that returns an SMS to the dialler.<br>
&gt;&gt;<br>
&gt;&gt; I dont know if I can trouble you for more help.. there is no ringing<br>
&gt;&gt; when the transaction happens, and the dialler is unsure what is<br>
&gt;&gt; happening, if the call actually connected. As you might have guessed<br>
&gt;&gt; from the above I am trying to make it ring for a few seconds before<br>
&gt;&gt; the call drops. Is this possible? I would like for the dialler to be<br>
&gt;&gt; able to hear it ring a few times before the call is cut.<br>
&gt;&gt;<br>
&gt;&gt; Any help gratefully accepted.<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Dec 2, 2014 at 2:22 PM, Avi Marcus &lt;<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi - did you figure this out yet?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; One comment:<br>
&gt;&gt; &gt;  &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/othersipgw/+234$1&quot;/&gt;<br>
&gt;&gt; &gt; -- I<br>
&gt;&gt; &gt; don&#39;t know if $1 is available anymore. You might want to just set that<br>
&gt;&gt; &gt; as<br>
&gt;&gt; &gt; part of the actual number to route, e.g. add a 1212 prefix and match it<br>
&gt;&gt; &gt; again or set it as a channel variable. You can see in the logs if the $1<br>
&gt;&gt; &gt; is<br>
&gt;&gt; &gt; resolving correctly.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; -Avi<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _________________________________________________________________________<br>
&gt;&gt; &gt; Professional FreeSWITCH Consulting Services:<br>
&gt;&gt; &gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt;&gt; &gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Official FreeSWITCH Sites<br>
&gt;&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt; &gt; <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
&gt;&gt; &gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; FreeSWITCH-users mailing list<br>
&gt;&gt; &gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt; &gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div></div>