<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You need to read the wiki intensively, and also, Internet is a very useful source of information to learn LUA.<div><br><div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" color="#1C00FF">David Ponzone &nbsp;</font><font class="Apple-style-span" color="#000000" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Direction Technique</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">email: <a href="mailto:david.ponzone@ipeva.fr">david.ponzone@ipeva.fr</a></span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">tel: &nbsp; &nbsp; &nbsp;01 74 03 18 97</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">gsm: &nbsp; 06 66 98 76 34</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><br></font></div><div><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'">Service Client<span class="Apple-converted-space">&nbsp;</span></font><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" color="#FF0000">IP</font></font><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'">eva</font></div><div><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; "><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">tel: &nbsp; &nbsp; &nbsp;0811 46 26 26</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'" size="3"><span class="Apple-style-span" style="font-size: 13px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span style="text-decoration: underline; "><a href="BLOCKED::http://www.ipeva.fr/">www.ipeva.fr</a></span><span style="color: rgb(101, 104, 149); ">&nbsp; -&nbsp; &nbsp;<span style="color: rgb(0, 34, 243); text-decoration: underline; "><a href="BLOCKED::http://www.ipeva-studio.com/">www.ipeva-studio.com</a></span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span class="Apple-style-span" style="text-decoration: underline; "><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span class="Apple-style-span"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: justify; font: normal normal normal 10px/normal Arial; color: rgb(192, 192, 192); "><i>Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération.&nbsp;</i><b><i>IPeva</i></b><i>&nbsp;décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.</i></div><div style="text-decoration: underline; text-align: justify; "><font class="Apple-style-span" color="#C0C0C0"><i><br></i></font></div></span></div></span></font></div></span></font></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><div><div>Le 17/12/2010 à 09:07, samir a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">
Hello Nazim,<br><br>When i use originate command it gives me below error :-<br><br>2010-12-17 13:29:30.964039 [ERR] mod_lua.cpp:182 Error in originate expected 4..4 args, got 1<br>stack traceback:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [C]: in function 'originate'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/local/freeswitch/scripts/hello.lua:14: in main chunk<br><br>I am using&nbsp;&nbsp;&nbsp; <br><br>digits = session:getDigits(5, "#", 3000);<br>freeswitch.consoleLog("info", "Got dtmf: ".. digits .."\n");<br>
session.originate("sofia/external/(digits)@<a href="http://192.168.2.3/" target="_top" rel="nofollow" link="external">192.168.2.3</a>");<br><br><br>any idea why is it ?<br><br>Regards<br>Sam<br><br><br><div class="gmail_quote">On Fri, Dec 17, 2010 at 4:17 AM, Nazim Aghabayov [via freeswitch-users] <span dir="ltr">&lt;<a href="x-msg://193/user/SendEmail.jtp?type=node&amp;node=5844718&amp;i=0" target="_top" rel="nofollow">[hidden email]</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">

        Why not using Lua script? Lua is quite powerful and you could benefit of
<br>using the luasql for db connectivity.
<br><br>g_caller_id = session:getVariable("caller_id_number")
<br>g_caller_destination_number = session:getVariable("destination_number")
<br>g_caller_context = session:getVariable("context")
<br>g_caller_uuid = session:getVariable("uuid")
<br>...
<br>session:flushDigits()
<br>digits = session:playAndGetDigits(4, 4, 3, 3000, "#",
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wav_base .. langId .. "/" .. prompt_wav, "",
<br>&nbsp; &nbsp; &nbsp; "[" .. allowed_digit1 .. "," .. allowed_digitN .. "]");
<br>...
<br>session:transfer(tostring(dest_ext), "XML", "public")
<br><br>Regards,
<br>Nazim
<br><br><br>On 12/16/2010 07:29 AM, Sam wrote:
</div><div><div class="im"><div class="shrinkable-quote"><br>&gt; hi,
<br>&gt;
<br>&gt; Its not an XML IVR but trying to collect digits when the user punches in
<br>&gt; some digits after a playback sound file,
<br>&gt; so that the digits would get stored into $(digits) and i can use those
<br>&gt; digits for further processing or transferring
<br>&gt; to other dial-plan as per the digits punched in.
<br>&gt;
<br>&gt; Suppose a digits punched are 4567, I collect them in $(digits) and by
<br>&gt; transfer function i do the transfer.
<br>&gt;
<br>&gt; &lt;action application="transfer" data="$(digits) default XML"/&gt;
<br>&gt;
<br>&gt; -----------------------------------------------------------------------------------------------
<br>&gt;
<br>&gt; Also i could see that in IVR.conf can do this by pressing 4567 and executing
<br>&gt; a statement , but here also question
<br>&gt; is how can i use it by storing those collected digits in an variable and the
<br>&gt; using it further.
<br>&gt;
<br>&gt; ----------------------------------------------------------------------------------------------
<br>&gt;
<br>&gt; I was thinking how in both the cases it could be done.
<br>&gt;
<br>&gt; Thnx &amp; Regds
<br>&gt; Sam
<br>&gt;
<br>&gt;
<br>&gt;
</div></div><div class="im">&gt; On Thu, Dec 16, 2010 at 4:35 AM, Michael Collins &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=5843837&amp;i=0" rel="nofollow" target="_blank" link="external">[hidden email]</a>&gt; wrote:
<br>&gt;
<br>&gt;&gt; Is this an XML IVR?
<br>&gt;&gt; -MC
<br>&gt;&gt;
<br>&gt;&gt;
<br></div><div class="im">&gt;&gt; On Tue, Dec 14, 2010 at 1:43 AM, samir &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=5843837&amp;i=1" rel="nofollow" target="_blank" link="external">[hidden email]</a>&gt; wrote:
<div class="shrinkable-quote"><br>&gt;&gt;
<br>&gt;&gt;&gt; hello,
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Is there any method to collect digits by a variable clause ?
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Suppose i have a ivr playing and user inputs digits , i want to collect
<br>&gt;&gt;&gt; the
<br>&gt;&gt;&gt; dtmf digits and send it to a different application where that digits will
<br>&gt;&gt;&gt; be
<br>&gt;&gt;&gt; used for routing purpose.
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Any ideas !
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Regards
<br>&gt;&gt;&gt; Sam
<br>&gt;&gt;&gt; --
<br>&gt;&gt;&gt; View this message in context:
<br>&gt;&gt;&gt; <a href="http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5833942.html?by-user=t&amp;by-user=t" rel="nofollow" link="external" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5833942.html</a></div>
&gt;&gt;&gt; Sent from the freeswitch-users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; _______________________________________________
<br>&gt;&gt;&gt; FreeSWITCH-users mailing list
<br></div>&gt;&gt;&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=5843837&amp;i=2" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><div class="im">&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;&gt;
<br>&gt;&gt;
<br>&gt;&gt; _______________________________________________
<br>&gt;&gt; FreeSWITCH-users mailing list
<br></div>&gt;&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=5843837&amp;i=3" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><div class="im">&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;
<br>&gt;
<br>&gt; _______________________________________________
<br>&gt; FreeSWITCH-users mailing list
<br></div>&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=5843837&amp;i=4" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><div class="im">&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></div></div><br><br>_______________________________________________
<br>FreeSWITCH-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=5843837&amp;i=5" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><div class="im"><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-tp5833942p5843837.html?by-user=t" target="_blank" rel="nofollow" link="external">http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5843837.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&amp;by-user=t" target="_blank" rel="nofollow" link="external">click here</a>.
        </div></div></blockquote></div><br>

<br><hr align="left" width="300">
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/collecting-dtmf-digits-tp5833942p5844718.html">Re: collecting dtmf digits</a><br>
Sent from the <a href="http://freeswitch-users.2379917.n2.nabble.com/">freeswitch-users mailing list archive</a> at <a href="http://Nabble.com">Nabble.com</a>.<br>
_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></div></body></html>