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:
- Mobile client A calls client B.
- Asterisk gets INVITE through kamailo, sends back 401, and get INVITE with credentials.
- Asterisk sends invite to client B towards kamailio.
- 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.
- Client B gets INVITE, sends a SIP OK.
- Asterisk gets SIP OK through kamailio and sends an ACK to client B, which is OK.
- Asterisk sends the SIP OK to client A through kamailio.
- Kamailio forwards SIP OK to client A but the contact address contains the asterisk IP instead kamailio.
- 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