[Freeswitch-users] Setting channel variables using event socket

Kenn Leth Hansen klh at justfone.dk
Tue Jan 28 13:30:26 MSK 2014


Hi,


I am struggling with the task of setting a channel variable through an
event socket. It seems no matter what I do, FS will not overwrite the
existing variable.

What I have tried so far:

*API*
*Send:*
api uuid_setvar ZWVlZDUwMTUyNjdjNWU4ZTBmZWY4NTQ1ZDA2NmJiYWI
privacy_hide_number=true<cr><cr>

*Reply:*
Content-Type: api/response Content-Length: 4 +OK

As You see, FS replies with +OK. But the variable is unchanged.


SET, part one

*Send:*

sendmsg YjJjNzJlOTQ0YWE1N2I2MGVlYTAwMzI2NWFjMmY4ZjM
execute-app-name: set
execute-app-arg: Caller-Privacy-Hide-Number=true
call-command: execute


*Part of received headers (JSON output):*

...

{ name: 'Caller-Privacy-Hide-Number', value: 'false' },

...

{ name: 'variable_Caller-Privacy-Hide-Number', value: 'true' }

...

Variable is not overwritten. Instead a new "variable_" is created.


SET, part two

*Send:*

sendmsg NmJmZWU5YzMwYTlkMTk2MDg0ZmIzZmQwMTFiMTFkMmM
execute-app-name: set
execute-app-arg: privacy_hide_number=true
call-command: execute


*Part of received headers (JSON output):*

...

{ name: 'Caller-Privacy-Hide-Number', value: 'false' },

...

{ name: 'variable_privacy_hide_number', value: 'true' }

...

Again, variable is not overwritten. Instead a new "variable_" is created.


Can it really be true this is not possible?


FreeSWITCH Version 1.2.16+git~20131218T195141Z~6968ef88fa~64bit (git
6968ef8 2013-12-18 19:51:41Z 64bit).



Best regards,


*Kenn Leth Hansen*
*M.Sc. Engineering, Telecommunications SIP Service Developer*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140128/457d3c3e/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list