[Freeswitch-users] collectInput does not call callback function
Kris
kris at livecall.com
Sun May 29 13:18:54 MSD 2011
I experience a similar problem after exiting a conference and continuing my
C# App. Here is how it works. Caller is given options in
Session.StreamFile(play_info[i].filename, (int)start_off);
If he presses lets say '1' Session.DtmfReceivedFunction is called by FS and
caller gets put into a conference. I have conference maintenance events
poped in a separate thread.
He presses '#' and gets back to the the same menu, but now if he presses '1'
or '#'..anything during StreamFile , the Session.DtmfReceivedFunction is no
longer called by FS. Once it goes into Get Digits after StreamFile a press
of the digit is returned ok.
I noticed, if I dont create EventConsumer for the conf maintenace, it works
ok. I need it though to have more control over the conference. It smells
like a bug.
If anyone knows where to look it is probable where a DtmfReceivedFunction
callback during playback should occur if the caller is deleted from the
conference instead of assuming that the dtmf will be reported by
conference:maintenance event.
Kris
----- Original Message -----
From: "Grmt" <garmt.noname at gmail.com>
To: "'FreeSWITCH Users Help'" <freeswitch-users at lists.freeswitch.org>
Sent: Saturday, May 28, 2011 2:18 PM
Subject: Re: [Freeswitch-users] collectInput does not call callback function
> s/"digits"/"dtmf" ?
>
> -----Original Message-----
> From: freeswitch-users-bounces at lists.freeswitch.org
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Kamen
> Sent: Saturday, 28 May, 2011 18:48
> To: freeswitch-users at lists.freeswitch.org
> Subject: [Freeswitch-users] collectInput does not call callback function
>
> Hi folks!
>
> I seem to have an odd problem, since it works for all others. From my
> java
> script I try to collect user input:
>
> session.collectInput( mycb, "digits", 7000, 0);
>
> where mycb is a regular function collecting user input:
>
>
> function mycb( session, type, obj, arg )
> {
> console_log( "info", "collect digits \n" );
> try {
> if ( type == "digits" ) {
> console_log( "info", "digit: "+obj.digit+"\n" );
> if ( obj.digit == "#" ) {
> console_log( "info", "detected pound sign.\n" );
> exit = true;
> return( false );
> }
>
> dtmf.digits += obj.digit;
>
> if ( dtmf.digits.length >= digitmaxlength ) {
> exit = true;
> return( false );
> }
> }
> } catch (e) {
> console_log( "err", e+"\n" );
> }
> return( true );
> } //end function mycb
>
>
> The very first line is a console info message, so I would know the
> function
> is actually called. It never happens. Right before collectInput call I
> have
> a message playing a prompt, which I can hear. So workflow definitely goes
> into the collectInput function, and then after 7 seconds it continues with
> dtmf.digits.length=0 even though I punched in the numbers, of course.
> Thats
> another proof the callback function never was called.
>
> Has anyone experienced this problem before? I run FS in Windows.
> Appreciate
> your help.
>
> Regards,
>
> Sergei Kamen
>
>
>
> --
> View this message in context:
> http://freeswitch-users.2379917.n2.nabble.com/collectInput-does-not-call-cal
> lback-function-tp6414679p6414679.html
> Sent from the freeswitch-users mailing list archive at Nabble.com.
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
>
More information about the FreeSWITCH-users
mailing list