OK, I have decided to use htable to store the AVP returned by the LCR module. I have everything working, except I have run into a strange issue with my failure_route logic.
Immediately after calling next_gw() in my initial REQUEST_ROUTE or FAILURE_ROUTE, I populate an htable which maps the socket I should send all in-dialog requests from. This gets reset each time we call next_gw() in the event that a gateway can't service my request for some reason. The issue I have is that on FAILURE_ROUTE scenarios where I am fetching the next gateway, it doesn't appear that the force_send_socket() is actually working for subsequent calls. The real example I am seeing is below. I am seeing my log in the ELSE statement, but Kamailio continues to send FROM X.X.X.180. Not sure what I could be doing wrong...
method | status | fromip | toip | send_grp |
INVITE | udp:X.X.X.190:5060 | udp:X.X.X.179:5060 | ||
INVITE | udp:X.X.X.180:5060 | udp:216.82.224.202:5060 | 1 | |
INVITE | 100 | udp:216.82.224.202:5060 | udp:X.X.X.180:5060 | |
INVITE | 408 | udp:216.82.224.202:5060 | udp:X.X.X.180:5060 | |
INVITE | udp:X.X.X.180:5060 | udp:216.82.225.202:5060 | 1 | |
INVITE | 100 | udp:216.82.225.202:5060 | udp:X.X.X.180:5060 | |
INVITE | 404 | udp:216.82.225.202:5060 | udp:X.X.X.180:5060 | |
INVITE | udp:X.X.X.180:5060 | udp:209.249.3.78:5060 | 0 | |
INVITE | 100 | udp:209.249.3.78:5060 | udp:X.X.X.180:5060 | |
INVITE | 503 | udp:209.249.3.78:5060 | udp:X.X.X.180:5060 | |
INVITE | udp:X.X.X.180:5060 | udp:208.93.226.12:5060 | 0 | |
INVITE | 100 | udp:208.93.226.12:5060 | udp:X.X.X.180:5060 | |
INVITE | 503 | udp:208.93.226.12:5060 | udp:X.X.X.180:5060 | |
INVITE | 503 | udp:X.X.X.179:5060 | udp:X.X.X.190:5060 | |
ACK | udp:X.X.X.190:5060 | udp:X.X.X.179:5060 |
2010/6/28 Juha Heinanen <jh@tutpro.com>:
It's required to use to_gw_grp() in branch_route as changes done by> Ernest Mavrel writes:
>
>> I use same scenario as Geoffrey. But I have problem with
>> force_send_socket() in failure_route[1].
>> If is first gw online, then everything is ok, force send socket work.
>> But when first gw is offline and lcr try second gw, then message go
>> trough socket which is called on first gw. I am using kamailio 1.4.2. Is
>> this a bug?
>
> i don't know if it is a bug or not, but i call force_send_socket in
> branch route and it has worked as expected.
LCR in the RURI are not visible until etering into branch_route.
--
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users