[Freeswitch-dev] missing Diver sion header in 300, 302 message

Tihomir Culjaga tculjaga at gmail.com
Sun Jun 5 01:39:19 MSD 2011


just realized chrome was behaving strange ... reported server error while
the mail was actually sent.

Well sorry for the inconvenience....


T.

On Sat, Jun 4, 2011 at 11:35 PM, Tihomir Culjaga <tculjaga at gmail.com> wrote:

> hello,
>
> i found that FS doesn't transparently map Diversion header from INVITE to
> 300|302 message in a case of diversion.
>
> i have changed mod_sofia.c to adjust this:
>
>                                char *added_headers =
> sofia_glue_get_extra_headers(channel, SOFIA_SIP_HEADER_PREFIX);
>
>
> --- 2026,2037 ----
>
>                                 if (argc > 1) {
>                                         nua_respond(tech_pvt->nh,
> SIP_300_MULTIPLE_CHOICES, SIPTAG_CONTACT_STR(dest),
> !
> TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
> !
> TAG_IF(!zstr(added_headers), SIPTAG_HEADER_STR(added_headers)), TAG_END());
>                                 } else {
>                                         nua_respond(tech_pvt->nh,
> SIP_302_MOVED_TEMPORARILY, SIPTAG_CONTACT_STR(dest),
> !
> TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
> !
> TAG_IF(!zstr(added_headers), SIPTAG_HEADER_STR(added_headers)), TAG_END());
>                                 }
>
>
>
> Now 300|302 message contains the original header that was present in
> INVITE.
>
>
> since i didn't get any response whether this is a "feature" or a bug ... i
> went into the code and changed it myself.
>
> Please check the patch attached and see if it is
> possible/feasible/acceptable merge it into FS trunk.
>
>
>
> Regards,
> Tihomir.
>
>
> BTW: macros are cool while bringing headache in the same time :=)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20110604/b8b885a5/attachment-0001.html 


More information about the FreeSWITCH-dev mailing list