[Freeswitch-users] how to start dtmf timeout countdown after last digit in javascript
Brian West
brian at freeswitch.org
Tue Dec 8 19:59:14 MSK 2015
Why aren't you using the "read" application to just do all this mess for
you?
On Tue, Dec 8, 2015 at 8:56 AM, Shabbir abbasi <shabbirabbasi92 at gmail.com>
wrote:
> i am trying to make an javascripot ivr and collecting user input ,
> but during collection session.collectInput( mycb, dtmf, timeout );
> gets timeout and returns
>
>
>
> function mycb( session, type, obj, arg ) {
> try {
> if ( type == "dtmf" ) {
> 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 collect_user_input
>
>
>
>
> i want that timeout gets started countdown after last digit pressed
> how to solve this ?
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.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
>
--
*Brian West*
brian at freeswitch.org
*Twitter: @FreeSWITCH , @briankwest*
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit:
/r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
*iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151208/27f84da8/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list