By comparing the SIP messages I found that in case of client behind NAT, it sends invite to pstn gateway with OpenSER IP address in contact header and probably thats why bye is sent to OpenSER so it keeps looping in OpenSER and not relaying to the user agent. Any idea why this could happen?

Thanks,
Ruchir Brahmbhatt
Director
Ecosmob Technologies Pvt. Ltd.


-----Original Message-----
From: Ruchir Brahmbhatt <ruchir.brahmbhatt@ecosmob.com>
Reply-To: ruchir.brahmbhatt@ecosmob.com
To: Openser users mailing list <users@lists.openser.org>
Bcc: Krunal Patel <krunal.patel@ecosmob.com>
Subject: BYE not relaying properly
Date: Wed, 28 May 2008 00:15:34 +0530

Hi All,

I have OpenSER 1.2.3(previously it was 1.2.1 but installed latest version to make sure that it is not an OpenSER bug) configured and running for following features: I'm having one really strange issue. My OpenSER is configured to listen on particular IP address say 1.2.3.4. I've added alias for the domain name say voip.domain.com.
User agent register to OpenSER using voip.domain.com as a proxy. They can call each other & pstn. I'm using Media Proxy for handling media in case of clients behind NAT. Audio & signaling seems to be working fine in case of internal and pstn calling.

I have configured call forwarding unconditional, no answer & busy. In case of unconditional call forwarding, audio and signaling works fine. But when I test call forwarding on no answer or busy, audio is proper but signaling doesn't work properly. Specially BYE. Here is my setup: If 1000 calls 2000 and 2000 doesn't pickup the phone in 30 seconds(configured using fr_inv_timer param of tm module), the pstn number is pushed in request uri and request is sent to gateway for pstn termination.
Audio works fine. If caller(1000) hangs up, the callee is hung up properly. However if callee (pstn number) hangs up the call, the caller doesn't receive the BYE message and hence stays connected. Media Proxy session is closed properly but in OpenSER, BYE request is not sent to caller but keeps looping in OpenSER instead.
I have several doubts about this issue. One thing is that the pstn gateway is sending BYE to OpenSER IP address instead of domain name. I know this kind of problem can occur if we haven't configured alias parameter properly. Reference: http://www.openser.org/mos/view/-OpenSER-Installation-Notes/ (Section 4. Troubleshooting)
I have added ip and domain in domain table as well but still no change.

I've been facing this issue since several days and still not able to solve. I've done many OpenSER setups but having such issue for the first time. I've compared the OpenSER config file to my older setups but it seems proper.
Can anyone please guide me in correct direction?


Thanks,
Ruchir Brahmbhatt