El Domingo, 5 de Octubre de 2008, John D escribió:
Not sure if I'm properly wording this, but I used
to have two asterisk
servers speaking to each other over SIP, configured via sip.conf. I now
need a way to forward calls from my Asterisk instance to my Kamailio server
so it can properly distribute the call. At this point however, I cannot
find any documentation in order to properly have the two speak to each
other. Would anyone be kind enough to point me in the right direction to
establish that connection?
If I understand properly, you want:
Asterisk_1 <-----> Kamailio <------> Asterisk_2
Well, at least there are two ways to get it:
1) Sending the request directly from Asterisk_1 to Kamailio and Kamailio
forwarding it to Asterisk_2:
In Asterisk_1 sip.conf:
[asterisk_2]
host = ip_kamailio
When kamailio receives a request from Asterisk_1 (it can detect it by matching
the source IP, for example), it can forward it to Asterisk 2 by setting $du
or changing the RURI by modifing $ru (or just $rd = RURI host part).
2) Using Kamailio as outbound proxy.
In Asterisk_1 sip.conf:
[asterisk_2]
host = ip_asterisk_2
outboundproxy = ip_kamailio
In this case, theorically, the request would have a "Route: sip:ip_kamailio"
so when Kamailio gets the request it will route it basing on that Route
header.
But I'm not sure if Asterisk implements it correctly (maybe it doesn't add the
Route header). If not, kamailio should route as in 1), basing on source IP.
--
Iñaki Baz Castillo