Hello Daniel

Yes, it is working just fine with UDP but it is not working when the transport of device switched to TCP.
The call is stuck because getting 408 Time out for REFER. 
I can send a ngrep capture as soon as I get one.

Thanks
Huseyin

   

On Fri, Apr 29, 2016 at 12:23 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:

Hello,

got distracted by other tasks and upcoming kamailio world stuff ...

So you got it working now, right?

Cheers,
Daniel


On 28/04/16 19:22, huseyin kalyoncu wrote:
Hello Daniel

After all Kamailio was not calling set_contact_alias
on reply received from itself. So in reply_route block calling following code
resolved the issue.

        if (src_ip == "KAMAILIO_IP_ADDRESS" && status == "200") {
                if ($fU == "click2call") {
                        set_contact_alias();
                }
        }

Thank you for your helps and your understanding.

Best wishes

Huseyin


On Thu, Apr 28, 2016 at 7:20 PM, huseyin kalyoncu <hkalyoncu@gmail.com> wrote:
Hello Daniel

I forgot to mention when I sent the capture file.
There is only single Kamailio instance running but It listens multiple ports.
5090 for outside traffic and 5060 for inside traffic (other Kamailio servers, FS servers, etc.) 

On Wed, Apr 27, 2016 at 7:49 PM, huseyin kalyoncu <hkalyoncu@gmail.com> wrote:
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@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@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> 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      
-----------+---------------------------------+-----------------------+---------------------
(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
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.



On Wed, Apr 27, 2016 at 10:47 AM, Daniel-Constantin Mierla <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:


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 list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://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@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

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://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@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

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://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@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

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users