[SR-Users] LCR, problem with routing (prefix, from_uri, grp_id)
Iñaki Baz Castillo
ibc at aliax.net
Wed May 12 17:30:52 CEST 2010
2010/5/12 Maciej Bylica <mbsip at gazeta.pl>:
>>>> In db:
>>>> +----+-----------+----------------+--------+----------+
>>>> | id | prefix | from_uri | grp_id | priority |
>>>> +----+-----------+----------------+--------+----------+
>>>> | 1 | 48 | 48 | 1 | 1 |
>>>> | 2 | 48 | 49 | 2 | 1 |
>>>> | 3 | 482223344 | 77.77.77.77 | 3 | 1 |
>>>> +----+-----------+----------------+--------+----------+
>>>
>>>> Unfortunately:
>>>> - call is originated on 77.77.77.77 with CLD 48222334455 number and
>>>> kamailio forward this call to grp_id=3 SIPWORLD which is okay. The
>>>> problem is that if the call fail, kamailio will try to use 77.77.77.70
>>>> and 77.77.77.71 from grp_id=1 which is wrong. I have no idea how to
>>>> provide a kind of huntstop in grp_id=3.
This occurs because the rules with id=1 and id=3 do match the INVITE
so if the first fails (longest matching prefix) the other will be
executed. This is how LCR works.
Use load_gws() with a pseudo-variable as I recommend you in the other
mail so you won't rely on the From URI but on the call origin you have
previously analized in the script.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-users
mailing list