<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi, You can use ESL managed, is the easy way.<br><br>Diego <br>
http://voipensando.blogspot.com/<br><br>--- On <b>Wed, 12/1/10, Mathieu Rene <i><mrene_lists@avgs.ca></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Mathieu Rene <mrene_lists@avgs.ca><br>Subject: Re: [Freeswitch-users] Custom Channel Variables via C#<br>To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org><br>Date: Wednesday, December 1, 2010, 4:53 PM<br><br><div id="yiv965508001"><base><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 rel="nofollow" target="_blank" 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="yiv965508001Apple-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 rel="nofollow" ymailto="mailto:mrene@avgs.ca" target="_blank" href="/mc/compose?to=mrene@avgs.ca">mrene@avgs.ca</a></div><div><br></div><div><br></div></span></div><br class="yiv965508001Apple-interchange-newline">
</div>
<br><div><div>On 2010-12-01, at 4:46 PM, Brian Campbell wrote:</div><br class="yiv965508001Apple-interchange-newline"><blockquote type="cite"><span class="yiv965508001Apple-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; font-size: medium;"><div class="yiv965508001hmmessage" 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 rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="/mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a rel="nofollow" target="_blank" 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 rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></span></blockquote></div><br></div></div></div><br>-----Inline Attachment Follows-----<br><br><div
class="plainMail">_______________________________________________<br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>