Why is this a problem? Mike
On May 19, 2010, at 6:11 PM, Jim Thomas wrote: > Hello, > > I am experimenting with adding support for SIP 302 to redirect an inbound > call when the PBX is configured to forward the call. > > The ITSP requires that the Contact header include the number where the call > should be redirected, and a Diversion header must be added that identifies > the valid SIP trunk DID associated with the call. > > I tried sending this response to the incoming INVITE: > > nua_respond(handle, 302, "Moved Temporarily", > SIPTAG_CONTACT_STR("sip:9725551...@itsp.com:5060"), > SIPTAG_HEADER_STR("Diversion: <sip:9725559...@itsp.com>"), > TAG_END()); > > Sofia-SIP generates this outgoing response: > > SIP/2.0 302 Moved Temporarily > Via: SIP/2.0/UDP nnn.nnn.nnn.nnn:5060;branch=z9hG4bK39lurp00dgvh0e0fg2s0.1 > From: "Out of Area" > <sip:9725553...@itsp.com;user=phone>;tag=437990541-1274304841447- > To: "parentAccountFN parentAccountLN" > <sip:9725559...@itsp.com>;tag=ay1e7NH4a9pDH > Call-ID: bw1734014471905101951145...@itsp.com > CSeq: 423519092 INVITE > Contact: <sip:9725551...@itsp.com:5060> > Accept: application/sdp > Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, > NOTIFY, REFER, UPDATE, REGISTER > Supported: timer, 100rel > Content-Length: 0 > Diversion: <sip:9725559...@itsp.com> > > The problem is that the Diversion header created using SIPTAG_HEADER_STR() > appears *after* the Content-Length header. > > I see this post from Oct 2006: > > > http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg00928.html > > I would think Sofia-SIP would process SIPTAG_HEADER_STR() by locating the > custom header *before* the Content-Length header. > > I am using Sofia-SIP 1.12.10 (thank you for the open source contribution). > > How can I parameterize or otherwise code a custom header such that it appears > before the Content-Length header? ------------------------------------------------------------------------------ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel