Asterisk not BYE to URI in Contact


I have set up OpenSIPs to work with Asterisk 1.8.4. Phones registered to OpenSIPs, but database view created for Asterisk as well. When I make a call with will terminate to Asterisk. Asterisk doesnot BYE to Conact URI but it puts its IP in R-URI 's domain part. I have inspect on the INVITE message, it received a correct CONTACT. Here is my simple diagram configuration.

Phones (>( OpenSIPs ( ------------->Asterisk (

When OpenSIPs forward call to Asteriks, R-URI is 902@ and Contact is 100@ But when it acks, R-URI is 100@ instead of 100@

I use record_route() on OpenSIPs.

What is the cause of this problem? Thanks in advance.

You need to post the actual sip debugging output.