<br><br><div class="gmail_quote">On Mon, Dec 29, 2008 at 10:45 PM, Baskar <span dir="ltr"><<a href="mailto:yudha2008@gmail.com">yudha2008@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span style="border-collapse: collapse;"><p style="line-height: 150%;"><span style="font-weight: bold;"><span style="color: rgb(204, 102, 0);">Hi</span></span><span style="color: rgb(204, 102, 0);"> </span><span style="line-height: normal;"><span style="font-weight: bold; white-space: nowrap;"><span style="color: rgb(204, 102, 0);">Michael Jerris,</span></span></span></p>
<p style="line-height: 150%;"><span style="line-height: normal;"><span style="color: rgb(204, 0, 96); font-weight: bold; white-space: nowrap;"></span><table style="border-collapse: collapse; width: 100%;">
<tbody><tr><td style="margin: 0px; padding: 4px 8px 0px 0px; font-family: arial,sans-serif; text-align: left; white-space: nowrap; vertical-align: top; width: 100%;">
<span style="font-weight: bold;"><span style="color: rgb(102, 51, 255);">I will explain what i am currently doing :</span></span></td><td style="margin: 0px; padding: 4px 8px 0px 0px; font-family: arial,sans-serif; text-align: left; white-space: nowrap; vertical-align: top; width: 100%;">
<table style="border-collapse: collapse; table-layout: fixed; white-space: nowrap; width: 100%;"><tbody><tr><td style="margin: 0px; padding: 0px; font-family: arial,sans-serif;">
<div style="overflow: hidden; padding-left: 5px; color: rgb(96, 117, 139); vertical-align: top; white-space: nowrap;">I don't understand </div></td></tr></tbody></table></td>
</tr></tbody></table></span></p><p style="line-height: 150%;"><span style="font-weight: bold;">Step </span><span style="font-family: Arial;"><span style="font-weight: bold;">1:</span> <span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">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)</span></span></span><br>
</p><p style="line-height: 150%;"><font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"><span style="font-family: arial;"><span style="font-weight: bold;">Step 2:</span></span> <span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">From the freeswitch console I am executing a javascript file with tone detect like the one below,</span></span></span></font></p>
<p style="line-height: 150%;"><span style="font-weight: bold;">My JavaScript :</span></p><p style="line-height: 150%;"><font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;">session1 = new Session();</span></span><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;"><span style="font-family: arial;"></span></span></span></span></font></p>
<p style="line-height: 150%;"><font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"><span style="font-family: arial;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;">session1.originate(session1,"{ignore_early_media=false}sofia/internal/<a href="mailto:1003@172.20.201.67" target="_blank">1003@172.20.201.67</a>");</span></span></span></span></font></p>
<p><span style="line-height: 19px;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;">session1.execute("tone_detect","busy 480,620 r +30 transfer '1000' 3");</span></span></span><br>
</p></span></blockquote><div>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?<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span style="border-collapse: collapse;"><p><span style="line-height: 19px;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;"></span></span></span></p>
<p><span style="line-height: 19px;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;">session1.execute("bridge", "sofia/default/<a href="mailto:9841799874@172.20.191.228" target="_blank">9841799874@172.20.191.228</a>");</span></span></span></p>
<p><span style="line-height: 19px;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;">session1.execute("transfer", "9841799874");</span></span></span></p>
<p><span style="line-height: 19px;"><span style="color: rgb(102, 0, 204);"><span style="font-weight: bold;">session1.hangup;</span></span></span><br>
</p><div><span style="font-family: Arial; line-height: 19px;"><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);"> In the above script and in step1 the telephone numbers are same; since the script is not detecting that the phone number is busy.</span></span></span><br>
</div><p style="line-height: 150%;"><font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"> </span></font></p><p style="line-height: 150%;"><font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"><span style="font-weight: bold;"><span style="color: rgb(255, 153, 0);">Hi Michael S Collins,</span></span></span></font></p>
<p style="line-height: 150%;"><font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"> <span style="font-weight: bold;"> Please let me know the script, so that it would be helpful for me.</span></span></font></p>
</span></blockquote><div>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.<br>
<br><extension name="record early media"><br> <condition field="destination_number" expression="^82(\d+)$"> <!-- 82 + phone number --><br> <action application="bridge" data="sofia/default/$<a href="mailto:1@172.20.191.228">1@172.20.191.228</a>"/><br>
<!-- we can skip all this early media stuff if the far end answers --><br> <action application="set" data="execute_on_answer=transfer ANSWERCALL XML default"/><br> <action application="sleep" data="100"/><br>
<action application="pre_answer"/><br> <action application="record_session" data="/tmp/${uuid}__1.wav"/><br> <action application="sleep" data="500"/><br>
<!-- If call gets here then probably we're in progress media; get ready to handle various tones --><br> <!-- Look for busy and SIT tones right away, then wait a bit before looking for a ring signal --><br>
<action application="tone_detect" data="BUSY 480,620 r +25000 set BUSY=true"/> <!-- detect busy --><br> <action application="tone_detect" data="SIT1LO 913.8 r +25000 set SIT1LO=true"/> <!--1st segment low --><br>
<!-- ... look for other SIT tones if you need to; snipped from this example --><br> <!-- Now sleep while other end is ringing --><br> <action application="sleep" data="25010"/><br>
<!-- if far end answers then we never get here...--><br> <!-- Use Lua script to check value of BUSY, SIT1LO, etc. --><br> <!-- If !BUSY and !SIT1LO, etc. then call is a no answer --><br> <!-- I use extensions for each scenario, e.g. <br>
<condition field="destination_number" expression="ANSWERCALL"><br> OR<br> <condition field="destination_number" expression="BUSYCALL"><br>
etc.<br> --><br> </condition><br></extension><br><br>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).<br>
<br>Hope this helps!<br>-MC<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span style="border-collapse: collapse;"><p style="line-height: 150%;">
<font size="2" face="Arial"><span style="font-size: 10pt; line-height: 150%; font-family: Arial;"><span style="font-weight: bold;"></span></span></font></p>
<p style="line-height: 150%;"><span style="font-weight: bold;">Thanks for the Reply,</span></p></span><span style="font-weight: bold;"><br>Warm Regards,<br>N.Baskar</span><br>
<br>
<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></blockquote></div><br>