[Freeswitch-users] playAndGetDigits not working?

Michael Collins msc at freeswitch.org
Tue Mar 22 20:20:29 MSK 2011


You may need to do \\d+ instead of \d+ in your expression.
-MC

On Mon, Mar 21, 2011 at 10:46 PM, deniro <ayhkor at gmail.com> wrote:

>
> I am unable to get the pin number and pass it to $digits ($digits comes
> blank)
> appreciate any feedback
> thx
> deniro--
>
>
>
> my($digits)=$session->playAndGetDigits(1,5,1,8000,"#","conference/conf-pin.wav","ivr/ivr-that_was_an_invalid_entry.wav","","^7\d{4}\$");
> or
> my($digits)=$session->playAndGetDigits(1,5,1,8000,"#","conference/conf-pin.wav","ivr/ivr-that_was_an_invalid_entry.wav","",
> "\d+");
> freeswitch::console_log("info", "*Got dtmf: .. $digits ..*\n");
>
> freeswitch console
> 2011-03-22 01:29:26.208664 [INFO] switch_cpp.cpp:1177* Got dtmf: ..  ..
> *2011-03-22 01:29:26.208664 [ERR] mod_perl.c:72 [require
> '/opt/freeswitch/scripts/fs1.pl';]
> /opt/freeswitch/scripts/fs1.pl did not return a true value at (eval 2)
> line 1.
>  each case getting "that was invalid PIN"
> entering pin starting with 7 maximum 5 digits in first case
> or any digits upto maximum 5 digits in second case
> tried also putting "#" at the end when dialing
>
> none worked
>
>
>
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110322/10024c37/attachment.html 


More information about the FreeSWITCH-users mailing list