Hello Daniel
Attachment is the full ngrep output for the sample call.
On Wed, Apr 27, 2016 at 6:51 PM, Daniel-Constantin Mierla <miconda(a)gmail.com
wrote:
> Hello,
>
> can you make the full ngrep trace for the call (from initial invite sent
> by kamailio, with all following sip messages) and send it over here?
> Cheers,
> Daniel
>
>
> On 27/04/16 17:16, huseyin kalyoncu wrote:
>
> Hello Daniel
>
> I did some more tests and my previous statement is wrong.
> Actually it do call set_contact_alias on 200 reply for INVITEs
> but somehow it has no change.
> I really missing something here.
>
> On Wed, Apr 27, 2016 at 3:35 PM, huseyin kalyoncu < <hkalyoncu(a)gmail.com>
> hkalyoncu(a)gmail.com
wrote:
>
>> Hello Daniel
>>
>> You are right. 200OK messages are also with private IPs.
>> I think the problem is that
>> since I call dlg_bridge with Kamailio's own IP
>> It sends INVITE messages to itself first then it routes INVITE msg to
>> user location.
>> Because of this i see two record routes in the INTIVE headers and 200
>> reply headers.
>>
>> if (is_reply()) {
>> if(isbflagset(FLB_NATB)) {
>> if(is_first_hop())
>> set_contact_alias();
>> }
>> }
>>
>> But according to this code in NATMANAGE block, it only set contact if it
>> is first hope.
>> Since these messages have two record routes, this code block does not
>> modify contact field
>> Am I right? or Am I missing something else?
>>
>> Thanks
>> Huseyin
>>
>>
>> On Wed, Apr 27, 2016 at 12:50 PM, Daniel-Constantin Mierla <
>> <miconda@gmail.com>miconda@gmail.com
wrote:
>>
>>> Hello,
>>>
>>> dlg_bridge is not using the location table at all, because it has to use
>>> the contact from 200ok of INVITE.
>>>
>>> Have you used set_contact_alias() for natted 200ok received for INVITE?
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 27/04/16 11:15, huseyin kalyoncu wrote:
>>>
>>> Hello Daniel
>>>
>>> This is the sample output from our location table;
>>>
>>> kamailio=# select username,contact,received,user_agent from location
>>> where username='5678*0012';
>>> username | contact | received |
>>> user_agent
>>>
>>>
-----------+---------------------------------+-----------------------+---------------------
>>> 5678*0012 | sip:5678* <http://0012@192.168.1.21:5090>
>>> 0012@192.168.1.21:5090 | sip:DEVICE_PUBLIC_ADDRESS:5090 |
>>> Cisco/SPA504G-7.6.1
>>> (1 row)
>>>
>>>
>>> After calling dlg_bridge Kamailio firing INVITE and rings the device.
>>> After answering on this device Kamailio firing REFER message.
>>> But as you can see from ngrep output below, Kamailio is trying to send
>>> this message to address in the contact field which is a private IP.
>>>
>>> U 2016/04/27 10:58:25.745935 KAMAILIO_PUBLIC_ADDRESS:5090 ->
>>> 192.168.1.21:5090
>>> REFER sip:5678* <http://0012@192.168.1.21:5090>0012@192.168.1.21:5090
>>> SIP/2.0.
>>> Via: SIP/2.0/UDP
>>>
KAMAILIO_PUBLIC_ADDRESS:5090;branch=z9hG4bK0ab8.1c5e622e4af6b7b6c9ede7ade4a50bf8.0.
>>> Via: SIP/2.0/UDP
>>>
KAMAILIO_PUBLIC_ADDRESS;rport=5060;branch=z9hG4bK0ab8.c8a54413000000000000000000000000.0.
>>> To: <sip:5678*0012@KAMAILIO_PUBLIC_ADDRESS>;tag=199aaa02310a0799i1.
>>> From: <sip:click2call@KAMAILIO_PUBLIC_ADDRESS>
>>> ;tag=0d71401ca91009b00be5953e2813d7e4-7471.
>>> CSeq: 11 REFER.
>>> Call-ID: 63dc8c8a5ea88a30-868@KAMAILIO_PUBLIC_ADDRESS.
>>> Max-Forwards: 69.
>>> Content-Length: 0.
>>> User-Agent: Kamailio.
>>> Referred-By: sip:click2call@KAMAILIO_PUBLIC_ADDRESS.
>>> Refer-To: sip:5678*0002@KAMAILIO_PUBLIC_ADDRESS.
>>> Contact: <sip:click2call@KAMAILIO_PUBLIC_ADDRESS:5060>.
>>>
>>>
>>>
>>> On Wed, Apr 27, 2016 at 10:47 AM, Daniel-Constantin Mierla <
>>> <miconda@gmail.com>miconda@gmail.com
wrote:
>>>
>>>> Hello,
>>>>
>>>> can you send the ngrep trace for such case? I would like to look at the
>>>> headers to understand properly what do you mean.
>>>>
>>>> Cheers,
>>>>
>>>> Daniel
>>>>
>>>> On 26/04/16 15:23, huseyin kalyoncu wrote:
>>>>
>>>> Hello
>>>>
>>>> I am trying to implement click 2 call functionality on Kamailio
>>>> with dlg_bridge.
>>>> But It seems that Kamailio routes REFER messages to devices according
>>>> to Contact field of location table instead of Received field.
>>>> But if the the IP in the Contact field is private REFER messages are
>>>> failing so
>>>> does the dlg_bridge.
>>>>
>>>>
>>>> I called dlg_bridge in the config like this:
>>>>
>>>> dlg_bridge("sip:$param1", "sip:$param2",
>>>> "sip:IP_ADDRESS_OF_KAMAILIO:5060");
>>>>
>>>> It rings the device in $param1 but after answering on that device
>>>> Kamailio fails to send REFER if the Contact field for that device is
>>>> Private IP.
>>>> So it fails to initiate a call.
>>>>
>>>> How can I force Kamailio to use Received field for REFER messages
>>>> instead of Contact field?
>>>>
>>>> Thanks
>>>> Huseyin
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>> --
>>>> Daniel-Constantin
Mierlahttp://www.asipto.comhttp://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
>>>> Kamailio World Conference, Berlin, May 18-20, 2016 -
http://www.kamailioworld.com
>>>>
>>>>
>>>> _______________________________________________
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>> sr-users(a)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
listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>> --
>>> Daniel-Constantin
Mierlahttp://www.asipto.comhttp://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
>>> Kamailio World Conference, Berlin, May 18-20, 2016 -
http://www.kamailioworld.com
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users(a)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
listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin
Mierlahttp://www.asipto.comhttp://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
> Kamailio World Conference, Berlin, May 18-20, 2016 -
http://www.kamailioworld.com
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>