[Freeswitch-users] SWITCH_EVENT_NOTIFY will not send 'body' or 'content-length'

Vik Killa vipkilla at gmail.com
Mon Feb 9 18:47:48 MSK 2015


I found that I can send an event with the 'body' in C but not via telnet
ESL.
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
Thanks.

On Mon, Feb 9, 2015 at 10:37 AM, Michael Jerris <mike at jerris.com> wrote:

> 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 at 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 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 at 3.local
> from-uri: 1002 at 3.local
> contact-uri: sip:1002 at 192.168.0.109:10536;fs_path=sip:192.168.207.156:5060
>
> 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 at 3.local"><dialog id="lot"
> direction="initiator"><state>early</state><local><identity
> display="TEST">sip:lot at 3.local;proto=orbit</identity><target
> uri="sip:lot at 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.
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150209/f9e35c23/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list