VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
yudha2008 at gmail.com Guest
|
Posted: Thu Dec 18, 2008 8:15 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi,
I am using JavaScript file to detect busy tone signals but I cant able to detect the busy tone signals
My JavaScript
session1 = new Session();
session1.originate(session1, "{ignore_early_media=true}sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)");
session1.execute("tone_detect", "busy 400 r");
session1.execute("bridge", "sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)");
session1.execute("transfer", "39841799874");
I get output:
freeswitch@localhost.localdomain> jsrun tone.js
API CALL [jsrun(tone.js)] output:
OK
freeswitch@localhost.localdomain> 2008-12-18 18:42:30 [NOTICE] switch_channel.c:565 switch_channel_set_name() New Channel sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228) [0a9723ca-d170-4cee-a8bf-58a8ad018a44]
2008-12-18 18:42:35 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Ring-Ready sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228)!
2008-12-18 18:42:35 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Pre-Answer sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228)!
2008-12-18 18:42:39 [NOTICE] sofia.c:2963 sofia_handle_sip_i_state() Channel [sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228)] has been answered
2008-12-18 18:42:39 [NOTICE] mod_dptools.c:1217 tone_detect_session_function() Enabling tone detection 'busy' '400'
2008-12-18 18:42:39 [NOTICE] switch_channel.c:565 switch_channel_set_name() New Channel sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228) [5152416f-7e5c-4a60-9601-6a4af625d8aa]
2008-12-18 18:42:39 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Ring-Ready sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228)!
2008-12-18 18:42:39 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Pre-Answer sofia/internal/39841799874@172.20.191.228 (39841799874@172.20.191.228)!
when i run my js call is connected and after the caller answer only enabling the tone detection.
I am not sure i am correct. correct me how to detect the busy signal. I have written a small JavaScript. Correct me where i am wrong (In the program or in the way it detect the call).
Thanks in advance.
--
Warm Regards,
N.Baskar
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Thu Dec 18, 2008 9:44 am Post subject: [Freeswitch-users] busy tone detection |
|
|
You've got ignore_early_media set to true but busy signals might be sent during early media. Why are you ignoring early media?
Also, you might need to check your tone_detect syntax. You're set to detect 400Hz but you haven't told the system what to do if it does detect that tone. Please look at the wiki examples for tone_detect. You will see what kinds of things you can do with it, but usually you just set a channel variable.
-MC
Sent from my iPhone
On Dec 18, 2008, at 5:13 AM, Baskar <yudha2008@gmail.com (yudha2008@gmail.com)> wrote:
Quote: | Hi,
I am using JavaScript file to detect busy tone signals but I cant able to detect the busy tone signals
My JavaScript
session1 = new Session();
session1.originate(session1, "{ignore_early_media=true}sofia/default/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]");
session1.execute("tone_detect", "busy 400 r");
session1.execute("bridge", "sofia/default/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]");
session1.execute("transfer", "39841799874");
I get output:
freeswitch@localhost.localdomain (freeswitch@localhost.localdomain)> jsrun tone.js
API CALL [jsrun(tone.js)] output:
OK
freeswitch@localhost.localdomain (freeswitch@localhost.localdomain)> 2008-12-18 18:42:30 [NOTICE] switch_channel.c:565 switch_channel_set_name() New Channel sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url] [0a9723ca-d170-4cee-a8bf-58a8ad018a44]
2008-12-18 18:42:35 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Ring-Ready sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]!
2008-12-18 18:42:35 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Pre-Answer sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]!
2008-12-18 18:42:39 [NOTICE] sofia.c:2963 sofia_handle_sip_i_state() Channel [sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]] has been answered
2008-12-18 18:42:39 [NOTICE] mod_dptools.c:1217 tone_detect_session_function() Enabling tone detection 'busy' '400'
2008-12-18 18:42:39 [NOTICE] switch_channel.c:565 switch_channel_set_name() New Channel sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url] [5152416f-7e5c-4a60-9601-6a4af625d8aa]
2008-12-18 18:42:39 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Ring-Ready sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]!
2008-12-18 18:42:39 [NOTICE] sofia_glue.c:2097 sofia_glue_tech_media() Pre-Answer sofia/internal/[url=mailto:39841799874@172.20.191.228]39841799874@172.20.191.228 (39841799874@172.20.191.228)[/url]!
when i run my js call is connected and after the caller answer only enabling the tone detection.
I am not sure i am correct. correct me how to detect the busy signal. I have written a small JavaScript. Correct me where i am wrong (In the program or in the way it detect the call).
Thanks in advance.
--
Warm Regards,
N.Baskar
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
yudha2008 at gmail.com Guest
|
Posted: Wed Dec 24, 2008 6:36 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi, This is my JavaScript for tone detect
session1 = new Session();session1.originate(session1, "{ignore_early_media=false}sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("tone_detect", "test 400,25 r +1 hangup 'normal_clearing' 1");session1.execute("bridge", "sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("transfer", "39841799874");
But Tone Detect does not work at all Did i work wrongly, correct me where i am wrong Another question :In api tone detect command i got api parameters like this
api tone_detect,Start Tone Detection on a channel,<uuid> <key> <tone_spec> [<flags> <timeout> <app> <args> <hits>]
In that I want to know what is <tone_spec> ....
I did not see any details in wiki.freeswitch site can any what should be passed in tone_spec.
--
Warm Regards,
N.Baskar |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Wed Dec 24, 2008 12:24 pm Post subject: [Freeswitch-users] busy tone detection |
|
|
On Wed, Dec 24, 2008 at 3:23 AM, Baskar <yudha2008@gmail.com (yudha2008@gmail.com)> wrote:
Quote: | Hi, This is my JavaScript for tone detect
session1 = new Session();session1.originate(session1, "{ignore_early_media=false}sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("tone_detect", "test 400,25 r +1 hangup 'normal_clearing' 1"); |
Is the combination of 400Hz and 25Hz the correct busy tone for your country?
Also, the +1 means "check for tone for +1 second into the future"
Most likely you want something like +30 so that the tone detect will be active long enough to hear something!
Quote: | session1.execute("bridge", "sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("transfer", "39841799874");
But Tone Detect does not work at all Did i work wrongly, correct me where i am wrong Another question :In api tone detect command i got api parameters like this
api tone_detect,Start Tone Detection on a channel,<uuid> <key> <tone_spec> [<flags> <timeout> <app> <args> <hits>]
In that I want to know what is <tone_spec> .... |
<tone_spec> is talking about the combination of frequencies to listen for. In your example, the tone spec is "400,25"
Hope that information helped!
-MC (mercutioviz)
|
|
Back to top |
|
|
yudha2008 at gmail.com Guest
|
Posted: Fri Dec 26, 2008 6:18 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi Michael,
I have updated all the changes what u said, But still i did not get any tone detect in the script
session1 = new Session(); session1.originate(session1, "{ignore_early_media=True}sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("tone_detect", "test 400 r +30 hangup 'normal_clearing' 3");session1.execute("bridge", "sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("transfer", "39841799874");
Still i did not know what is the error in the script or some thing else.please guide me to run this tone detect process.
I have tried through api command also i did not get any update.
I did not get any error also but the tone detect process is not working.
I have tried some combination's like this
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +30 transfer '1007 XML default' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +30 transfer '1007' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +30 transfer '1007@172.20.201.67 (1007@172.20.201.67)' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +1 hangup 'normal_clearing' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
I get output == OK but no detect of tone.
"Is there any modules for tone detect to be enabled" please assist me, so that it is useful for me!
Thanks in Advance.
Warm Regards,
N.Baskar
|
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Fri Dec 26, 2008 8:34 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Your still ignoring early media. Are you trying to detect the tone before or after answer?
Mike
On Dec 26, 2008, at 6:16 AM, Baskar wrote:
Quote: | Hi Michael,
I have updated all the changes what u said, But still i did not get any tone detect in the script
session1 = new Session(); session1.originate(session1, "{ignore_early_media=True}sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("tone_detect", "test 400 r +30 hangup 'normal_clearing' 3");session1.execute("bridge", "sofia/default/39841799874@172.20.191.228 (39841799874@172.20.191.228)"); session1.execute("transfer", "39841799874");
Still i did not know what is the error in the script or some thing else.please guide me to run this tone detect process.
I have tried through api command also i did not get any update.
I did not get any error also but the tone detect process is not working.
I have tried some combination's like this
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +30 transfer '1007 XML default' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +30 transfer '1007' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +30 transfer '1007@172.20.201.67 (1007@172.20.201.67)' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
api tone_detect 0b2eec58-cbb3-484e-bc60-e274a74337ca busy 400 r +1 hangup 'normal_clearing' 3
Output:
Content-Type: api/response
Content-Length: 45
+OK Enabling tone detection 'test' '400' 'r'
I get output == OK but no detect of tone.
"Is there any modules for tone detect to be enabled" please assist me, so that it is useful for me!
Thanks in Advance.
Warm Regards,
N.Baskar
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
yudha2008 at gmail.com Guest
|
Posted: Sat Dec 27, 2008 5:59 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi Michael,
"I try to detect the tone before answering the call.
Is there any module for tone detect to be enabled" " I have set ignore_early_media=False (False is case sensitive?)"
But still no Tone is Detected.
--
Warm Regards,
N.Baskar
|
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Sat Dec 27, 2008 1:00 pm Post subject: [Freeswitch-users] busy tone detection |
|
|
On Dec 27, 2008, at 5:56 AM, Baskar wrote:
Quote: | Hi Michael,
"I try to detect the tone before answering the call.
Is there any module for tone detect to be enabled" |
I believe its in mod_dptools, if its not throwing an error that the application does not exist, then its fine.
Quote: | " I have set ignore_early_media=False (False is case sensitive?)" |
you can omit ignore_early_media, it defaults to false.
Quote: | But still no Tone is Detected. |
Have you confirmed that tone frequency for your busy tone in your country and that the tone is actually being played as part of early media?
Mike |
|
Back to top |
|
|
yudha2008 at gmail.com Guest
|
Posted: Mon Dec 29, 2008 7:42 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi Michael,
Step i follow for the Tone Detect process
Thanks for the Reply It is useful for me
On Sat, Dec 27, 2008 at 11:14 PM, Michael Jerris <mike@jerris.com (mike@jerris.com)> wrote:
--
Warm Regards,
N.Baskar |
|
Back to top |
|
|
yudha2008 at gmail.com Guest
|
Posted: Mon Dec 29, 2008 8:07 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi Michael,
Steps I follow for the Tone Detect process
Step1: From X-lite i called my no (eg: 1007==>9841799874 )
Step2: Then i run the JavaScript in that also i have given same no (9841799874)
Step3: While i run the JavaScript i should get the busy tone detect but i cant ???
INTERNATIONAL TELECOMMUNICATION UNION given all national frequency
For India they have given
India (Republic of)
Acceptance tone - 400 1.0 on 4.0 off
Busy tone - 400 0.75 on 0.75 off
Congestion tone - 400 0.25 on 0.25 off
Dial tone - 400x25 continuous
Special dial tone - 400 2.8 on 0.2 off
Holding tone - 400 0.25 on 0.25 off 0.25 on 3.25 off
Intrusion tone - 400 0.15 on 4.85 off
Refusal tone - 400 0.25 on 0.25 off
Ringing tone - I (local calls) 400x25 0.4 on 0.2 off 0.4 on 2..0 off
Ringing tone - II (NSD/ISD calls) 400x25 1.0 on 2.0 off
Route tone - 400 0.1 on 0.9 off
Call waiting tone - 400 0.2 on 0.1 off 0.2 on 7.5 off
But in wiki.sangoma They have given frequency for india (openzap)
Quote: | [in]generate-dial => v=-7;%(1000,0,375,425)
detect-dial => 375,425generate-ring => v=-7;%(2000,4000,440,480)
detect-ring => 440,480generate-busy => v=-7;%(500,500,480,620)
detect-busy => 480,620generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130detect-fail1 => 913.8
detect-fail2 => 1370.6detect-fail3 => 776.7 |
In INTERNATIONAL TELECOMMUNICATION UNION they have given busy tone frequency is
Busy tone - 400 0.75 on 0.75 off
But in wiki.sangoma They have given
generate-busy => v=-7;%(500,500,480,620)detect-busy => 480,620
I have tried both 400 and 480,620 in JavaScript but still i cant detect tone.
Guide me Which Frequency Should i use and Another thing What steps Should be followed for the Tone Detect .
(i)Whether my step is correct . OR (ii)Should i follow in different method.If so how? Help To detect the tone .....
Thanks for the reply,
--
Warm Regards,
N.Baskar
|
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Mon Dec 29, 2008 8:57 am Post subject: [Freeswitch-users] busy tone detection |
|
|
I don't understand your steps.
On Dec 29, 2008, at 8:04 AM, Baskar <yudha2008@gmail.com (yudha2008@gmail.com)> wrote:
Quote: | Hi Michael,
Steps I follow for the Tone Detect process
Step1: From X-lite i called my no (eg: 1007==>9841799874 )
Step2: Then i run the JavaScript in that also i have given same no (9841799874)
Step3: While i run the JavaScript i should get the busy tone detect but i cant ???
INTERNATIONAL TELECOMMUNICATION UNION given all national frequency
For India they have given
India (Republic of)
Acceptance tone - 400 1.0 on 4.0 off
Busy tone - 400 0.75 on 0.75 off
Congestion tone - 400 0.25 on 0.25 off
Dial tone - 400x25 continuous
Special dial tone - 400 2.8 on 0.2 off
Holding tone - 400 0.25 on 0.25 off 0.25 on 3.25 off
Intrusion tone - 400 0.15 on 4.85 off
Refusal tone - 400 0.25 on 0.25 off
Ringing tone - I (local calls) 400x25 0.4 on 0.2 off 0.4 on 2..0 off
Ringing tone - II (NSD/ISD calls) 400x25 1.0 on 2.0 off
Route tone - 400 0.1 on 0.9 off
Call waiting tone - 400 0.2 on 0.1 off 0.2 on 7.5 off
But in wiki.sangoma They have given frequency for india (openzap)
Quote: | [in]generate-dial => v=-7;%(1000,0,375,425)
detect-dial => 375,425generate-ring => v=-7;%(2000,4000,440,480)
detect-ring => 440,480generate-busy => v=-7;%(500,500,480,620)
detect-busy => 480,620generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130detect-fail1 => 913.8
detect-fail2 => 1370.6detect-fail3 => 776.7 |
In INTERNATIONAL TELECOMMUNICATION UNION they have given busy tone frequency is
Busy tone - 400 0.75 on 0.75 off
But in wiki.sangoma They have given
generate-busy => v=-7;%(500,500,480,620)detect-busy => 480,620
I have tried both 400 and 480,620 in JavaScript but still i cant detect tone.
Guide me Which Frequency Should i use and Another thing What steps Should be followed for the Tone Detect .
(i)Whether my step is correct . OR (ii)Should i follow in different method.If so how? Help To detect the tone .....
Thanks for the reply,
--
Warm Regards,
N.Baskar
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Dec 29, 2008 10:47 am Post subject: [Freeswitch-users] busy tone detection |
|
|
For the sake of testing can you record a call that gets a busy signal? At least then we could analyze the audio and see what's going on.
If you need a dialplan example for this let me know.
-MC
Sent from my iPhone
On Dec 29, 2008, at 5:04 AM, Baskar <yudha2008@gmail.com (yudha2008@gmail.com)> wrote:
Quote: | Hi Michael,
Steps I follow for the Tone Detect process
Step1: From X-lite i called my no (eg: 1007==>9841799874 )
Step2: Then i run the JavaScript in that also i have given same no (9841799874)
Step3: While i run the JavaScript i should get the busy tone detect but i cant ???
INTERNATIONAL TELECOMMUNICATION UNION given all national frequency
For India they have given
India (Republic of)
Acceptance tone - 400 1.0 on 4.0 off
Busy tone - 400 0.75 on 0.75 off
Congestion tone - 400 0.25 on 0.25 off
Dial tone - 400x25 continuous
Special dial tone - 400 2.8 on 0.2 off
Holding tone - 400 0.25 on 0.25 off 0.25 on 3.25 off
Intrusion tone - 400 0.15 on 4.85 off
Refusal tone - 400 0.25 on 0.25 off
Ringing tone - I (local calls) 400x25 0.4 on 0.2 off 0.4 on 2..0 off
Ringing tone - II (NSD/ISD calls) 400x25 1.0 on 2.0 off
Route tone - 400 0.1 on 0.9 off
Call waiting tone - 400 0.2 on 0.1 off 0.2 on 7.5 off
But in wiki.sangoma They have given frequency for india (openzap)
Quote: | [in]generate-dial => v=-7;%(1000,0,375,425)
detect-dial => 375,425generate-ring => v=-7;%(2000,4000,440,480)
detect-ring => 440,480generate-busy => v=-7;%(500,500,480,620)
detect-busy => 480,620generate-attn => v=0;%(100,100,1400,2060,2450,2600)
detect-attn => 1400,2060,2450,2600generate-callwaiting-sas => v=0;%(300,0,440)
detect-callwaiting-sas => 440generate-callwaiting-cas => v=0;%(80,0,2750,2130)
detect-callwaiting-cas => 2750,2130detect-fail1 => 913.8
detect-fail2 => 1370.6detect-fail3 => 776.7 |
In INTERNATIONAL TELECOMMUNICATION UNION they have given busy tone frequency is
Busy tone - 400 0.75 on 0.75 off
But in wiki.sangoma They have given
generate-busy => v=-7;%(500,500,480,620)detect-busy => 480,620
I have tried both 400 and 480,620 in JavaScript but still i cant detect tone.
Guide me Which Frequency Should i use and Another thing What steps Should be followed for the Tone Detect .
(i)Whether my step is correct . OR (ii)Should i follow in different method.If so how? Help To detect the tone .....
Thanks for the reply,
--
Warm Regards,
N.Baskar
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
yudha2008 at gmail.com Guest
|
Posted: Tue Dec 30, 2008 1:53 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Hi Michael Jerris,
I will explain what i am currently doing : I don't understand
Step 1: From the xlite phone I have dialed a number and we were on the conversation with one extension (1007 is my extension and my mobile No 9841799874)
Step 2: From the freeswitch console I am executing a javascript file with tone detect like the one below,
My JavaScript :
session1 = new Session();
session1.originate(session1,"{ignore_early_media=false}sofia/internal/1003@172.20.201.67 (1003@172.20.201.67)");
session1.execute("tone_detect","busy 480,620 r +30 transfer '1000' 3");
session1.execute("bridge", "sofia/default/9841799874@172.20.191.228 (9841799874@172.20.191.228)");
session1.execute("transfer", "9841799874");
session1.hangup;
In the above script and in step1 the telephone numbers are same; since the script is not detecting that the phone number is busy.
Hi Michael S Collins,
Please let me know the script, so that it would be helpful for me.
Thanks for the Reply,
Warm Regards,
N.Baskar |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Dec 30, 2008 2:24 am Post subject: [Freeswitch-users] busy tone detection |
|
|
On Mon, Dec 29, 2008 at 10:45 PM, Baskar <yudha2008@gmail.com (yudha2008@gmail.com)> wrote:
Quote: |
Hi Michael Jerris,
I will explain what i am currently doing : I don't understand
Step 1: From the xlite phone I have dialed a number and we were on the conversation with one extension (1007 is my extension and my mobile No 9841799874)
Step 2: From the freeswitch console I am executing a javascript file with tone detect like the one below,
My JavaScript :
session1 = new Session();
session1.originate(session1,"{ignore_early_media=false}sofia/internal/1003@172.20.201.67 (1003@172.20.201.67)");
session1.execute("tone_detect","busy 480,620 r +30 transfer '1000' 3");
| I think the above line is part of the problem. The "+30" literally means 'watch for these tones for 30 milliseconds, and then don't watch any more.' I think what you want here is +30000. Can you try that and see if there's a difference?
Quote: |
session1.execute("bridge", "sofia/default/9841799874@172.20.191.228 (9841799874@172.20.191.228)");
session1.execute("transfer", "9841799874");
session1.hangup;
In the above script and in step1 the telephone numbers are same; since the script is not detecting that the phone number is busy.
Hi Michael S Collins,
Please let me know the script, so that it would be helpful for me. | Here's a simple extension that I use for recording. It uses the uuid of the call for the file name. I don't know if the "pre_answer" application is absolutely necessary or not, but I do it just to be certain that I get the early media.
<extension name="record early media">
<condition field="destination_number" expression="^82(\d+)$"> <!-- 82 + phone number -->
<action application="bridge" data="sofia/default/$1@172.20.191.228 (1@172.20.191.228)"/>
<!-- we can skip all this early media stuff if the far end answers -->
<action application="set" data="execute_on_answer=transfer ANSWERCALL XML default"/>
<action application="sleep" data="100"/>
<action application="pre_answer"/>
<action application="record_session" data="/tmp/${uuid}__1.wav"/>
<action application="sleep" data="500"/>
<!-- If call gets here then probably we're in progress media; get ready to handle various tones -->
<!-- Look for busy and SIT tones right away, then wait a bit before looking for a ring signal -->
<action application="tone_detect" data="BUSY 480,620 r +25000 set BUSY=true"/> <!-- detect busy -->
<action application="tone_detect" data="SIT1LO 913.8 r +25000 set SIT1LO=true"/> <!--1st segment low -->
<!-- ... look for other SIT tones if you need to; snipped from this example -->
<!-- Now sleep while other end is ringing -->
<action application="sleep" data="25010"/>
<!-- if far end answers then we never get here...-->
<!-- Use Lua script to check value of BUSY, SIT1LO, etc. -->
<!-- If !BUSY and !SIT1LO, etc. then call is a no answer -->
<!-- I use extensions for each scenario, e.g.
<condition field="destination_number" expression="ANSWERCALL">
OR
<condition field="destination_number" expression="BUSYCALL">
etc.
-->
</condition>
</extension>
In any case, if you call a busy number it should record the early media. You can change the sleep time from 25010 to a shorter duration, like maybe 10000. You could also insert an info app to dump the channel variables and see if tone_detect set your channel variable(s).
Hope this helps!
-MC
|
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Tue Dec 30, 2008 9:24 am Post subject: [Freeswitch-users] busy tone detection |
|
|
Do you realize that calling a busy number and detecting a busy tone are COMPLETELY different things, your calling on sip, most likely you will not ever get a busy tone to detect but a sip response code when you try to call.
Mike
On Dec 30, 2008, at 1:45 AM, Baskar wrote:
Quote: |
Hi Michael Jerris,
I will explain what i am currently doing : I don't understand
Step 1: From the xlite phone I have dialed a number and we were on the conversation with one extension (1007 is my extension and my mobile No 9841799874)
Step 2: From the freeswitch console I am executing a javascript file with tone detect like the one below,
My JavaScript :
session1 = new Session();
session1.originate(session1,"{ignore_early_media=false}sofia/internal/1003@172.20.201.67 (1003@172.20.201.67)");
session1.execute("tone_detect","busy 480,620 r +30 transfer '1000' 3");
session1.execute("bridge", "sofia/default/9841799874@172.20.191.228 (9841799874@172.20.191.228)");
session1.execute("transfer", "9841799874");
session1.hangup;
In the above script and in step1 the telephone numbers are same; since the script is not detecting that the phone number is busy.
Hi Michael S Collins,
Please let me know the script, so that it would be helpful for me.
Thanks for the Reply,
Warm Regards,
N.Baskar
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|