If i a get a hangup cause into some variable then i can do some routing depending upon that hangup-cause, <br><br>if (session:ready()) then<br>    session:streamFile(&quot;/usr/local/freeswitch/sounds/en/us/callie/zrtp/8000/zrtp-somethings_wrong.wav&quot;)<br>
    <br>    disposition = session:getVariable(&quot;hangup_cause&quot;)<br>    freeswitch.consoleLog(&quot;info&quot;,&quot;Hangup cause = &quot; .. disposition .. &quot;\n&quot;)<br>    disposition = session:hangupCause()<br>
    freeswitch.consoleLog(&quot;info&quot;,&quot;Hangup cause = &quot; .. disposition .. &quot;\n&quot;)<br><br>then using the &quot;disposition&quot; i can do the routing by if ... then ...<br><br>after executing getting below logs :-<br>
<br>2010-12-18 10:34:55.581403 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/hello.lua:29: attempt to concatenate global &#39;disposition&#39; (a nil value)<br>stack traceback:<br>        /usr/local/freeswitch/scripts/hello.lua:29: in main chunk<br>
<br><br>Regds<br>Sam<br><br><div class="gmail_quote">On Sat, Dec 18, 2010 at 6:26 AM, mercutioviz [via freeswitch-users] <span dir="ltr">&lt;<a href="mailto:ml-node%2B5847277-1438596481-292429@n2.nabble.com">ml-node+5847277-1438596481-292429@n2.nabble.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">

        It depends on what you want to do with the call in the case that the other end does not answer. If you are doing some sort of billing then STOP! Don&#39;t do that. Do your billing offline via CDRs or use api_hangup_hook.<div>

<br></div><div>If you just want to send the call to an alternate destination then you need to look at the bridge app on the wiki, specifically for doing pipe-separated lists of dialstrings:</div><div><a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge#Description" rel="nofollow" link="external" target="_blank">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge#Description</a></div>

