Hi all,

 

we are developing a softphone mobile application which registers to asterisk through kamailio. Kamailo proxies the request to asterisk and replies from asterisk to the clients.

Registration works fine with asterisk authentication. The problem appears in the following flow:

  1. Mobile client A calls client B.
  2. Asterisk gets INVITE through kamailo, sends back 401, and get INVITE with credentials.
  3. Asterisk sends invite to client B towards kamailio.
  4. Kamailio forwards INVITE if client is registered or sends a push notification to client B. When client B registers, kamailio continue the suspended transaction and forwards INVITE.
  5. Client B gets INVITE, sends a SIP OK.
  6. Asterisk gets SIP OK through kamailio and sends an ACK to client B, which is OK.
  7. Asterisk sends the SIP OK to client A through kamailio.
  8. Kamailio forwards SIP OK to client A but the contact address contains the asterisk IP instead kamailio.
  9. Clilent A try to send ACK but it does not arrive to asterisk, and the call will be hungup after 30 secs.

 

So the question is what is missing, what is the correct solution? I try to use the provided configuration given in following link:

https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb

 

The difference is that kamailio has no access to asterisk database.

 

Thanks for your help.

 

With kind regards,

Peter