I am trying to pass multiple parameters to Dialogflow via the builtin:intent grammar in UniMRCP/Asterisk using SynthAndRecog.
If I pass only one parameter, everything works correctly: the parameter is read properly and appears in the Dialogflow session.
If I try to pass multiple parameters, separated by commas in the grammar, the function fails with the following error:
Could you please advise on the correct way to pass multiple parameters in the grammar?
Here is an example of the Asterisk log when the error occurs:
<PJSIP/1111-0000006e>AGI Rx << EXEC "SynthAndRecog" "\" \",\"builtin:intent/00000000-0000-0000-0000-000000000000?gapp-credentials-file=[credentials].json;projectid=[id];agent=[id];location=global;api=v3;parameters={'param1':'Lucas','param2':'24'}\",plt=1&b=0&sct=1300&sint=18000&nit=10000&nif=json&spl=it&ct=0.2&sl=0.3&vg=female&p=uni2_gdf&pr=medium"
-- AGI Script Executing Application: (SynthAndRecog) Options: (" ","builtin:intent/00000000-0000-0000-0000-000000000000?gapp-credentials-file=[credentials].json;projectid=[id];agent=[id];location=global;api=v3;parameters={'param1':'Lucas','param2':'24'}",plt=1&b=0&sct=1300&sint=18000&nit=10000&nif=json&spl=it&ct=0.2&sl=0.3&vg=female&p=uni2_gdf&pr=medium)
[Feb 19 11:56:03] NOTICE[483430][C-0000007d]: app_synthandrecog.c:1345 app_synthandrecog_exec: SynthAndRecog() prompt:
[Feb 19 11:56:03] NOTICE[483430][C-0000007d]: app_synthandrecog.c:1353 app_synthandrecog_exec: SynthAndRecog() grammar: builtin:intent/00000000-0000-0000-0000-000000000000?gapp-credentials-file=[credentials].json;projectid=[id];agent=[id];location=global;api=v3;parameters={'param1':'Lucas','param2':'24'}
[Feb 19 11:56:03] NOTICE[483430][C-0000007d]: app_synthandrecog.c:1369 app_synthandrecog_exec: SynthAndRecog() options: plt=1&b=0&sct=1300&sint=18000&nit=10000&nif=json&spl=it&ct=0.2&sl=0.3&vg=female&p=uni2_gdf&pr=medium
[Feb 19 11:56:03] NOTICE[483430][C-0000007d]: src/mrcp_application.c:117 Create MRCP Handle 0x7f39b41a9908 [uni2_gdf]
[Feb 19 11:56:03] NOTICE[483430][C-0000007d]: src/mrcp_client_session.c:131 Create Channel ASR-155 <new>
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:385 Receive App Request ASR-155 <new> [2]
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client.c:697 Add MRCP Handle ASR-155 <new>
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:717 Add Control Channel ASR-155 <new@speechrecog>
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:409 Send Offer ASR-155 <new> [c:1 a:1 v:0] to [ip]:8060
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_sofiasip_client_agent.c:357 Local SDP ASR-155 <new>
v=0
o=Asterisk 0 0 IN IP4 [ip]
s=-
c=IN IP4 [ip]
t=0 0
m=application 9 TCP/MRCPv2 1
a=setup:active
a=connection:new
a=resource:speechrecog
a=cmid:1
m=audio 30325 RTP/AVP 8 0 96 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 L16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendonly
a=mid:1
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:617 Receive SIP Event [nua_i_state] Status 0 INVITE sent [uni2_gdf]
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:555 SIP Call State ASR-155 [calling]
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:617 Receive SIP Event [nua_r_invite] Status 200 OK [uni2_gdf]
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:617 Receive SIP Event [nua_i_state] Status 200 OK [uni2_gdf]
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:555 SIP Call State ASR-155 [ready]
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:441 Remote SDP ASR-155 <new>
v=0
o=UniMRCPServer 6862280565177742074 3053951037958632933 IN IP4 [ip]
s=-
c=IN IP4 [ip]
t=0 0
m=application 1544 TCP/MRCPv2 1
a=setup:passive
a=connection:new
a=channel:956362be0d8111f1@speechrecog
a=cmid:1
m=audio 30269 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=recvonly
a=mid:1
[Feb 19 11:56:03] NOTICE[4279]: src/mrcp_sofiasip_client_agent.c:617 Receive SIP Event [nua_i_active] Status 200 Call active [uni2_gdf]
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:149 Receive Answer ASR-155 <new> [c:1 a:1 v:0] Status 200
[Feb 19 11:56:03] NOTICE[4276]: src/mrcp_client_connection.c:346 Established TCP/MRCPv2 Connection [ip]:42506 <-> [ip]:1544
[Feb 19 11:56:03] NOTICE[4276]: src/mrcp_client_connection.c:456 Add Control Channel <956362be0d8111f1@speechrecog> [ip]:42506 <-> [ip]:1544 [1]
[Feb 19 11:56:03] NOTICE[4277]: src/mpf_rtp_stream.c:331 Enable RTP Session [ip]:30325
[Feb 19 11:56:03] NOTICE[4277]: src/mpf_rtp_stream.c:921 Open RTP Transmitter [ip]:30325 -> [ip]:30269
[Feb 19 11:56:03] NOTICE[4277]: src/mpf_bridge.c:91 Media Path ASR-155 Source->[PCMA/8000/1]->Bridge->[PCMA/8000/1]->Sink
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:453 Raise App Response ASR-155 <956362be0d8111f1> [2] SUCCESS [0]
[Feb 19 11:56:03] NOTICE[4275]: app_synthandrecog.c:275 speech_on_channel_add: (ASR-155) Channel ready codec=PCMA, sample rate=8000
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:390 Receive App MRCP Request ASR-155 <956362be0d8111f1>
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:620 Send MRCP Request ASR-155 <956362be0d8111f1@speechrecog> [1]
[Feb 19 11:56:03] NOTICE[4276]: src/mrcp_client_connection.c:551 Send MRCPv2 Data [ip]:42506 <-> [ip]:1544 [176 bytes]
MRCP/2.0 176 DEFINE-GRAMMAR 1
Channel-Identifier: 956362be0d8111f1@speechrecog
Content-Type: application/srgs+xml
Content-Id: grammar-1
Content-Length: 14
'param2':'24'}
[Feb 19 11:56:03] NOTICE[4276]: src/mrcp_client_connection.c:656 Receive MRCPv2 Data [ip]:42506 <-> [ip]:1544 [125 bytes]
MRCP/2.0 125 1 409 COMPLETE
Channel-Identifier: 956362be0d8111f1@speechrecog
Completion-Cause: 004 grammar-load-failure
[Feb 19 11:56:03] NOTICE[4275]: src/mrcp_client_session.c:498 Raise App MRCP Response ASR-155 <956362be0d8111f1>
[Feb 19 11:56:03] ERROR[483430][C-0000007d]: app_synthandrecog.c:1536 app_synthandrecog_exec: (ASR-155) Unable to load grammar
[Feb 19 11:56:03] NOTICE[483430][C-0000007d]: app_synthandrecog.c:1307 synthandrecog_exit: SynthAndRecog() exiting status: ERROR on PJSIP/1111-0000006e
Thank you in advance.
Davide
Hi,
You can see that you are sending this value to the uniMRCP server:
'param2':'24'}
You probably would have to escape some characters (‘<’ or ‘>’ or ‘{‘ or ‘}’).
Send us the complete grammar file so we could help you more.
Regards,
Daniel Friedman
Trixton LTD.
Tel: 972.72.2557000
Mobile: 972.50.6655579
Email: da...@3xton.com
Website: http://www.3xton.com

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
unimrcp+u...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/unimrcp/c621288b-bb47-4a71-a0ef-0d5b4f6559fbn%40googlegroups.com.