[SR-Users] Problem routing to voicemail

Olle E. Johansson oej at edvina.net
Thu Nov 15 18:09:37 CET 2012


15 nov 2012 kl. 11:58 skrev Christophe ROY <christophe.roy.thales at gmail.com>:

> Hi everyone
> 
> I'm trying to integrate Asterisk with Kamailio for voicemail.
> I tried to follow this tutorial: http://kb.asipto.com/asterisk:realtime:kamailio-3.3.x-asterisk-10.7.0-astdb
> BUT:
> 
> - I had to adapt it because I use LDAP authentication with Kamailio
> - I had problems with Asterisk 10.7 (problems with chan_sip module crashing) so I've installed Asterisk 11 on another VM
> - we have high-availability with 2 Kamailio servers, with Kamailio listening on TCP (constraint from our SSL gateway in front of Kamailio) on a "virtual IP" (created by keep-alive): this VIP is not visible with ifconfig, but you can see it with the command "ip addr sh eth0"
> 
> For now, we use Linphone on Windows as SIP clients to test.
> If I don't define WITH_ASTERISK, calls work, I can call someone at domain.tld
> However, if I define WITH_ASTERISK, calls fail (even with destination registered and available) and I have these errors in the logfile:
> 
> Nov 15 11:45:08 kamailio1 /usr/sbin/kamailio[25308]: ERROR: tm [ut.h:333]: no corresponding socket for af 2
> Nov 15 11:45:08 kamailio1 /usr/sbin/kamailio[25308]: ERROR: tm [t_fwd.c:424]: ERROR: can't fwd to af 2, proto 1  (no corresponding listening socket)

Seems like Kamailio and ASterisk is not using the same transports. Check sip.conf in Asterisk so that you enable the proper transports
that you are using for forwarding. If Asterisk is ONLY listening to udp, add ";transport=udp" to the forwarding URI. To force TCP, use
"transport=tcp".

Now since the error message indicates proto 1, which in Kamailio-speak is UDP, it seems like you have an issue with that.

> Nov 15 11:45:08 kamailio1 /usr/sbin/kamailio[25308]: ERROR: tm [t_fwd.c:1530]: ERROR: t_forward_nonack: failure to add branches
> Nov 15 11:45:08 kamailio1 /usr/sbin/kamailio[25308]: INFO: <script>: reply error
> Nov 15 11:45:08 kamailio1 /usr/sbin/kamailio[25308]: ERROR: sl [sl_funcs.c:371]: ERROR: sl_reply_error used: I'm terribly sorry, server error occurred (1/SL)
> 
> It seems to happen on the if (!t_relay()) line in ROUTE[RELAY]
> 
> 192.168.14.25 is the real IP of the Kamailio server, 
> 192.168.14.24 is the VIP of the Kamailio "cluster"
> 192.168.14.28 is the IP of the Mysql server
> 192.168.14.32 is the IP of the Asterisk server
> 
> I can't find why the relay doesn't work. I've tried to bypass the VIP and have Kamailio listen on the real IP, but it still doesn't work: I don't seem to have the same errors as above, but I don't see any traffic between Kamailio and Asterisk.
> 
> What could be the problem? Thanks for your help
If you forward register to Asterisk, you have to configure outboundproxy in sip.conf in asterisk so that you get messages back from Asterisk. Or use one of my branchces with support for the SIP Path header in Asterisk (using the PATH module in Kamailio).

Using the onsend route you can check IP, port and transport used to deliver a message from Kamailio. CHeck the Kamailio cookbook on the wiki for more information about that.

/O


--
* Olle E. Johansson - oej at edvina.net
* Kamailio & SIP Masterclass Miami FL December 2012
* http://edvina.net/training/




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121115/78e472b8/attachment-0001.htm>


More information about the sr-users mailing list