[Voiceglue] Issue with <catch> tag.
Emiliano Esposito
emiespo at tiscali.it
Wed Apr 1 06:25:20 EDT 2009
I'm trying to add a quit event, in such a manner that requires the user
to confirm, having the <catch> involved.
Sometimes it works, other (most) it won't, so I'm asking why.
This is the code I put into the root document:
<link event="myapp.exit">
<grammar version="1.0"
xmlns="http://www.w3.org/2001/06/grammar"
root="goout" mode="dtmf"
tag-format="swi-semantics/1.0">
<rule id="goout">
<one-of>
<item>1</item>
</one-of>
</rule>
</grammar>
</link>
<!-- exit event -->
<catch count="1" event="myapp.exit">
<prompt>Press 1 again to exit.</prompt>
<log>******* LOG: one pressed</log>
</catch>
<!-- confirm -->
<catch count="2" event="myapp.exit">
<prompt>Goodbye.</prompt>
<log>******* LOG: exit confirmed </log>
<disconnect />
</catch>
The dynlog output follows, in that case the call was suddenly
interrupted as soon as the first "1" was pressed, no catching of events
happened nor final prompt was played.
I noticed there's a sudden death of VXML interpreter soon after the
recognition and releasing of grammars.
Thank you for reading.
12:07:55:465 DBUG -17VOICEGLU tatooine rcv ctsrv: "gotdig 28 0 \"\" 2
1\n"
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] parsed gotdig
callid=28 status=0 msg="" digits="1"
reason=max-digits
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] dpal():
do_prompt_and_listen()
called
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] dpal(): DTMFs
received = "1", trying to match against 4 active
grammar(s)
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] dpal():
checvk_rules_match returns 2 = full match with no further
possible
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] dpal(): DTMFs
matched, sending
result
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] dpal() Data
Cleared
12:07:55:465 DBUG -17VOICEGLU tatooine callid=[28] snd Recognized 0
<?xml version='1.0'?> <result> <interpretation grammar="0x9ad3da8"
confidence="100"> <input mode="dtmf">1</input> <instance></instance>
</interpretation> </result> to VXML interpreter on fh="::PERL_VXML_28"
at host=localhost
callid=[28]
12:07:55:465 DBUG -17VOICEGLU tatooine snd "Recognized 0 <?xml
version=\'1.0\'?> <result> <interpretation grammar=\"0x9ad3da8\"
confidence=\"100\"> <input mode=\"dtmf\">1</input> <instance></instance>
</interpretation> </result>\n" to
::PERL_VXML_28
12:07:55:466 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"GetLineStatus\n"
12:07:55:469 DBUG -17VOICEGLU tatooine callid=[28] snd LineStatus 1 to
VXML interpreter on fh="::PERL_VXML_28" at host=localhost callid=[28]
12:07:55:469 DBUG -17VOICEGLU tatooine snd "LineStatus 1\n" to
::PERL_VXML_28
12:07:55:471 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg: Recognized 0
<?xml version='1.0'?> <result> <interpretation grammar="0x9ad3da8"
confidence="100"> <input mode="dtmf">1</input> <instance></instance>
</interpretation>
</result>
12:07:55:471 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
GetLineStatus
12:07:55:471 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"DeactivateGrammar
0x9adcdc8\n"
12:07:55:471 DBUG -17VOICEGLU tatooine callid=[28] DeactivateGrammar
0x9adcdc8 done
12:07:55:471 DBUG -17VOICEGLU tatooine callid=[28] snd 0 to VXML
interpreter on fh="::PERL_VXML_28" at host=localhost
callid=[28]
12:07:55:471 DBUG -17VOICEGLU tatooine snd "0\n" to
::PERL_VXML_28
12:07:55:473 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg: LineStatus
1
12:07:55:473 DBUG -17OPEN_VXI tatooine callid=[28] LineStatus is
CONNECTED
12:07:55:473 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
DeactivateGrammar
0x9adcdc8
12:07:55:473 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"DeactivateGrammar
0x9ad3c00\n"
12:07:55:473 DBUG -17VOICEGLU tatooine callid=[28] DeactivateGrammar
0x9ad3c00 done
12:07:55:473 DBUG -17VOICEGLU tatooine callid=[28] snd 0 to VXML
interpreter on fh="::PERL_VXML_28" at host=localhost
callid=[28]
12:07:55:473 DBUG -17VOICEGLU tatooine snd "0\n" to
::PERL_VXML_28
12:07:55:475 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg:
0
12:07:55:475 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
DeactivateGrammar
0x9ad3c00
12:07:55:475 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"DeactivateGrammar
0x9b14630\n"
12:07:55:475 DBUG -17VOICEGLU tatooine callid=[28] DeactivateGrammar
0x9b14630 done
12:07:55:475 DBUG -17VOICEGLU tatooine callid=[28] snd 0 to VXML
interpreter on fh="::PERL_VXML_28" at host=localhost
callid=[28]
12:07:55:475 DBUG -17VOICEGLU tatooine snd "0\n" to
::PERL_VXML_28
12:07:55:476 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg:
0
12:07:55:476 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
DeactivateGrammar
0x9b14630
12:07:55:476 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"DeactivateGrammar
0x9ad3da8\n"
12:07:55:477 DBUG -17VOICEGLU tatooine callid=[28] DeactivateGrammar
0x9ad3da8 done
12:07:55:477 DBUG -17VOICEGLU tatooine callid=[28] snd 0 to VXML
interpreter on fh="::PERL_VXML_28" at host=localhost
callid=[28]
12:07:55:477 DBUG -17VOICEGLU tatooine snd "0\n" to
::PERL_VXML_28
12:07:55:479 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg:
0
12:07:55:479 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
DeactivateGrammar
0x9ad3da8
12:07:55:480 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"Play\n"
12:07:55:480 DBUG -17VOICEGLU tatooine callid=[28] snd Played to VXML
interpreter on fh="::PERL_VXML_28" at host=localhost callid=[28]
12:07:55:480 DBUG -17VOICEGLU tatooine snd "Played\n" to
::PERL_VXML_28
12:07:55:485 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg:
0
12:07:55:485 DBUG -17OPEN_VXI tatooine callid=[28]
VXIpromptPlay()
12:07:55:485 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
Play
12:07:55:485 DBUG -17VOICEGLU tatooine callid=[28] rcv ovxi:
"Wait\n"
12:07:55:485 DBUG -17VOICEGLU tatooine callid=[28] snd Waited to VXML
interpreter on fh="::PERL_VXML_28" at host=localhost callid=[28]
12:07:55:485 DBUG -17VOICEGLU tatooine snd "Waited\n" to
::PERL_VXML_28
12:07:55:496 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg:
Played
12:07:55:496 DBUG -17OPEN_VXI tatooine callid=[28]
VXIpromptWait()
12:07:55:496 DBUG -17OPEN_VXI tatooine callid=[28] snd vg:
Wait
12:07:55:496 INFO VOICEGLU tatooine VXML interpreter filehandle
"::PERL_VXML_28" stopped: code =
0
12:07:55:496 INFO VOICEGLU tatooine callid=[28] lost its VXML
interpreter
12:07:55:496 DBUG -17VOICEGLU tatooine callid=[28] deallocating VXML
thread
12:07:55:496 NOTI VOICEGLU tatooine callid=[28] hanging up because VXML
interpreter exited
12:07:55:496 DBUG -17VOICEGLU tatooine callid=[28] snd hangup to CT
server on fh="::CTSRV" at host=localhost
12:07:55:496 DBUG -17VOICEGLU tatooine snd "hangup 28\n" to ::CTSRV
12:07:55:496 DBUG PHONGLUE tatooine rcv ct(::CTCLIENT2): "hangup 28\n"
12:07:55:496 DBUG PHONGLUE tatooine callid=[28] parsed hangup
12:07:55:496 INFO PHONGLUE tatooine AGI client filehandle "::FASTAGI28"
stopped: hangup requested
12:07:55:496 DBUG PHONGLUE tatooine callid=[28] snd hungup callid=28 to
CT client on fh="::CTCLIENT2" at host=127.0.0.1 proto=SATC
12:07:55:496 DBUG PHONGLUE tatooine snd "hungup 28\n" to ::CTCLIENT2
12:07:55:496 DBUG PHONGLUE tatooine rcv mgr(::ASTMGR): "Event:
Newexten\r\nPrivilege: call,all\r\nChannel:
SIP/localhost-098ccf78\r\nContext: phoneglue\r\nExtension:
readmyfeed\r\nPriority: 3\r\nApplication: Hangup\r\nAppData:
\r\nUniqueid: asterisk-1238580469.27\r\n\r\n"
12:07:55:496 DBUG PHONGLUE tatooine rcv mgr(::ASTMGR): "Event:
Hangup\r\nPrivilege: call,all\r\nChannel:
SIP/localhost-098ccf78\r\nUniqueid: asterisk-1238580469.27\r\nCause:
16\r\nCause-txt: Normal Clearing\r\n\r\n"
12:07:55:498 DBUG -17OPEN_VXI tatooine callid=[28] rcv vg: Waited
12:07:55:498 DBUG -17OPEN_VXI tatooine callid=[28]
|-1239082096|28|60001|testClient::ChannelThread|NULL result
12:07:55:498 DBUG -17OPEN_VXI tatooine callid=[28]
|-1239082096|28|60001|testClient::ChannelThread|Call Terminated
12:07:55:498 DBUG -17OPEN_VXI tatooine callid=[28] Channel 28: Call
Terminated
12:07:55:498 DBUG -17OPEN_VXI tatooine callid=[28]
|-1239082096|-1|3000|SBinetDestroyResource|entering: 0x0x9a74ea0
(0x0x9a7a5d0)
12:07:55:498 DBUG -17OPEN_VXI tatooine callid=[28]
|-1239082096|-1|3000|SBinetDestroyResource|exiting, returned 0
12:07:55:498 DBUG -17VOICEGLU tatooine rcv ctsrv: "hungup 28\n"
12:07:55:498 DBUG -17VOICEGLU tatooine callid=[28] parsed hungup callid=28
More information about the Voiceglue
mailing list