[Freeswitch-users] collectInput does not call callback function

Kamen sireeps at gmail.com
Sat May 28 20:48:24 MSD 2011


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-callback-function-tp6414679p6414679.html
Sent from the freeswitch-users mailing list archive at Nabble.com.



More information about the FreeSWITCH-users mailing list