On Wednesday 18 February 2009, Juan Asencio wrote:
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]#
Hi Juan,
it seems that it can't forward the message, and then it gets a 408.
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?
yes, this is probably the problem. Kamailio needs to lookup the DNS names for
relaying the message to the appropriate target. If this fails, it can't
forward the message. You can use IP addresses in the cr table for testing,
though.
Cheers,
Henning