<html><head><base href="x-msg://111/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>You can't send XML dialplan actions on the socket and expect FreeSWITCH to understand it, you must follow the event socket protocol.<div><br></div><div>See <a href="http://wiki.freeswitch.org/wiki/Event_socket">http://wiki.freeswitch.org/wiki/Event_socket</a> for more information.</div><div><br><div>
<div><span class="Apple-style-span" style="font-size: 12px; "><div>Mathieu Rene</div><div>Avant-Garde Solutions Inc</div><div>Office: + 1 (514) 664-1044 x100</div><div>Cell: +1 (514) 664-1044 x200</div><div><a href="mailto:mrene@avgs.ca">mrene@avgs.ca</a></div><div><br></div><div><br></div></span></div><br class="Apple-interchange-newline">
</div>
<br><div><div>On 2010-12-01, at 4:46 PM, Brian Campbell wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "> <br>I can set a custom channel variable in my incomming dial plan like this...<br> <br><action application='set' data='MyChannelVariable=12345' /><br> <br>And it shows up fine in the CDR<br> <br>I am now attempting to use mod_event_socket to set a custom channel variable and have it appear in the CDR<br> <br>Here is the C# code so far, the code is part of a Microsoft Speech Server application that is answering the call<br> <br>private void injectCdrCode_ExecuteCode(object sender, EventArgs e)<br>{<br> try<br> {<br> TcpClient newClient = new TcpClient();<br> <br> newClient.Connect("127.0.0.1", 8021);<br> <br> NetworkStream tcpStream = newClient.GetStream();<br> <br> byte[] sendBytes = Encoding.ASCII.GetBytes("<action application='set' data='MyChannelVariable=12345' />");<br> <br> tcpStream.Write(sendBytes, 0, sendBytes.Length);<br> <br> tcpStream.Close();<br> <br> newClient.Close();<br> }<br> catch(Exception ex)<br> {<br> throw ex;<br> }<br>}<br> <br>After the call is answered, the C# code seems to run fine, but I dont see the custom channel variable in the resulting CDR<br> <br>I figure I am not setting it correctly<br> <br>Can anyone advise on what I am doing wrong ?<br> <br>Thanks<br> <br> <br>Brian<br> <br> <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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br><a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></span></blockquote></div><br></div></div></body></html>