userVariables
vladutz33 opened this issue · 10 comments
Hello guys, I have a problem with userVariables in verto communicator, I add them there and in the initial invite they work, I have them in the channel variables, but when I change their values and than do a transfer ( verto.modify) the new values are not sent to the channel variables. Am I using this wrong or is this a bug? Thank you.
What variables are you trying to set?
Are you able to send a code snippet exemplifying your case?
I'm trying to send custom variables, let's call them var1 , var2 ,var3 and var4, the thing is that I see them in the json that is received in freeswitch:
"jsonrpc": "2.0",
"method": "verto.modify",
"params": {
"action": "transfer",
"destination": "6000",
"userVariables": {
"var1": "1",
"var2": "1",
"var3": "1",
"var4": "1"
},
"dialogParams": {
"useVideo": false,
"useStereo": true,
"screenShare": false,
"useCamera": "409e535ba966903cc283db88493120c062e3b427cb35b6626d4fbc2ab36b6997",
"useMic": "default",
"useSpeak": "default",
"tag": "webcam",
but when I check their value in freeswitch using "<action application="log" data="var1: ${verto_dvar_var1}" inline="true" it returns [UNDEF]
[DEBUG] mod_dptools.c:1548 SET verto.rtc/7f687fc7-cebc-fb27-7412-16c219c7ea0e [var1]=[UNDEF]
I have set the variables in the transfer function
userVariables: {
"var1": "1",
"var2": "0",
"var3": "0",
"var4": "0"
}
This is how I check it <action application="log" data="var1: ${verto_dvar_var1}" , is there another prefix for userVariables? Thank you.
Were you able to run <action application="info"/>
, @vladutz33? What was the result?
So I did what you said, but this is the result:
So the json comes ok , like this :
"jsonrpc": "2.0",
"method": "verto.modify",
"params": {
"action": "transfer",
"destination": "6000",
"userVariables": {
"var1": "1",
"var2": "0",
"var3": "0",
"var4": "0"
},
"dialogParams": {
"useVideo": true,
"useStereo": true,
"screenShare": false,
"useCamera": "7136fdaf9efafc699830312620508ccb70160250761916aa3ea167ca94c562e5",
"useMic": "default",
"useSpeak": "default",
"tag": "webcam",
"localTag": null,
"login": "201@10.0.188.100",
"videoParams": {
"minWidth": 640,
"minHeight": 480,
"maxWidth": 640,
"maxHeight": 480,
"minFrameRate": 15
},
"callID": "976177bc-98e6-459d-a533-a71d15974cb6",
"caller_id_name": "Extension 203",
"caller_id_number": "203",
"callee_id_name": "201",
"callee_id_number": "201",
"display_direction": "outbound",
"remote_caller_id_name": "Extension 203",
"remote_caller_id_number": "203"
},
"sessid": "6e423706-9127-122d-eee0-5de0f2a2cfb3"
},
"id": 4
}]
It contains my variables, but in the channel variables there are no var1 , var2 , var3, var4, this is the application="info" output:
EXECUTE verto.rtc/201 info()
2017-12-12 11:12:34.269957 [INFO] mod_dptools.c:1761 CHANNEL_DATA:
Channel-State: [CS_EXECUTE]
Channel-Call-State: [EARLY]
Channel-State-Number: [4]
Channel-Name: [verto.rtc/201]
Unique-ID: [db46495c-e876-9228-6a57-3172a2ee7ba5]
Call-Direction: [inbound]
Presence-Call-Direction: [inbound]
Channel-HIT-Dialplan: [true]
Channel-Presence-ID: [203@10.0.188.100]
Channel-Call-UUID: [db46495c-e876-9228-6a57-3172a2ee7ba5]
Answer-State: [early]
Channel-Read-Codec-Name: [opus]
Channel-Read-Codec-Rate: [48000]
Channel-Read-Codec-Bit-Rate: [0]
Channel-Write-Codec-Name: [opus]
Channel-Write-Codec-Rate: [48000]
Channel-Write-Codec-Bit-Rate: [0]
Caller-Direction: [inbound]
Caller-Logical-Direction: [inbound]
Caller-Username: [203@10.0.188.100]
Caller-Dialplan: [XML]
Caller-Caller-ID-Name: [203]
Caller-Caller-ID-Number: [200@200.com]
Caller-Orig-Caller-ID-Name: [203]
Caller-Orig-Caller-ID-Number: [200@200.com]
Caller-Callee-ID-Name: [Outbound Call]
Caller-Callee-ID-Number: [201]
Caller-Network-Addr: [10.10.255.131]
Caller-ANI: [200@200.com]
Caller-Destination-Number: [6000]
Caller-Unique-ID: [db46495c-e876-9228-6a57-3172a2ee7ba5]
Caller-Source: [mod_verto]
Caller-Transfer-Source: [1513069953:622e7a0f-9c45-4214-b256-516395fc69c8:bl_xfer:6000/default/XML]
Caller-Context: [default]
Caller-RDNIS: [201]
Caller-Channel-Name: [verto.rtc/201]
Caller-Profile-Index: [2]
Caller-Profile-Created-Time: [1513069953230006]
Caller-Channel-Created-Time: [1513069949909987]
Caller-Channel-Answered-Time: [0]
Caller-Channel-Progress-Time: [1513069950929990]
Caller-Channel-Progress-Media-Time: [1513069950929990]
Caller-Channel-Hangup-Time: [0]
Caller-Channel-Transfer-Time: [0]
Caller-Channel-Resurrect-Time: [0]
Caller-Channel-Bridged-Time: [0]
Caller-Channel-Last-Hold: [0]
Caller-Channel-Hold-Accum: [0]
Caller-Screen-Bit: [true]
Caller-Privacy-Hide-Name: [false]
Caller-Privacy-Hide-Number: [false]
variable_is_outbound: [true]
variable_uuid: [db46495c-e876-9228-6a57-3172a2ee7ba5]
variable_session_id: [5]
variable_video_media_flow: [sendrecv]
variable_direction: [inbound]
variable_ep_codec_string: [mod_opus.opus@48000h@20i@2c,mod_spandsp.G722@8000h@20i@64000b,CORE_PCM_MODULE.PCMU@8000h@20i@64000b,CORE_PCM_MODULE.PCMA@8000h@20i@64000b]
variable_secondary_recovery_module: [mod_verto]
variable_verto_dvar_email: [200@200.com]
variable_verto_dvar_avatar: [http://gravatar.com/avatar/15f92515b277dfdad8627b56e0212c2c.png?s=600]
variable_channel_name: [verto.rtc/201]
variable_jsock_uuid_str: [7f687fc7-cebc-fb27-7412-16c219c7ea0e]
variable_verto_user: [203@10.0.188.100]
variable_presence_id: [203@10.0.188.100]
variable_verto_client_address: [10.10.255.131:40653]
variable_chat_proto: [verto]
variable_verto_host: [10.0.188.100]
variable_event_channel_cookie: [7f687fc7-cebc-fb27-7412-16c219c7ea0e]
variable_verto_profile_name: [default-v4]
variable_record_stereo: [true]
variable_default_gateway: [example.com]
variable_default_areacode: [918]
variable_transfer_fallback_extension: [operator]
variable_toll_allow: [domestic,international,local]
variable_accountcode: [203]
variable_user_context: [default]
variable_effective_caller_id_name: [Extension 203]
variable_effective_caller_id_number: [203]
variable_outbound_caller_id_name: [FreeSWITCH]
variable_outbound_caller_id_number: [0000000000]
variable_callgroup: [techsupport]
variable_user_name: [203]
variable_domain_name: [10.0.188.100]
variable_Event-Name: [CHANNEL_DATA]
variable_Core-UUID: [4aabfb65-3348-4202-a64c-f58f9389a589]
variable_FreeSWITCH-Hostname: [freeswitch]
variable_FreeSWITCH-Switchname: [freeswitch]
variable_FreeSWITCH-IPv4: [10.0.188.100]
variable_FreeSWITCH-IPv6: [::1]
variable_Event-Date-Local: [2017-12-12 11:11:25]
variable_Event-Date-GMT: [Tue, 12 Dec 2017 09:11:25 GMT]
variable_Event-Date-Timestamp: [1513069885669959]
variable_Event-Calling-File: [mod_verto.c]
variable_Event-Calling-Function: [client_thread]
variable_Event-Calling-Line-Number: [1987]
variable_Event-Sequence: [52584]
variable_verto_remote_caller_id_name: [Outbound Call]
variable_verto_remote_caller_id_number: [201]
variable_switch_r_sdp: [v=0
o=- 1554170560620038792 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS hcJw70yG9Yb9eHkT6MFKgKEQLJJXgYpLJz5i
m=audio 60863 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 10.10.255.131
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3616978770 1 udp 2122260223 10.10.255.131 60863 typ host generation 0 network-id 1 network-cost 50
a=candidate:3588808435 1 udp 2122194687 10.0..0.47 60864 typ host generation 0 network-id 2
a=candidate:1889719830 1 udp 2122129151 10.0.206.1 60865 typ host generation 0 network-id 3
a=candidate:90380972 1 udp 2122063615 10.0.2.1 60866 typ host generation 0 network-id 4
a=candidate:1371534678 1 udp 2121998079 10.0.198.1 60867 typ host generation 0 network-id 5
a=candidate:2568309666 1 tcp 1518280447 10.10.255.131 9 typ host tcptype active generation 0 network-id 1 network-cost 50
a=candidate:2607489539 1 tcp 1518214911 10.0..0.47 9 typ host tcptype active generation 0 network-id 2
a=candidate:1042361062 1 tcp 1518149375 10.0.206.1 9 typ host tcptype active generation 0 network-id 3
a=candidate:1273030236 1 tcp 1518083839 10.0.2.1 9 typ host tcptype active generation 0 network-id 4
a=candidate:524028326 1 tcp 1518018303 10.0.198.1 9 typ host tcptype active generation 0 network-id 5
a=ice-ufrag:h8+I
a=ice-pwd:okKknZkDkFreFMB1YR1iUXsN
a=ice-options:trickle
a=fingerprint:sha-256 37:42:DE:4B:D7:6E:49:85:42:94:53:2E:24:47:72:A7:7D:96:31:29:AC:F4:CC:89:B1:F5:8D:3B:EC:69:A1:E2
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1; stereo=1; sprop-stereo=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:1799915571 cname:8qu0+IWhuBOo/561
a=ssrc:1799915571 msid:hcJw70yG9Yb9eHkT6MFKgKEQLJJXgYpLJz5i 3c1c0816-4fe3-4b84-a803-b494fdbaf810
a=ssrc:1799915571 mslabel:hcJw70yG9Yb9eHkT6MFKgKEQLJJXgYpLJz5i
a=ssrc:1799915571 label:3c1c0816-4fe3-4b84-a803-b494fdbaf810
]
variable_dialed_extension: [201]
variable_export_vars: [dialed_extension]
variable_ringback: [%(2000,4000,440,480)]
variable_transfer_ringback: [local_stream://moh]
variable_call_timeout: [30]
variable_hangup_after_bridge: [true]
variable_continue_on_fail: [true]
variable_called_party_callgroup: [techsupport]
variable_dialed_user: [201]
variable_dialed_domain: [10.0.188.100]
variable_originate_signal_bond: [976177bc-98e6-459d-a533-a71d15974cb6]
variable_originated_legs: [976177bc-98e6-459d-a533-a71d15974cb6;Outbound Call;201]
variable_rtp_use_codec_string: [pcmu,,pcma,opus,vp8,H264]
variable_audio_media_flow: [sendrecv]
variable_rtp_audio_recv_pt: [111]
variable_rtp_use_codec_name: [opus]
variable_rtp_use_codec_fmtp: [minptime=10;useinbandfec=1; stereo=1; sprop-stereo=1]
variable_rtp_use_codec_rate: [48000]
variable_rtp_use_codec_ptime: [20]
variable_rtp_use_codec_channels: [2]
variable_rtp_last_audio_codec_string: [opus@48000h@20i@2c]
variable_original_read_codec: [opus]
variable_original_read_rate: [48000]
variable_write_codec: [opus]
variable_write_rate: [48000]
variable_remote_audio_rtp_ip: [10.10.255.131]
variable_remote_audio_rtp_port: [60863]
variable_remote_audio_rtcp_ip: [10.10.255.131]
variable_remote_audio_rtcp_port: [60863]
variable_dtmf_type: [rfc2833]
variable_local_media_ip: [10.0.188.100]
variable_local_media_port: [30258]
variable_advertised_media_ip: [10.0.188.100]
variable_rtp_use_timer_name: [soft]
variable_rtp_use_pt: [111]
variable_rtp_use_ssrc: [2050928749]
variable_rtp_2833_send_payload: [110]
variable_rtp_2833_recv_payload: [110]
variable_remote_media_ip: [10.10.255.131]
variable_remote_media_port: [60863]
variable_rtp_local_sdp_str: [v=0
o=FreeSWITCH 1513039692 1513039693 IN IP4 10.0.188.100
s=FreeSWITCH
c=IN IP4 10.0.188.100
t=0 0
a=msid-semantic: WMS dFiNyko34HCSitk1aUgYMXachUkectGg
m=audio 30258 UDP/TLS/RTP/SAVPF 111 110
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1; minptime=10; stereo=1; sprop-stereo=1
a=rtpmap:110 telephone-event/48000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=fingerprint:sha-256 92:BE:9D:69:D0:1D:56:D4:FB:2C:B7:8D:5F:BE:C0:4B:47:5B:E0:2C:68:46:44:E0:FB:5B:EF:67:39:07:1F:9D
a=setup:active
a=rtcp-mux
a=rtcp:30258 IN IP4 10.0.188.100
a=ice-ufrag:wLR8yRbFClJFFfLu
a=ice-pwd:UvHItOrYnSCgu79QIRO7yPD1
a=candidate:4687414927 1 udp 659136 10.0.188.100 30258 typ host generation 0
a=end-of-candidates
a=ssrc:2050928749 cname:ZOTnY7gSFJBN2LE2
a=ssrc:2050928749 msid:dFiNyko34HCSitk1aUgYMXachUkectGg a0
a=ssrc:2050928749 mslabel:dFiNyko34HCSitk1aUgYMXachUkectGg
a=ssrc:2050928749 label:dFiNyko34HCSitk1aUgYMXachUkectGga0
]
variable_endpoint_disposition: [EARLY MEDIA]
variable_send_silence_when_idle: [-1]
variable_rtp_has_crypto: [srtp:dtls:AES_CM_128_HMAC_SHA1_80]
variable_max_forwards: [70]
variable_read_codec: [opus]
variable_read_rate: [48000]
variable_transfer_history: [1513069953:622e7a0f-9c45-4214-b256-516395fc69c8:bl_xfer:6000/default/XML]
variable_transfer_source: [1513069953:622e7a0f-9c45-4214-b256-516395fc69c8:bl_xfer:6000/default/XML]
variable_last_bridge_hangup_cause: [ORIGINATOR_CANCEL]
variable_originate_causes: [976177bc-98e6-459d-a533-a71d15974cb6;ORIGINATOR_CANCEL]
variable_originate_disposition: [ORIGINATOR_CANCEL]
variable_DIALSTATUS: [CANCEL]
variable_originate_failed_cause: [ORIGINATOR_CANCEL]
variable_DP_MATCH: [ARRAY::6000|:6000]
variable_call_uuid: [db46495c-e876-9228-6a57-3172a2ee7ba5]
variable_open: [true]
variable_current_application: [info]
Any suggestions ?
My guess here is that you're setting the userVariables at verto.modify and it should be at verto.invite. This is what I remember from mod_verto code.
If you can't get this working please open a JIRA at freeswitch.org/jira
Hi guys, i should that must say.
"userVariables" and "dialogParams" objects must be at different levels in verto.invite object.
"dialogParams" must contains "userVariables":
"dialogParams": {
"callID": "",
"userVariables": {
"var1": ""
}
}
And then i can use variable_verto_dvar_var1.
I did not find information about this on the Internet and looked at the code of mod_verto.c
FreeSWITCH Version 1.8.1 2018-07-24