Why is erroneous to have the contact header with the backend IP?
With the record-route on the 200 Ok, the ACK should be directed to the backend IP, but containing a route header pointing to the Kamailio IP. Kamailio will loose_route() this request and send it to the backend server as expected.
Regards,
On Wed, Mar 5, 2014 at 3:53 PM, Marc Soda msoda@coredial.com wrote:
Thanks Olle. I am calling record_record() on the initial INVITE. In fact, the OK has a Record-Route header:
1.1.1.1 is the endpoint 2.2.2.2 is the kamailio proxy 3.3.3.3 is the backend server
SIP/2.0 200 OK Via: SIP/2.0/UDP 1.1.1.1:60077 ;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z- Record-Route: sip:2.2.2.2;lr=on;ftag=db634167;nat=yes From: sip:sip7878_spqa@edge.domain.com;transport=UDP;tag=db634167 To: sip:2155555555@edge.coredial.com;transport=UDP;tag=as3f9cf263 Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM. CSeq: 2 INVITE User-Agent: CoreDialPBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Contact: sip:21555555555@3.3.3.3 Content-Type: application/sdp Content-Length: 266
v=0 o=root 13486 13487 IN IP4 3.3.3.3 s=session c=IN IP4 3.3.3.3 t=0 0 m=audio 29990 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv
I don't think 3.3.3.3 should show up anywhere, it should be rewritten to 2.2.2.2.
On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson oej@edvina.net wrote:
On 05 Mar 2014, at 18:30, Marc Soda msoda@coredial.com wrote:
I have Kamailio setup as a proxy in front of a backend server (Asterisk). When I make a call through the proxy, the Contact header in the 200 OK that is returned to the client has the IP of the backend server in it. Thus, the client is sending it's ACK directly to the backend server.
Is there a special method to rewrite the Contact header to be Kamailio's IP?
Check record_route() in the default configuration script. You need to add a route set by using record_route() in the initial transaction.
Cheers, /O
Where is a good place in the config to do this? (my config is loosely based on this: http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb )
Thanks! Marc
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users