<div dir="ltr">I found that I can send an event with the 'body' in C but not via telnet ESL.<div>I'm going to be writing in C anyway so I'll just leave it at that... strange that I can send a message body via telnet ESL when it's a MESSAGE event but not SWITCH_EVENT_NOTIFY</div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 10:37 AM, Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">It should never be looking at a header to determine the content length, but it should probably be calculating it itself. Patches welcome.<div><div class="h5"><div><br><div><blockquote type="cite"><div>On Feb 7, 2015, at 4:19 PM, Vik Killa <<a href="mailto:vipkilla@gmail.com" target="_blank">vipkilla@gmail.com</a>> wrote:</div><br><div><div dir="ltr">When firing a NOTIFY event using sendevent, mod_sofia does not accept 'body' or 'content-length' from the event;<div><br></div><div>My goal is to be able to send custom 'dialog' events to send NOTIFYs to UAs</div><div>I noticed FS will send the dialog event if I don't include the 'content-length' header and body. </div><div><br></div><div>Here is an example event that works.</div><div>mod_sofia will parse the event and fire the NOTIFY</div><div><br></div><div><div>sendevent NOTIFY</div><div>profile: internal</div><div>event-string: dialog</div><div>content-type: application/dialog-info+xml</div><div>user: 1002</div><div>host: 3.local</div><div>to-uri: <a href="mailto:1002@3.local" target="_blank">1002@3.local</a></div><div>from-uri: <a href="mailto:1002@3.local" target="_blank">1002@3.local</a></div><div>contact-uri: <a>sip:1002@192.168.0.109:10536;fs_path=sip:</a><a href="http://192.168.207.156:5060/" target="_blank">192.168.207.156:5060</a></div></div><div><br></div><div>if I add content-length and a body, mod_sofia does not fire the NOTIFY:</div><div><br></div><div><div>content-length: 493</div><div><?xml version="1.0"?><dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="3" state="full" entity="sip:orbit+<a href="mailto:lot@3.local" target="_blank">lot@3.local</a>"><dialog id="lot" direction="initiator"><state>early</state><local><identity display="TEST">sip:lot@3.local;proto=orbit</identity><target uri="sip:lot@3.local;proto=orbit"><param pname="+sip.rendering" pvalue="no"/></target></local><remote><identity display="park">sip:lot</identity><target uri="sip:park+lot"/></remote></dialog></dialog-info></div></div><div><br></div><div><br></div><div>I noticed in mod_sofia.c, where it listens for SWITCH_EVENT_NOTIFY</div><div>it does not parse the 'content-length' header but it does look for the body and even tries to send it in nua_notify()</div><div><br></div><div>Is this the desired behavior? If SWITCH_EVENT_NOTIFY is trying to send the body of the event, shouldn't it look for a content-length header or try to create one based on the body?</div><div><br></div><div>If it is not the desired behavior, could this be a bug? </div><div>Thank you in advance.</div><div><br></div></div></div></blockquote></div><br></div></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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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></blockquote></div><br></div>