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@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 :=)