Hello Daniel and Henning, thank you for your help.
I add the t_relay(...) and now the call is sent to the gateway. But I'm
getting some errors.
I will appreciate your advice:
I'm using it to route calls base on the prefix number. This seems to work
some how (with some errors) and I'm not satisfy with the results that I'm
getting.
I would expect that on the second invite, when it sends from Kamailio to
the Gateway it would change to the host that the carrierroute assigned,
something like 456789(a)host5.dk-ws.
You can see some more info in the following lines.
I'm calling from a X-lite softphone to the number 456789, carrierroute
reads the prefix and base on the carrierroute db table assigns the host
that the call should be route to. In this case is host5.dk-ws
When I check # cat /var/log/messages I get the following errors and I
can't figure it out what they are:
Feb 18 12:38:59 localhost /sbin/kamailio[14687]:
INFO:carrierroute:cr_do_route: uri 456789 was rewritten to
sip:456789@host5.dk-ws
Feb 18 12:38:59 localhost /sbin/kamailio[14687]:
ERROR:tm:t_forward_nonack: no branch for forwarding
Feb 18 12:38:59 localhost /sbin/kamailio[14687]: ERROR:tm:w_t_relay:
t_forward_nonack failed
Feb 18 12:39:24 localhost kernel: device eth0 left promiscuous mode
Feb 18 12:39:28 localhost /sbin/kamailio[14695]:
CRITICAL:tm:t_should_relay_response: pick_branch failed (lowest==-1) for
code 408
[root@localhost kamailio]#
Also, if I do a # ngrep 456789 -qt
interface: eth0 (192.168.50.0/255.255.255.0)
match: 456789
U 2009/02/18 12:40:51.606688 192.168.50.118:8236 -> 192.168.50.93:5060
INVITE sip:456789@192.168.50.93 SIP/2.0..Via: SIP/2.0/UDP
192.168.50.118:8236;
U 2009/02/18 12:40:51.611241 192.168.50.93:5060 -> 192.168.50.118:8236
SIP/2.0 100 Giving a try..Via: SIP/2.0/UDP 192.168.50.118:8236;
U 2009/02/18 12:40:51.612321 192.168.50.93:5060 -> 192.158.50.114:5060
INVITE sip:456789@192.168.50.93 SIP/2.0..Record-Route:
<sip:192.168.50.93;lr=on>..Via: SIP/2.0/UDP 192.168.50.93;
U 2009/02/18 12:40:51.617089 192.168.50.93:5060 -> 192.168.50.118:8236
SIP/2.0 500 Server error occurred (19/SL)..Via: SIP/2.0/UDP
192.168.50.118:8236;
U 2009/02/18 12:40:51.623317 192.168.50.118:8236 -> 192.168.50.93:5060
ACK sip:456789@192.168.50.93 SIP/2.0..Via: SIP/2.0/UDP 192.168.50.118:8236;
U 2009/02/18 12:40:52.031349 192.168.50.93:5060 -> 192.158.50.114:5060
INVITE sip:456789@192.168.50.93 SIP/2.0..Record-Route:
<sip:192.168.50.93;lr=on>..Via: SIP/2.0/UDP 192.168.50.93;
U 2009/02/18 12:40:53.031163 192.168.50.93:5060 -> 192.158.50.114:5060
INVITE sip:456789@192.168.50.93 SIP/2.0..Record-Route:
<sip:192.168.50.93;lr=on>..Via: SIP/2.0/UDP 192.168.50.93;
And keeps sending invites...
I would expect that on the second invite, when it sends from 192.168.50.93
to 192.168.50.114 it would change to the host that the carrierroute
assigned, something like 456789(a)host5.dk-ws.
My question is if it should change it or is doing what it suppose to do?
All the ip addresses where I'm sending the traffic are fake, so it is not
a gateway to respond the call. Is that what is causing the errors and why
is not passing the call with the host address that cr assigned?
Cheers,
Juan.-
Hello,
your issue has nothing to do with a call stateful server.
You simply do record route in your config so for within dialog requests
the routing is don properly.
For initial invite, I assume (as I never used it) carrierroute sets the
R-URI so you just use:
t_relay("udp:asteriskip:asteriskport");
and in asterisk you dial the address in the r-uri.
If carrierroute is setting the dst_uri, then add it as special header,
use same to forward to asterisk, but there use the special header to
dial out.
Cheers,
Daniel
On 02/16/2009 02:54 PM, Juan Asencio wrote:
Hi list,
I need some explanation about using Kamailio as a Call Stateful Proxy.
I understand that Kamailio is a transaction stateful proxy. And I would
like to learn how I can achieve a Call Stateful Proxy using Kamailio.
I'm going to use Asterisk for transcoding to receive and send calls to
the
users and Kamailio should do the routing process using carrierroute,
deciding to which carrier the calls should be sent to.
Customer Carrier1
Group1 \ /
\ /
\ /
Customer ---->GW ---> Kamailio ---> GW ---> Carrier2
Group2 Asterisk Asterisk
/ \
/ \
Customer / Carrier3
Group3
Now it works with x-lite, if customer1 calls to certain number the call
is
send to the correspondent carrier base on the prefix number.
But when I add the GWs, how I can send the call to the GW IP address
(Asterisk) and then forward to the IP address of the carrier that I
assigned for that prefix number in my carrierroute table.
Can any of you could help me to clarify this or guide me about what to
read, so I could implement this.
Thanks in advance,
Juan.-
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
--
Daniel-Constantin Mierla
http://www.asipto.com