<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I have a dedicated short number and
multiple DIDs. I also have a database with customer phone numbers
and their corresponding DIDs.<br>
Each field agent has a mobile phone (from the same provider).<br>
When a call comes in freeswitch automatically routes the call to
the designated field agent via the corresponding DID.<br>
I want to monitor what happens with the call after that, to be
able to decide what to do with the call next.<br>
So basically, the call never leaves the provider's network.<br>
<br>
Btw, I did asked the provider to switch back the settings but the
feedback was:<br>
"The behavior is normal because for calls made inside Vodafone
network, we generate tones. Thus, for Busy, we play specific tone
and then disconnect the call, signaling with SIP 480
(corresponding to the end of announcement). If a call comes from
another network, User Busy is signaled on ISUP and SIP returned as
such. The settings can not be changed per customer. "<br>
Unofficially, they acknowledged that their PBX behaved differently
before because it was not correctly configured.<br>
<br>
PS: My provider sends the description of the tones using a reason
header inside the SIP/183 message. But I was unable to find a way
to extract it:<br>
<br>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/pipermail/freeswitch-users/2014-March/103645.html">http://lists.freeswitch.org/pipermail/freeswitch-users/2014-March/103645.html</a><br>
<br>
<br>
-------- Original Message --------<br>
<b>Subject: </b>Re: [Freeswitch-users] Detecting multiple tones
with freeswitch<br>
<b>From: </b>Michael Jerris <a class="moz-txt-link-rfc2396E" href="mailto:mike@jerris.com"><mike@jerris.com></a><br>
<b>To: </b>FreeSWITCH Users Help
<a class="moz-txt-link-rfc2396E" href="mailto:freeswitch-users@lists.freeswitch.org"><freeswitch-users@lists.freeswitch.org></a><br>
<b>Date: </b>05.01.2015 20:02<br>
</div>
<blockquote
cite="mid:012A2476-B5CC-4F5A-BDF9-E13AE726319E@jerris.com"
type="cite">
<pre wrap="">You can never reliably depend on the tones, particularly with international traffic. This is never going to work reliably unless you get useful sip signaling. I would be demanding the carrier change settings back.
</pre>
<blockquote type="cite">
<pre wrap="">On Jan 3, 2015, at 7:46 AM, Bunea Lucian <a class="moz-txt-link-rfc2396E" href="mailto:lucibunea@gmail.com"><lucibunea@gmail.com></a> wrote:
Hello,
My SIP provider (Vodafone) decided to make me a Christmas present: they
change the configuration of their SIP server.
Using the old configuration they were sending SIP codes for decline,
busy and unavailable.
Now they are sending early media with tones (for decline and busy) and a
one minute message for unavailable.
Each status is followed by a SIP/480.
Since I need to be able to distinguish between different statuses, I
have determined the following:
- if I don't receive a ring tone within 7 second, the called number is
unavailable;
- if I receive a busy tone within 4 seconds the called number is busy;
- if I receive a busy tone after 4 second the call number has declined
the call;
This is how I tried to implement it:
- after receiving early media (SIP/180 or SIP/183) a timer is started
for call hangup (sched_hangup)
- if I receive a ring tone within 7 seconds the timer is canceled
(sched_cancel);
- if I receive a busy tone a lua script is called;
<action application="set" data="sip_ignore_remote_cause=true"/>
<action application="set" data="execute_on_media=sched_hangup +7
SUBSCRIBER_ABSENT"/>
<action application="tone_detect" data="busy 425 w +60000 lua
'busy_detected.lua ${uuid} ${created_time}' 2"/>
<action application="tone_detect" data="ring 450 w +7000 sched_cancel"/>
<action application="bridge"
data=<a class="moz-txt-link-rfc2396E" href="mailto:sofia/external/${destination_number}@XXX.XXX.XXX.XXX">"sofia/external/${destination_number}@XXX.XXX.XXX.XXX"</a>/>
But, for some reason, the tones are detected, but the applications are
never called.
If I add one of the following lines to the dialplan the corresponding
application is called:
<action application="set" data="execute_on_tone_detect=sched_cancel"/>
or
<action application="set" data="execute_on_tone_detect=lua
busy_detected.lua ${uuid} ${created_time}"/>
but I can't tell which tone was detected...
What am I missing?
PS: Tested with FreeSWITCH Version 1.4.14-1~64bit.
Regards,
Lucian
</pre>
</blockquote>
<pre wrap="">
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
</body>
</html>