unexpected Route in request

21 views
Skip to first unread message

breeze

unread,
Aug 26, 2011, 4:18:27 AM8/26/11
to cipango-users
Hi

I see an unexpected Route header in request. Callflow is:
* INVITE is received by servlet from proxy
* servlet create an outgoing INVITE with B2buaHelper
* there is unexpected Route header, which force cipango to send
request back to proxy

This is incoming INVITE:

INVITE sip:confe...@multifon.ru SIP/2.0
Record-Route: <sip:192.168.64.98:5060;lr=on>
Via: SIP/2.0/UDP
192.168.64.98:5060;branch=z9hG4bKd6b3.f7a13d6022a1e32817fa9bd7a830a1cc.
0
Via: SIP/2.0/UDP 192.168.2.130:5061;rport=5061;branch=z9hG4bKzspqmnjf
Route: <sip:192.168.64.98:5060;lr>
X-Croc-Services: 00000000;00000000
Max-Forwards: 69
To: <sip:confe...@multifon.ru>
From: "555" <sip:5...@multifon.ru>;tag=tnqze
Call-ID: wxzanjzydpgpswt@ruilko-ws
CSeq: 949 INVITE
Contact: <sip:5...@192.168.2.130:5061>
Content-Type: application/sdp
Allow:
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE
Supported: replaces,norefersub,100rel
User-Agent: Twinkle/1.4.2
Content-Length: 311

v=0
...
a=ptime:20

Outgoing INVITE has:
Route: <sip:192.168.64.98:5060;lr>

Code to create outgoing INVITE:

Address contact = ...;
Map<String, List<String>> headers = new HashMap<String,
List<String>>();
List<String> toHeader = new LinkedList<String>();
toHeader.add(contact.toString());
headers.put("To", toHeader);

//it is first invite it has to be resent to OMP
B2buaHelper b2b = request.getB2buaHelper();
SipServletRequest other = b2b.createRequest(request, true, headers);
copyContent(request, other); // just copy content
other.addHeader(SIP_HEADER_VOXPILOT_AAI, "...");
other.setRequestURI(contact.getURI());
other.send();

Why outgoing INVITE is routed back to proxy? What is wrong with code?

breeze

unread,
Aug 26, 2011, 5:24:54 AM8/26/11
to cipango-users
There is an Route header in incoming INVITE, but I expect that cipango
should not copy it into outgoing request. Is it correct behaviour?

I manually remove Route header from outgoing request and it's working
fine. So, if it's correct that cipango copy Route header from incoming
request issue is resolved )

On Aug 26, 12:18 pm, breeze <ya-bre...@ya.ru> wrote:
> Hi
>
> I see an unexpected Route header in request. Callflow is:
> * INVITE is received by servlet from proxy
> * servlet create an outgoing INVITE with B2buaHelper
> * there is unexpected Route header, which force cipango to send
> request back to proxy
>
> This is incoming INVITE:
>
> INVITE sip:confere...@multifon.ru SIP/2.0
> Record-Route: <sip:192.168.64.98:5060;lr=on>
> Via: SIP/2.0/UDP
> 192.168.64.98:5060;branch=z9hG4bKd6b3.f7a13d6022a1e32817fa9bd7a830a1cc.
> 0
> Via: SIP/2.0/UDP 192.168.2.130:5061;rport=5061;branch=z9hG4bKzspqmnjf
> Route: <sip:192.168.64.98:5060;lr>
> X-Croc-Services: 00000000;00000000
> Max-Forwards: 69
> To: <sip:confere...@multifon.ru>

Thomas

unread,
Aug 26, 2011, 8:00:21 AM8/26/11
to cipang...@googlegroups.com
Hi,

Yes indeed, this is a feature of JSR289. Chapter 12.2 reads that:

"All unknown headers and Route, From and To headers are copied from original request to the new one".

This was the original goal of the B2buaHelper: to be able to implement a B2B in a similar way as a proxy with an outgoing request as similar as possible to the incoming one. As you did it, you may then remove the Route header if you do not need it.

Regards,

Thomas

> --
> You received this message because you are subscribed to the Google Groups "cipango-users" group.
> To post to this group, send email to cipang...@googlegroups.com.
> To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cipango-users?hl=en.
>

breeze

unread,
Aug 26, 2011, 9:17:26 AM8/26/11
to cipango-users
Thanks!
Reply all
Reply to author
Forward
0 new messages