[SR-Users] Dialplan question

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 8 10:34:28 CEST 2011


Hello,

On 7/7/11 1:42 PM, alex pappas wrote:
> Dear all,
>
> I have these 3 entries in the dialplan:
>
> dpid   pr   match_exp      attr
>
> 2       50   ^38.+              porvider_A
> 2       50   ^3802.+          porvider_B
> 2       50   ^3806.+          porvider_C
>
> with the fifo command :
>
> *kamctl fifo dp_translate 2 3806328881*
> Output::
> ATTRIBUTES::* porvider_A*
>
> I would expect that the dialplan module would choose the third choice 
> which is the correct one for this call.
>
> From the dialplan documentation i understand that the priority is 
> needed when the prefixes are overlaping in terms of they are the same 
> but with different attrs like :
> 2       50   ^38.+              porvider_A
> 2       50   ^3802.+          porvider_B
> *2       50   ^3806.+          porvider_C*
> *2       50   ^3806.+          porvider_D*
> *
> *
> here i understand that I should use priorities.
>
> Does anyone knnows how this works ??
the overlapping applies to matching expressions, not like string 
comparison of them. So, indeed, in this case ^38.+ will match first and 
will be selected. You have to set lower priority for it.

In other words, the module goes one expression by one, order by 
priority, until it has a match. At that time it returns. It does not go 
to all expressions and try to find the longest match.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110708/6c426f91/attachment.htm>


More information about the sr-users mailing list