<div dir="ltr">Since there's only a 100 trying and no 18X, you won't get a ringing tone.<div class="gmail_extra">If it'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"><<a href="mailto:notify.sina@gmail.com" target="_blank">notify.sina@gmail.com</a>></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 > 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: "234diallednumber"<br>
<sip:+234diallednumber@my.public.ip.address>;tag=04tDF6pXQU4Ng<br>
To: <<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber><br>
Call-ID: d1ef2fdb-f8a8-1232-80a6-525400ecad09<br>
CSeq: 68640179 INVITE<br>
Contact: <sip:mod_sofia@my.public.ip.address:5080><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: "234diallednumber"<br>
<sip:+234diallednumber@my.public.ip.address>;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 > 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: "234diallednumber"<br>
<sip:+234diallednumber@my.public.ip.address>;tag=04tDF6pXQU4Ng<br>
To: <<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber><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 > 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: "234diallednumber"<br>
<sip:+234diallednumber@my.public.ip.address>;tag=04tDF6pXQU4Ng<br>
To: <<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber>;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="NORMAL_CLEARING"<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: "sina.nowahala"<br>
<<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>>;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 > 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: "234diallednumber"<br>
<sip:+234diallednumber@my.public.ip.address>;tag=04tDF6pXQU4Ng<br>
To: <<a href="mailto:sip%3Asina.nowahala@sip.othersipgw.com">sip:sina.nowahala@sip.othersipgw.com</a>;+234diallednumber>;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 <<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>> wrote:<br>
> How long is the delay? I assume they return a normal_clearing or fail 4XX?<br>
> If the delay is short and they have a "real" status return, then.. for<br>
> success, you can just queue a "success.wav" to play after.<br>
> And for fails, you can use<br>
> <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>
> an extension that plays an error message.<br>
><br>
> This SMS sending sounds like a normal API call.. which if it was, could be<br>
> done with curl or inside a lua/js script.<br>
><br>
> -Avi<br>
><br>
> On Fri, Dec 5, 2014 at 6:47 PM, Notify Me <<a href="mailto:notify.sina@gmail.com">notify.sina@gmail.com</a>> wrote:<br>
>><br>
</span><div class="HOEnZb"><div class="h5">>> Hi Avi!<br>
>><br>
>> Thanks for the reply, I did figure it out, thanks! This is what I did,<br>
>><br>
>> <include><br>
>> <extension name="firstsipgw-inbound"><br>
>> <condition field="destination_number" expression="^0123450(\d{2})$"/><br>
>> <condition field="caller_id_number" expression="^0(\d{10})$"<br>
>> require-nested="true"><br>
>> <action application="set" data="effective_caller_id_number=+234$1"/><br>
>> <action application="set"<br>
>> data="caller_id_number=+234${effective_caller_id_number}"/><br>
>> <action application="set" data="transfer_ringback=$${us-ring}"/><br>
>> <action application="set"<br>
>> data="transfer_ringback=file_string://$${hold_music}"/><br>
>> <action application="set"<br>
>> data="transfer_ringback=local_stream://connecting"/><br>
>> <action application="bridge"<br>
>><br>
>> data="sofia/external/<a href="mailto:sip%3Auser.name@sip.othersipgw.com">sip:user.name@sip.othersipgw.com</a>;${effective_caller_id_number}"/><br>
>> </condition><br>
>> </extension><br>
>> </include><br>
>><br>
>> I can see from the logs that dials the <a href="http://othersipgw.com" target="_blank">othersipgw.com</a> URI, and I can<br>
>> see tcpdumps that corresponds to the traffic being sent, and the<br>
>> other side gets it. The other side immediately drops the call and does<br>
>> some processing that returns an SMS to the dialler.<br>
>><br>
>> I dont know if I can trouble you for more help.. there is no ringing<br>
>> when the transaction happens, and the dialler is unsure what is<br>
>> happening, if the call actually connected. As you might have guessed<br>
>> from the above I am trying to make it ring for a few seconds before<br>
>> the call drops. Is this possible? I would like for the dialler to be<br>
>> able to hear it ring a few times before the call is cut.<br>
>><br>
>> Any help gratefully accepted.<br>
>><br>
>> On Tue, Dec 2, 2014 at 2:22 PM, Avi Marcus <<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>> wrote:<br>
>> > Hi - did you figure this out yet?<br>
>> ><br>
>> > One comment:<br>
>> > <action application="bridge" data="sofia/gateway/othersipgw/+234$1"/><br>
>> > -- I<br>
>> > don't know if $1 is available anymore. You might want to just set that<br>
>> > as<br>
>> > part of the actual number to route, e.g. add a 1212 prefix and match it<br>
>> > again or set it as a channel variable. You can see in the logs if the $1<br>
>> > is<br>
>> > resolving correctly.<br>
>> ><br>
>> > -Avi<br>
>> ><br>
>> ><br>
>> > _________________________________________________________________________<br>
>> > Professional FreeSWITCH Consulting Services:<br>
>> > <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
>> > <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>> ><br>
>> > Official FreeSWITCH Sites<br>
>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> > <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
>> > <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>> ><br>
>> > FreeSWITCH-users mailing list<br>
>> > <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>