<div><br></div></div><div>-MC<br><br><div class="gmail_quote"><div class="im">On Fri, Dec 17, 2010 at 2:17 AM, Sam <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=0" rel="nofollow" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;"><div class="im">
Thanx Nazim it was of great help,<br><br>i used the below syntax <br><br></div>session:execute(&quot;bridge&quot;,(string.format(&quot;{ignore_early_media=&#39;true&#39;,continue_on_fail=&#39;true&#39;}sofia/external/%<a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=1" rel="nofollow" target="_blank">[hidden email]</a>&quot;,tostring(digits) )) ) ;<div class="im">
<br>

<br>I am now checking out if i can use hangup causes for routing the call <br><br>LCause = session:hangupCause() ;<br>    <br>freeswitch.consoleLog(&quot;info&quot;, &quot;hangupcause: &quot;.. LCause ..&quot; );<br><br>

then if i can use if then else statement for routing ... like <br>
<br>if ( LCause == &quot;NO_USER_RESPONSE&quot; ) then              <br>       session:transfer(tostring(digits), &quot;XML&quot;, &quot;8888&quot;)<br><br>how is the idea ?<br><br>Regds</div><div><div></div><div><br>
<br><br><br><div class="gmail_quote"><div class="im">
On Fri, Dec 17, 2010 at 2:39 PM, Nazim Aghabayov <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=2" rel="nofollow" target="_blank">[hidden email]</a>&gt;</span> wrote:<br></div><blockquote class="gmail_quote" style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;">
<div class="im">

Hello! You may try something like:<br>
<br>
 session:execute(&quot;bridge&quot;,<br>
                            (string.format(&quot;{ignore_early_media=&#39;true&#39;,<br>
ringback=&#39;home/app/sounds/ringback-alaw.wav&#39;,<br>
transfer_ringback=&#39;/home/app/sounds/ringback-alaw.wav&#39;,<br>
hangup_after_bridge=&#39;true&#39;,<br></div>
continue_on_fail=&#39;true&#39;}<a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=3" rel="nofollow" target="_blank">[hidden email]</a>&quot;,<div class="im"><br>
                                           tostring(did) )) )<br>
<br>
There are a lot of nice examples in lua&amp;dialplan wiki pages.<br>
</div><div><div></div><div><div class="im"><br>
On 12/17/2010 12:24 PM, David Ponzone wrote:<br>
&gt; You need to read the wiki intensively, and also, Internet is a very useful source of information to learn LUA.<br>
&gt;<br>
&gt; David Ponzone  Direction Technique<br></div>
&gt; email: <a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=4" rel="nofollow" target="_blank">[hidden email]</a><div><div></div><div class="h5"><br>
&gt; tel:      01 74 03 18 97<br>
&gt; gsm:   06 66 98 76 34<br>
&gt;<br>
&gt; Service Client IPeva<br>
&gt; tel:      0811 46 26 26<br>
&gt; <a href="http://www.ipeva.fr" rel="nofollow" link="external" target="_blank">www.ipeva.fr</a>  -   <a href="http://www.ipeva-studio.com" rel="nofollow" link="external" target="_blank">www.ipeva-studio.com</a><br>
&gt;<br>
&gt; Ce message et toutes les pièces jointes sont confidentiels et établis à l&#39;intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d&#39;altération. IPeva décline toute responsabilité au titre de ce message s&#39;il a été altéré, déformé ou falsifié. Si vous n&#39;êtes pas destinataire de ce message, merci de le détruire immédiatement et d&#39;avertir l&#39;expéditeur.<br>



&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Le 17/12/2010 à 09:07, samir a écrit :<br>
&gt;<br>
&gt;&gt; Hello Nazim,<br>
&gt;&gt;<br>
&gt;&gt; When i use originate command it gives me below error :-<br>
&gt;&gt;<br>
&gt;&gt; 2010-12-17 13:29:30.964039 [ERR] mod_lua.cpp:182 Error in originate expected 4..4 args, got 1<br>
&gt;&gt; stack traceback:<br>
&gt;&gt;         [C]: in function &#39;originate&#39;<br>
&gt;&gt;         /usr/local/freeswitch/scripts/hello.lua:14: in main chunk<br>
&gt;&gt;<br>
&gt;&gt; I am using<br>
&gt;&gt;<br>
&gt;&gt; digits = session:getDigits(5, &quot;#&quot;, 3000);<br>
&gt;&gt; freeswitch.consoleLog(&quot;info&quot;, &quot;Got dtmf: &quot;.. digits ..&quot;\n&quot;);<br>
&gt;&gt; session.originate(&quot;sofia/external/(digits)@<a href="http://192.168.2.3" rel="nofollow" link="external" target="_blank">192.168.2.3</a>&quot;);<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; any idea why is it ?<br>
&gt;&gt;<br>
&gt;&gt; Regards<br>
&gt;&gt; Sam<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Dec 17, 2010 at 4:17 AM, Nazim Aghabayov [via freeswitch-users] &lt;[hidden email]&gt; wrote:<br>
&gt;&gt; Why not using Lua script? Lua is quite powerful and you could benefit of<br>
&gt;&gt; using the luasql for db connectivity.<br>
&gt;&gt;<br>
&gt;&gt; g_caller_id = session:getVariable(&quot;caller_id_number&quot;)<br>
&gt;&gt; g_caller_destination_number = session:getVariable(&quot;destination_number&quot;)<br>
&gt;&gt; g_caller_context = session:getVariable(&quot;context&quot;)<br>
&gt;&gt; g_caller_uuid = session:getVariable(&quot;uuid&quot;)<br>
&gt;&gt; ...<br>
&gt;&gt; session:flushDigits()<br>
&gt;&gt; digits = session:playAndGetDigits(4, 4, 3, 3000, &quot;#&quot;,<br>
&gt;&gt;               wav_base .. langId .. &quot;/&quot; .. prompt_wav, &quot;&quot;,<br>
&gt;&gt;       &quot;[&quot; .. allowed_digit1 .. &quot;,&quot; .. allowed_digitN .. &quot;]&quot;);<br>
&gt;&gt; ...<br>
&gt;&gt; session:transfer(tostring(dest_ext), &quot;XML&quot;, &quot;public&quot;)<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Nazim<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 12/16/2010 07:29 AM, Sam wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Its not an XML IVR but trying to collect digits when the user punches in<br>
&gt;&gt;&gt; some digits after a playback sound file,<br>
&gt;&gt;&gt; so that the digits would get stored into $(digits) and i can use those<br>
&gt;&gt;&gt; digits for further processing or transferring<br>
&gt;&gt;&gt; to other dial-plan as per the digits punched in.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Suppose a digits punched are 4567, I collect them in $(digits) and by<br>
&gt;&gt;&gt; transfer function i do the transfer.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &lt;action application=&quot;transfer&quot; data=&quot;$(digits) default XML&quot;/&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; -----------------------------------------------------------------------------------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Also i could see that in IVR.conf can do this by pressing 4567 and executing<br>
&gt;&gt;&gt; a statement , but here also question<br>
&gt;&gt;&gt; is how can i use it by storing those collected digits in an variable and the<br>
&gt;&gt;&gt; using it further.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ----------------------------------------------------------------------------------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I was thinking how in both the cases it could be done.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thnx &amp; Regds<br>
&gt;&gt;&gt; Sam<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Thu, Dec 16, 2010 at 4:35 AM, Michael Collins &lt;[hidden email]&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Is this an XML IVR?<br>
&gt;&gt;&gt;&gt; -MC<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Tue, Dec 14, 2010 at 1:43 AM, samir &lt;[hidden email]&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt; hello,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Is there any method to collect digits by a variable clause ?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Suppose i have a ivr playing and user inputs digits , i want to collect<br>
&gt;&gt;&gt;&gt;&gt; the<br>
&gt;&gt;&gt;&gt;&gt; dtmf digits and send it to a different application where that digits will<br>
&gt;&gt;&gt;&gt;&gt; be<br>
&gt;&gt;&gt;&gt;&gt; used for routing purpose.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Any ideas !<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Regards<br>
&gt;&gt;&gt;&gt;&gt; Sam<br>
&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt; View this message in context:<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5833942.html?by-user=t" rel="nofollow" link="external" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5833942.html</a><br>



&gt;&gt;&gt;&gt;&gt; Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt;&gt;&gt;&gt; [hidden email]<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt;&gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt;&gt;&gt; [hidden email]<br>
&gt;&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt;&gt; <a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt;&gt; [hidden email]<br>
&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" 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" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt; <a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt; [hidden email]<br>
&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; <a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; View message @ <a href="http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5843837.html?by-user=t" rel="nofollow" link="external" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5843837.html</a><br>



&gt;&gt;<br>
&gt;&gt; To unsubscribe from collecting dtmf digits, click here.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; View this message in context: Re: collecting dtmf digits<br>
&gt;&gt; Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=5" rel="nofollow" target="_blank">[hidden email]</a><br>
&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; <a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=6" rel="nofollow" target="_blank">[hidden email]</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=7" rel="nofollow" target="_blank">[hidden email]</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
</div></div></div></div></blockquote></div><br>
</div></div><div><div></div><div class="h5"><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=8" rel="nofollow" target="_blank">[hidden email]</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
<br></div></div></blockquote></div><br></div>
<br>_______________________________________________
<br><div class="im">FreeSWITCH-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=5847277&amp;i=9" rel="nofollow" target="_blank">[hidden email]</a>
<br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="nofollow" link="external" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="nofollow" link="external" target="_blank">http://www.freeswitch.org</a><br>
        <br>
        <br>
        <hr color="#cccccc" noshade size="1">
        </div><div style="color: rgb(102, 102, 102); font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
                View message @ <a href="http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5847277.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5847277.html</a><div class="im">
<br>
                
                To unsubscribe from collecting dtmf digits, <a href="http://freeswitch-users.2379917.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&amp;node=5833942&amp;code=dTJuc2FtQGdtYWlsLmNvbXw1ODMzOTQyfC0xMTk1MzYwMDk5" target="_blank">click here</a>.
        </div></div></blockquote></div><br>