Dialplan module and priority

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Dialplan module and priority

Ali Pey
Hello,

Let's say I have the two following rules in my dialplan table:

Rule 1:
- match_op = 1 (regexp)
- Priority=1
- match_exp = "^888[0-9]{7}"

Rule 2:
- match_op = 1 (regexp)
- Priority=2
- match_exp = "^888444[0-9]{4}"


If I use dp_translate for 8882221234, it matches rule 1 and that's good.
If I use dp_translate for 8884441234, it still matches rule 1 and that's not good. It should match rule 2.


Is this a bug or expected behaviour?

Is there a way I can work around this?

Thanks,
Ali Pey



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialplan module and priority

SamyGo
Hi,
Swapping the priority works the way you want ? I have a feeling this makes sense (just like an ACL or firewall rules) ^888444* should get called before ^888* .



On Thu, Jul 16, 2015 at 5:47 PM, Ali Pey <[hidden email]> wrote:
Hello,

Let's say I have the two following rules in my dialplan table:

Rule 1:
- match_op = 1 (regexp)
- Priority=1
- match_exp = "^888[0-9]{7}"

Rule 2:
- match_op = 1 (regexp)
- Priority=2
- match_exp = "^888444[0-9]{4}"


If I use dp_translate for 8882221234, it matches rule 1 and that's good.
If I use dp_translate for 8884441234, it still matches rule 1 and that's not good. It should match rule 2.


Is this a bug or expected behaviour?

Is there a way I can work around this?

Thanks,
Ali Pey



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialplan module and priority

Muhammad Danish Moosa
Hi.

Higher the priority value means 888444's selection should be prioritized. Did you reload the config , have used similar rules and worked.

On Fri, Jul 17, 2015 at 3:01 AM, SamyGo <[hidden email]> wrote:
Hi,
Swapping the priority works the way you want ? I have a feeling this makes sense (just like an ACL or firewall rules) ^888444* should get called before ^888* .



On Thu, Jul 16, 2015 at 5:47 PM, Ali Pey <[hidden email]> wrote:
Hello,

Let's say I have the two following rules in my dialplan table:

Rule 1:
- match_op = 1 (regexp)
- Priority=1
- match_exp = "^888[0-9]{7}"

Rule 2:
- match_op = 1 (regexp)
- Priority=2
- match_exp = "^888444[0-9]{4}"


If I use dp_translate for <a href="tel:8882221234" value="+18882221234" target="_blank">8882221234, it matches rule 1 and that's good.
If I use dp_translate for <a href="tel:8884441234" value="+18884441234" target="_blank">8884441234, it still matches rule 1 and that's not good. It should match rule 2.


Is this a bug or expected behaviour?

Is there a way I can work around this?

Thanks,
Ali Pey



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Muhammad Danish Moosa

" The core of mans' spirit comes from new experiences. "___ Christopher McCandless

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialplan module and priority

Ali Pey
Thank you for the responses.

I have alternated priorities and every other thing I could think of and it would not change the behavior.

It always picks the first match if it's a regex type (match_op=1). It works as expected if it's equal type (match_op=0)

Priority doesn't seem to kick in when it is a regex.



On Fri, Jul 17, 2015 at 7:19 AM, Muhammad Danish Moosa <[hidden email]> wrote:
Hi.

Higher the priority value means 888444's selection should be prioritized. Did you reload the config , have used similar rules and worked.

On Fri, Jul 17, 2015 at 3:01 AM, SamyGo <[hidden email]> wrote:
Hi,
Swapping the priority works the way you want ? I have a feeling this makes sense (just like an ACL or firewall rules) ^888444* should get called before ^888* .



On Thu, Jul 16, 2015 at 5:47 PM, Ali Pey <[hidden email]> wrote:
Hello,

Let's say I have the two following rules in my dialplan table:

Rule 1:
- match_op = 1 (regexp)
- Priority=1
- match_exp = "^888[0-9]{7}"

Rule 2:
- match_op = 1 (regexp)
- Priority=2
- match_exp = "^888444[0-9]{4}"


If I use dp_translate for <a href="tel:8882221234" value="+18882221234" target="_blank">8882221234, it matches rule 1 and that's good.
If I use dp_translate for <a href="tel:8884441234" value="+18884441234" target="_blank">8884441234, it still matches rule 1 and that's not good. It should match rule 2.


Is this a bug or expected behaviour?

Is there a way I can work around this?

Thanks,
Ali Pey



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Muhammad Danish Moosa

" The core of mans' spirit comes from new experiences. "___ Christopher McCandless

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users