Hi All,
          I recently started working for a voip  company and I am put into testing of ser and asterisk.
The set up is as follows.


UA1-------NAT------------SER----------------Asterisk
                                  |
                                UA2

All the messages(Invites,Oks, ACKs) from the UA1 are passed to the SER, the SER forwards them to the Asterisk, then the asterisk hands it back to the SER and the SER forwards it to UA2. Same works vice a versa too.(I have no clue why the set up is this way!!)

I have NAThelper/RTP proxy running.
Both UA1 and UA2 are registered to the SER

UA1 can make a call to UA2 and both can hear each other.
But UA2 cannot make a call to UA1. Here is what happens.

UA2 sends invite to SER.The SER changes the headers and 'c' and 'm' field in SDP and forwards it to Asterisk. The Asterisk acting as B2BUA, again changes Call ID and required fields and hands it back to SER.The SER then forwards the invite to UA1.UA1 sends an OK back to SER which the SER gives it to Asterisk.As soon as Asterisk receives OK, it sends an ACK back to SER for UA1, but the SER never forwards this ACK back to UA1.The Asterisk then sends OK to SER for UA2 which SER forwards correctly.But UA1 is still waiting for the ACK…hence the signalling gets looped.(ringing can be heard).

   The ACK which the Asterisk sends back contains the field Route<sip: 617……@private IP of UA1>
   The only places the Asterisk can get this private IP is from the first OK which SER sends Asterisk.And in this OK two fields contain this address, the contact field in header and 'o' in SDP. So my questions are:

1) What is the route field for.Does it tell the SER where to forward the request?
2) Where does the asterisk pick up the Route field from?(contact header or 'o' field)
3) If this is the problem that what changes do I need to make?

I hope I have not confused you.Would really appreciate any help.

Thanks,
Hitesh Jain.