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 UAs
I 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 NOTIFY
sendevent NOTIFY
profile: internal
event-string: dialog
content-type: application/dialog-info+xml
user: 1002
host: 3.local
to-uri: 1002@3.local
from-uri: 1002@3.local
if 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_NOTIFY
it 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.