[SR-Users] Using =~ to get the group identifier with longest match

Iñaki Baz Castillo ibc at aliax.net
Mon Jun 6 11:12:49 CEST 2011


2011/6/6 Juha Heinanen <jh at tutpro.com>:
>> Thanks. I don't need different priorities, I just need that, in case
>> of multiple matching (i.e. ^1 ,  ^10) the longest matching wins. Does
>> the dialplan module allow it?
>
> try by giving rule ^1 lower priority than ^10.

Yes, the trick will be:

  priority = 20 - strlen(match_exp)

so longest expressions would have higher priority.

-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list