Hello

sorry for the noise.
bad config caused the problem

thanks
huseyin

On Thu, Jun 16, 2016 at 1:28 PM, huseyin kalyoncu <hkalyoncu@gmail.com> wrote:
Hello,

We have kamailio running as proxy in front of a freeswitch box.
This kamailio also acts as a registrar listening both 5060 and 5090 ports.

We have two devices registered to kamailio:

Device A on port 5060
Device B on port 5090

When Device B calls Device A everything is fine. Call released successfully.

When Device A calls Device B, call setup is ok and they can talk.
But when Device A tries to release the call, Device B remains open which cannot get a BYE message.

When I dug up for the cause of the problem, I realized that:

When Kamailo receives 200OK reply on port 5090 for the UPDATE message from Device B, it relays this reply internally and then sends this reply to freeswitch box on port 5060. 
This results in loosing alias in the contact field of the reply message and
then which causes freeswitch to return BYE message with the wrong IP which is the local IP of the Device B. As a result this BYE message cannot be delivered to Device B.

Is this a normal behaviour ?  If it is so what changes should I make in the kamailio config to fix this?

You can find the ngrep outputs of the both calls as attachment.

Thanks

Huseyin Kalyoncu