It should never be looking at a header to determine the content length, but it should probably be calculating it itself. Patches welcome.On Feb 7, 2015, at 4:19 PM, Vik Killa <vipkilla@gmail.com> wrote:When firing a NOTIFY event using sendevent, mod_sofia does not accept 'body' or 'content-length' from the event;My goal is to be able to send custom 'dialog' events to send NOTIFYs to UAsI noticed FS will send the dialog event if I don't include the 'content-length' header and body.Here is an example event that works.mod_sofia will parse the event and fire the NOTIFYsendevent NOTIFYprofile: internalevent-string: dialogcontent-type: application/dialog-info+xmluser: 1002host: 3.localto-uri: 1002@3.localfrom-uri: 1002@3.localif I add content-length and a body, mod_sofia does not fire the NOTIFY:content-length: 493<?xml version="1.0"?><dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="3" state="full" entity="sip:orbit+lot@3.local"><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>I noticed in mod_sofia.c, where it listens for SWITCH_EVENT_NOTIFYit does not parse the 'content-length' header but it does look for the body and even tries to send it in nua_notify()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?If it is not the desired behavior, could this be a bug?Thank you in advance.
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org