There should be no problem on digit capture on an outgoing call. For example - when I originate a call, I ask the called party, for example, to press 1 to accept the call. This works correctly:<br><br>BLegSession.DtmfReceivedFunction = (d, t) =><br>
{<br> Log.WriteLine(LogLevel.Info, "Received {0} for {1}.", d, t);<br> if (d == confirmationDigit)<br> {<br> confirmed = true;<br>
return "break";<br> }<br><br> return "";<br> };<br><br> while (!confirmed && BLegSession != null && BLegSession.Ready() && BLegSession.mediaReady() && loop <= loops)<br>
{<br> loop++;<br><br> if (!confirmed && BLegSession != null && BLegSession.Ready() && BLegSession.mediaReady())<br> BLegSession.StreamFile("prompts/press-1-to-accept-call-from.wav", 0);<br>
<br> if (!confirmed && BLegSession != null && BLegSession.Ready() && BLegSession.mediaReady())<br> BLegSession.CollectDigits(5000);<br><br> }<br>
<br>If you are not receiving the digits - I would try and bridge the oubound call to an existing call and check that you are getting two way audio - and if you are using inband DTMF - that you can actually hear the digits.<br>
<br>HTH<br><br><br><div class="gmail_quote">On Wed, Mar 10, 2010 at 7:02 AM, Chris <span dir="ltr"><<a href="mailto:freeswitch@gilligan.id.au">freeswitch@gilligan.id.au</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;">
Thanks for the idea i will try that next. I thought i would try to capture the digits like normal first to make sure everything is working right and to test a few event capture methods. What i found was that mod_managed never seemed to capture or read any digits for an out going call. If i pass the call to a different application/dial plan it captures the digits perfectly. I assume audio was working as it played audio to the user to enter digits so i figure i have not configured something correctly but i have not idea what it is. Until i work it out i don't think any event code will work.<div>
<br></div><div>I have no idea what is wrong in this case or even how to debug it.</div><div><br></div><div><font color="#888888">Chris</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Mar 10, 2010 at 1:31 PM, Phillip Jones <span dir="ltr"><<a href="mailto:pjintheusa@gmail.com" target="_blank">pjintheusa@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;">One way might be to create an event loop and listen for DTMF <br><br>public bool Load()<br>
{<br> ThreadPool.QueueUserWorkItem((o) =><br>
{<br> Log.WriteLine(LogLevel.Notice, "Thread Starting. ");<br>
EventConsumer con = new EventConsumer("DTMF", "");<br> while (true)<br> {<br> Event ev = con.pop(1);<br> if (ev != null)<br>
{<br> ... do what ever needs to be done<br> }<br><br> }<br> });<br><br>See <a href="http://wiki.freeswitch.org/wiki/Event_List#DTMF" target="_blank">http://wiki.freeswitch.org/wiki/Event_List#DTMF</a><br>
<br>I am guessing the DTMF is "DTMF" so play around with that if it does not work.<br><br>There are probably better ways.<br><br><br><br><div class="gmail_quote"><div><div></div><div>On Tue, Mar 9, 2010 at 5:27 AM, Chris <span dir="ltr"><<a href="mailto:freeswitch@gilligan.id.au" target="_blank">freeswitch@gilligan.id.au</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>What i need to do is listen on a session before, during and after the session is bridged with another call. I know built into FS is the option to listen for *x where x is 0-9 but i really need more than one digit.<div>
<br>
</div><div>I traced the method that listens for the single digit to the command switch_core_event_hook_add_send_dtmf(session, meta_on_dtmf); in switch_ivr_async.c</div><div><br></div><div>mod_managed also has the following in the native class freeswitch.</div>
<div>public static switch_status_t switch_core_event_hook_add_recv_dtmf(SWIGTYPE_p_switch_core_session session, SWIGTYPE_p_f_p_switch_core_session_p_q_const__switch_dtmf_t_enum_switch_dtmf_direction_t__switch_status_t recv_dtmf)</div>
<div><br></div><div>The problem is i can't work out how to use it. I am fine the the first param for the session but have no idea what i need for the SWIGTYPE_p_f_p_switch_core_session_p_q_const__switch_dtmf_t_enum_switch_dtmf_direction_t__switch_status_t recv_dtmf param.</div>
<div><br></div><div>if anyone can point me in the right direction or knows a better way i would be grateful.</div><div><br></div><font color="#888888"><div>Chris</div>
</font><br></div></div><div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></div></blockquote></div><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></div></div></div>
<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>