<div dir="ltr">Caller profile fields are set when the channel is created and can&#39;t be changed by the set application. It also wouldn&#39;t make any sense to change as this profile field is used to let you know whether or not the calling party is requesting from you to hide the caller ID.<div>
<br></div><div>If your intention is to hider caller id on outbound calls you should set the origination_caller_id_number  variable.</div><div>see  <a href="http://wiki.freeswitch.org/wiki/Cid">http://wiki.freeswitch.org/wiki/Cid</a></div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 5:30 AM, Kenn Leth Hansen <span dir="ltr">&lt;<a href="mailto:klh@justfone.dk" target="_blank">klh@justfone.dk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div><br></div><div>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.</div>


<div><br></div><div>What I have tried so far:</div><div><span style="line-height:19.600000381469727px;font-size:14px;white-space:pre-wrap;font-family:courier,&#39;courier new&#39;,monospace"><br></span></div>

<div><span style="line-height:19.600000381469727px;white-space:pre-wrap"><b><font face="arial black, sans-serif">API</font></b></span></div><div><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><b>Send:</b></font></span></div>


<div><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">api uuid_setvar ZWVlZDUwMTUyNjdjNWU4ZTBmZWY4NTQ1ZDA2NmJiYWI privacy_hide_number=true</span></font><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="courier new, monospace">&lt;cr&gt;&lt;cr&gt;</font></span><br>


</div><div><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="courier new, monospace"><br></font></span></div><div><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><b>Reply:</b></font></span></div>


<div><font face="courier new, monospace"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap">Content-Type: api/response
Content-Length: 4

+OK</span></font><br></font></div><div><font face="courier new, monospace"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><br></span></font></font></div><div><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;margin-top:0px;word-wrap:break-word">

<font face="arial, helvetica, sans-serif">As You see, FS replies with</font><font face="courier new, monospace"> +OK</font><font face="arial, helvetica, sans-serif">. But the variable is unchanged.</font></pre><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;font-family:courier,&#39;courier new&#39;,monospace;margin-top:0px;word-wrap:break-word">

<br></pre><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;margin-top:0px;word-wrap:break-word"><font face="arial black, sans-serif">SET, part one</font></pre><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;margin-top:0px;word-wrap:break-word">

<font face="arial, helvetica, sans-serif"><b>Send:</b></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="courier new, monospace">sendmsg YjJjNzJlOTQ0YWE1N2I2MGVlYTAwMzI2NWFjMmY4ZjM
execute-app-name: set
execute-app-arg: Caller-Privacy-Hide-Number=true
call-command: execute</font><b style="font-family:arial,helvetica,sans-serif"><br></b></span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="courier new, monospace"><br>


</font></span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><b>Part of received headers (JSON output):</b></span></font></pre>


<pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">...</span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px">

<font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">{ name: &#39;Caller-Privacy-Hide-Number&#39;, value: &#39;false&#39; },<br></span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px">

<font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">...</span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">{ name: &#39;variable_Caller-Privacy-Hide-Number&#39;, value: &#39;true&#39; }<br>


</span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">...</span></font></pre>


<pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Variable is not overwritten. Instead a new &quot;</font><font face="courier new, monospace">variable_</font><font face="arial, helvetica, sans-serif">&quot; is created.</font></span></font></pre>


<pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><pre style="line-height:19.600000381469727px;font-size:14px;white-space:pre-wrap;margin-bottom:0px;font-family:courier,&#39;courier new&#39;,monospace;margin-top:0px;word-wrap:break-word">

<br></pre><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;margin-top:0px;word-wrap:break-word"><font face="arial black, sans-serif">SET, part two</font></pre><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;margin-top:0px;word-wrap:break-word">

<font face="arial, helvetica, sans-serif"><b>Send:</b></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="courier new, monospace">sendmsg NmJmZWU5YzMwYTlkMTk2MDg0ZmIzZmQwMTFiMTFkMmM
execute-app-name: set
execute-app-arg: privacy_hide_number=true
call-command: execute</font><br></span></font></pre><pre style="line-height:19.600000381469727px;white-space:pre-wrap;margin-bottom:0px;margin-top:0px;word-wrap:break-word"><br></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px">

<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><b>Part of received headers (JSON output):</b></span></font></pre>


<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">...</span></font></pre>


<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">{ name: &#39;Caller-Privacy-Hide-Number&#39;, value: &#39;false&#39; },<br>


</span></font></pre><pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">...</span></font></pre>


<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">{ name: &#39;variable_privacy_hide_number&#39;, value: &#39;true&#39; }<br>


</span></font></pre><pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="courier new, monospace"><span style="line-height:19.600000381469727px;white-space:pre-wrap">...</span></font></pre>


<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Again, variable is not overwritten. Instead a new &quot;</font><font face="courier new, monospace">variable_</font><font face="arial, helvetica, sans-serif">&quot; is created.</font></span></font></pre>


<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br>


</font></span></font></pre><pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Can it really be true this is not possible?</font></span></font></pre>


<pre style="color:rgb(34,34,34);line-height:normal;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000"><span style="line-height:19.600000381469727px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br>


</font></span></font></pre><pre style="word-wrap:break-word;margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif"><span style="line-height:19.600000381469727px;white-space:pre-wrap">FreeSWITCH Version 1.2.16+git~20131218T195141Z~6968ef88fa~64bit (git 6968ef8 2013-12-18 19:51:41Z 64bit).</span></font></pre>


</pre><pre style="line-height:19.600000381469727px;font-size:14px;white-space:pre-wrap;margin-bottom:0px;font-family:courier,&#39;courier new&#39;,monospace;margin-top:0px;word-wrap:break-word"><br></pre>

<pre style="line-height:19.600000381469727px;font-size:14px;white-space:pre-wrap;margin-bottom:0px;font-family:courier,&#39;courier new&#39;,monospace;margin-top:0px;word-wrap:break-word"><br></pre></pre>

</div><div><div dir="ltr"><div><div><div><div><font color="#000000">Best regards,<br><br></font></div><b><font color="#000000">Kenn Leth Hansen<br></font></b></div><font color="#000000"><i><div><font color="#000000"><i>M.Sc. Engineering, Telecommunications</i></font></div>


SIP Service Developer</i><br></font></div></div><br></div></div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>