[SR-Users] Incorrect Contact address

Ovidiu Sas osas at voipembedded.com
Wed Mar 5 20:33:10 CET 2014


No, you are not dealing with a buggy client.
As Carlos pointed out, you are dealing with standard SIP loose routing
mechanism.
Time to read the RFC :)

Regards,
Ovidiu Sas

On Wed, Mar 5, 2014 at 2:24 PM, Marc Soda <msoda at coredial.com> wrote:
> Yeah, I think I'm dealing with a buggy client...
>
> Thanks all.
>
>
> On Wed, Mar 5, 2014 at 1:57 PM, Carlos Ruiz Díaz <carlos.ruizdiaz at gmail.com>
> wrote:
>>
>> 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 at 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 at edge.domain.com;transport=UDP>;tag=db634167
>>> To: <sip:2155555555 at 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 at 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 at edvina.net> wrote:
>>>>
>>>>
>>>> On 05 Mar 2014, at 18:30, Marc Soda <msoda at 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 at 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 at 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 at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>>
>> --
>> Carlos
>> http://caruizdiaz.com
>> http://ngvoice.com
>> +595981146623
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
>
> --
>
> Marc Soda, Sr. Systems Engineer
> CoreDial, LLC | www.coredial.com
>
> 1787 Sentry Parkway West, Building 16, Suite 100, Blue Bell, PA 19422
> Office: (215) 297-4400 x203 | Fax: (215) 297-4401 | Email:
> msoda at coredial.com
>
> - - - - -
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission,  dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer.
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the sr-users mailing list