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?