VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
keith.wood2000 at gmai... Guest
|
Posted: Thu Oct 16, 2008 11:30 pm Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Hi,
I am finding some problems when using PlayAndGetDigits within lua. As seen in the log below, I set the retry count to '3' and valid digit to be 1,2,3, or 5. I pressed 9 for every retry attempt, and found that Freeswitch actually let me retry for more than 3 times. Moreover, Freeswitch reports DTMF of 99 is received even though I only pressed 9. At the end, it reports 99 as the final result.
Does anyone know if this is a config problem or a bug?
Thanks,
Keith
2008-10-17 20:07:20 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [test9] destination_number(rule) =~ /(.*)/
2008-10-17 20:07:20 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute answer()
start ivr
2008-10-17 20:07:20 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute lua(run_ivr.lua 1 1 3 3000 # /audio/admin_menu.wav /audio/invalid_input.wav 1|2|3|5 admin_selection )
2008-10-17 20:07:20 [DEBUG] switch_ivr_play_say.c:1455 switch_play_and_get_digits() switch_play_and_get_digits(session, 1, 1, 3, 3000, #*, /audio/admin_menu.wav, /audio/invalid_input.wav, digit_buffer, 512, 1|2|3|5)
2008-10-17 20:07:20 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:20 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:21 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:21 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-17 20:07:21 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|5] on [9]
2008-10-17 20:07:21 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-17 20:07:21 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:21 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:25 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:25 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 3
2008-10-17 20:07:25 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|5] on [99]
2008-10-17 20:07:25 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-17 20:07:25 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:25 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:30 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:30 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:30 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:30 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:30 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-17 20:07:30 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|5] on [9]
2008-10-17 20:07:30 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-17 20:07:30 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:30 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:34 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:34 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 2
2008-10-17 20:07:35 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|5] on [99]
2008-10-17 20:07:35 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-17 20:07:35 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:35 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:38 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered nine
2008-10-17 20:07:39 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:39 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:39 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:39 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:39 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-17 20:07:39 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|5] on [9]
2008-10-17 20:07:39 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-17 20:07:39 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:39 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
2008-10-17 20:07:43 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-17 20:07:43 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 1
2008-10-17 20:07:45 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|5] on [99]
2008-10-17 20:07:45 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-17 20:07:45 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 20ms
2008-10-17 20:07:45 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/2001@192.168.1.101 (2001@192.168.1.101) [BREAK]
digit=99 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Fri Oct 17, 2008 3:31 am Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Does this happen to be inband? And the regexp is what is used to tell
what is valid vs invalid. You put in (.*) where I think you wanted
([1235])
/b
On Oct 16, 2008, at 9:19 PM, Keith Wood wrote:
Quote: | Hi,
I am finding some problems when using PlayAndGetDigits within lua.
As seen in the log below, I set the retry count to '3' and valid
digit to be 1,2,3, or 5. I pressed 9 for every retry attempt, and
found that Freeswitch actually let me retry for more than 3 times.
Moreover, Freeswitch reports DTMF of 99 is received even though I
only pressed 9. At the end, it reports 99 as the final result.
Does anyone know if this is a config problem or a bug?
Thanks,
Keith
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
keith.wood2000 at gmai... Guest
|
Posted: Fri Oct 17, 2008 7:11 am Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Hi Brian,
Yes, it is inband. In my lua script, I used 1|2|3|5 instead of (.*). In the log, it is shown that:
lua(run_ivr.lua 1 1 3 3000 # /audio/admin_menu.wav /audio/invalid_input.wav 1|2|3|5 admin_selection )
Any suggestion on how to fix this?
Also, I am trying to find a way to extract the specific terminator that the user enters. Is it possible to do within the scope of Freeswitch?
Thanks,
Keith
On Fri, Oct 17, 2008 at 4:24 PM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote: | Does this happen to be inband? And the regexp is what is used to tell
what is valid vs invalid. You put in (.*) where I think you wanted
([1235])
/b
On Oct 16, 2008, at 9:19 PM, Keith Wood wrote:
Quote: | Hi,
I am finding some problems when using PlayAndGetDigits within lua.
As seen in the log below, I set the retry count to '3' and valid
digit to be 1,2,3, or 5. I pressed 9 for every retry attempt, and
found that Freeswitch actually let me retry for more than 3 times.
Moreover, Freeswitch reports DTMF of 99 is received even though I
only pressed 9. At the end, it reports 99 as the final result.
Does anyone know if this is a config problem or a bug?
Thanks,
Keith
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Fri Oct 17, 2008 9:20 am Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Can you show me the script?
/b
On Oct 17, 2008, at 5:01 AM, Keith Wood wrote:
Quote: | Hi Brian,
Yes, it is inband. In my lua script, I used 1|2|3|5 instead of (.*). In the log, it is shown that:
lua(run_ivr.lua 1 1 3 3000 # /audio/admin_menu.wav /audio/invalid_input.wav 1|2|3|5 admin_selection )
Any suggestion on how to fix this?
Also, I am trying to find a way to extract the specific terminator that the user enters. Is it possible to do within the scope of Freeswitch?
Thanks,
Keith
|
|
|
Back to top |
|
|
keith.wood2000 at gmai... Guest
|
Posted: Sat Oct 18, 2008 4:21 am Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Hi Brian,
Here is the script:
digits = session:playAndGetDigits(1, 1, 3, 3000, #*, /audio/admin_menu.wav , /audio/invalid_input.wav ,1|2|3|5 )
I basically copied from the wiki.
Thanks,
Keith
On Fri, Oct 17, 2008 at 10:08 PM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
|
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Mon Oct 20, 2008 2:11 pm Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Keith, I tried something like this and it worked fine.
digits = session:playAndGetDigits(1, 1, 3, 3000, "#*", "/tmp/sr8k.wav", "/tmp/test.wav", "1|2|3|5")
Can you verify this?
/b
On Oct 18, 2008, at 4:14 AM, Keith Wood wrote:
Quote: | Hi Brian,
Here is the script:
digits = session:playAndGetDigits(1, 1, 3, 3000, #*, /audio/admin_menu.wav , /audio/invalid_input.wav ,1|2|3|5 )
I basically copied from the wiki.
Thanks,
Keith
|
|
|
Back to top |
|
|
keith.wood2000 at gmai... Guest
|
Posted: Fri Oct 24, 2008 5:23 am Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Hi Brian,
It is quite strange that I don't get the same result as you do. Here is my lua script:
print ("start ivr")
digits = session:playAndGetDigits(1, 1, 3, 3000, "#", "/admin_menu.wav",
"/invalid_input.wav","1|2|3|4|5")
print("digit="..digits)
As shown in the log belows, Freeswitch would pompt for 6 times before it fails off. Another problem I am seeing is that after I pressed the "invalid" key for 2 times, Freeswitch would play both admin_menu.wav and invalid_input.wav. For the rest of the cases, Freeswitch plays only invalid_input.wav when an invalid input, such as 9, is entered.
Keith
Here is the log:
2008-10-25 01:53:56 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [test9] destination_number(rule) =~ /(.*)/
2008-10-25 01:53:56 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute answer()
2008-10-25 01:53:56 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute lua(testivr.lua)
2008-10-25 01:53:56 [DEBUG] switch_ivr_play_say.c:1455 switch_play_and_get_digits() switch_play_and_get_digits(session, 1, 1, 3, 3000, #, /admin_menu.wav, /invalid_input.wav, digit_buffer, 512, 1|2|3|4|5)
===Received event=CHANNEL_EXECUTE
===Received event=CHANNEL_EXECUTE_COMPLETE
===Received event=CHANNEL_EXECUTE
2008-10-25 01:53:56 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:53:56 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [9]
2008-10-25 01:54:00 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
===Received event=DTMF
===Received event=CODEC
2008-10-25 01:54:00 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
2008-10-25 01:54:04 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:04 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 3
===Received event=CODEC
2008-10-25 01:54:05 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [99]
2008-10-25 01:54:05 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:05 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:05 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
2008-10-25 01:54:09 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
===Received event=CODEC
2008-10-25 01:54:09 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:09 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=HEARTBEAT
===Received event=RE_SCHEDULE
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [9]
2008-10-25 01:54:12 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:12 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
===Received event=CODEC
2008-10-25 01:54:16 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:16 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 2
===Received event=CODEC
2008-10-25 01:54:19 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [99]
2008-10-25 01:54:19 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:19 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:19 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
2008-10-25 01:54:23 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:23 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:23 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=CODEC
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [9]
2008-10-25 01:54:26 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:26 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
===Received event=CODEC
2008-10-25 01:54:27 [DEBUG] sofia.c:200 sofia_event_callback() event [nua_i_outbound] status [102][NAT binding changed] session: n/a
2008-10-25 01:54:27 [DEBUG] sofia.c:332 sofia_event_callback() nua_i_outbound: unknown event 8: 102 NAT binding changed
2008-10-25 01:54:28 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered nine
2008-10-25 01:54:30 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:30 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 1
===Received event=CODEC
===Received event=HEARTBEAT
===Received event=RE_SCHEDULE
2008-10-25 01:54:31 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [99]
2008-10-25 01:54:31 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:31 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:31 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
digit=99
2008-10-25 01:54:36 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:36 [DEBUG] switch_cpp.cpp:738 playAndGetDigits() playAndGetDigits dtmf_buf: 99
On Tue, Oct 21, 2008 at 2:04 AM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Keith,
I tried something like this and it worked fine.
digits = session:playAndGetDigits(1, 1, 3, 3000, "#*", "/tmp/sr8k.wav", "/tmp/test.wav", "1|2|3|5")
Can you verify this?
/b
On Oct 18, 2008, at 4:14 AM, Keith Wood wrote:
Quote: | Hi Brian,
Here is the script:
digits = session:playAndGetDigits(1, 1, 3, 3000, #*, /audio/admin_menu.wav , /audio/invalid_input.wav ,1|2|3|5 )
I basically copied from the wiki.
Thanks,
Keith
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
keith.wood2000 at gmai... Guest
|
Posted: Sun Oct 26, 2008 11:20 am Post subject: [Freeswitch-users] Problem with PlayAndGetDigits |
|
|
Hi Brian,
Please see if you notice anything wrong with the way I pass parameters to playAndGetDigits? I think the failure check works work for "no/empty entry" but not for "invalid entry".
Thanks,
Keith
On Fri, Oct 24, 2008 at 6:10 PM, Keith Wood <keith.wood2000@gmail.com (keith.wood2000@gmail.com)> wrote:
Quote: | Hi Brian,
It is quite strange that I don't get the same result as you do. Here is my lua script:
print ("start ivr")
digits = session:playAndGetDigits(1, 1, 3, 3000, "#", "/admin_menu.wav",
"/invalid_input.wav","1|2|3|4|5")
print("digit="..digits)
As shown in the log belows, Freeswitch would pompt for 6 times before it fails off. Another problem I am seeing is that after I pressed the "invalid" key for 2 times, Freeswitch would play both admin_menu.wav and invalid_input.wav. For the rest of the cases, Freeswitch plays only invalid_input.wav when an invalid input, such as 9, is entered.
Keith
Here is the log:
2008-10-25 01:53:56 [DEBUG] mod_dialplan_xml.c:117 parse_exten() Regex: [test9] destination_number(rule) =~ /(.*)/
2008-10-25 01:53:56 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute answer()
2008-10-25 01:53:56 [NOTICE] switch_core_session.c:1219 switch_core_session_execute_exten() Execute lua(testivr.lua)
2008-10-25 01:53:56 [DEBUG] switch_ivr_play_say.c:1455 switch_play_and_get_digits() switch_play_and_get_digits(session, 1, 1, 3, 3000, #, /admin_menu.wav, /invalid_input.wav, digit_buffer, 512, 1|2|3|4|5)
===Received event=CHANNEL_EXECUTE
===Received event=CHANNEL_EXECUTE_COMPLETE
===Received event=CHANNEL_EXECUTE
2008-10-25 01:53:56 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:53:56 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [9]
2008-10-25 01:54:00 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:00 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
===Received event=DTMF
===Received event=CODEC
2008-10-25 01:54:00 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
2008-10-25 01:54:04 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:04 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 3
===Received event=CODEC
2008-10-25 01:54:05 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [99]
2008-10-25 01:54:05 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:05 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:05 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
2008-10-25 01:54:09 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
===Received event=CODEC
2008-10-25 01:54:09 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:09 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=HEARTBEAT
===Received event=RE_SCHEDULE
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [9]
2008-10-25 01:54:12 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:12 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:12 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
===Received event=CODEC
2008-10-25 01:54:16 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:16 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 2
===Received event=CODEC
2008-10-25 01:54:19 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [99]
2008-10-25 01:54:19 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:19 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:19 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
2008-10-25 01:54:23 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:23 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:23 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=CODEC
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:1473 switch_play_and_get_digits() play gave up 9
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:1483 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [9]
2008-10-25 01:54:26 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:26 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:26 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
===Received event=CODEC
2008-10-25 01:54:27 [DEBUG] sofia.c:200 sofia_event_callback() event [nua_i_outbound] status [102][NAT binding changed] session: n/a
2008-10-25 01:54:27 [DEBUG] sofia.c:332 sofia_event_callback() nua_i_outbound: unknown event 8: 102 NAT binding changed
2008-10-25 01:54:28 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered nine
2008-10-25 01:54:30 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:30 [DEBUG] switch_ivr_play_say.c:1507 switch_play_and_get_digits() Calling more digits try 1
===Received event=CODEC
===Received event=HEARTBEAT
===Received event=RE_SCHEDULE
2008-10-25 01:54:31 [DEBUG] switch_ivr_play_say.c:1524 switch_play_and_get_digits() Checking regex [1|2|3|4|5] on [99]
2008-10-25 01:54:31 [DEBUG] switch_regex.c:198 switch_regex_match() number of matches: -1
2008-10-25 01:54:31 [DEBUG] switch_ivr_play_say.c:928 switch_ivr_play_file() Codec Activated L16@8000hz 1 channels 30ms
2008-10-25 01:54:31 [DEBUG] switch_core_session.c:435 switch_core_session_receive_message() Kill sofia/internal/5454@192.168.1.101 (5454@192.168.1.101) [BREAK]
===Received event=DTMF
digit=99
2008-10-25 01:54:36 [DEBUG] switch_ivr_play_say.c:1218 switch_ivr_play_file() done playing file
2008-10-25 01:54:36 [DEBUG] switch_cpp.cpp:738 playAndGetDigits() playAndGetDigits dtmf_buf: 99
On Tue, Oct 21, 2008 at 2:04 AM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Keith,
I tried something like this and it worked fine.
digits = session:playAndGetDigits(1, 1, 3, 3000, "#*", "/tmp/sr8k.wav", "/tmp/test.wav", "1|2|3|5")
Can you verify this?
/b
On Oct 18, 2008, at 4:14 AM, Keith Wood wrote:
Quote: | Hi Brian,
Here is the script:
digits = session:playAndGetDigits(1, 1, 3, 3000, #*, /audio/admin_menu.wav , /audio/invalid_input.wav ,1|2|3|5 )
I basically copied from the wiki.
Thanks,
Keith
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|