drouting() number matching

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

drouting() number matching

Mark Farmer
Hi everyone, can I use pattern matching in drouting groups and rules?
So for example I'd like to match on +4412345678*@example.com

In Asterisk dialplan I would do _+4412345678X

Many thanks
Mark.


--
Mark Farmer
[hidden email]

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

Re: drouting() number matching

Mark Farmer
OK I think I realised my mistake - rules are matched on longest prefix.
So I think my question should be: Can I use the same principle for usernames in groups?

On a side note, is it possible to match the group based on the destination domain instead of the source domain?

Thanks
Mark.



On Mon, 25 Mar 2019 at 09:56, Mark Farmer <[hidden email]> wrote:
Hi everyone, can I use pattern matching in drouting groups and rules?
So for example I'd like to match on +4412345678*@example.com

In Asterisk dialplan I would do _+4412345678X

Many thanks
Mark.


--
Mark Farmer
[hidden email]


--
Mark Farmer
[hidden email]

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

Re: drouting() number matching

Bogdan-Andrei Iancu-2
Hi Mark,

Using the group support in drouting is optional. You can directly supply the routing group as parameter to the do_routing() function - this gives you the possibility to use more flexible way to determine the routing group, like using the dialplan module (which does regexp based matching and translation) - feed in the username and get back the group (by using the dp_translate() function).

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/
On 03/25/2019 01:32 PM, Mark Farmer wrote:
OK I think I realised my mistake - rules are matched on longest prefix.
So I think my question should be: Can I use the same principle for usernames in groups?

On a side note, is it possible to match the group based on the destination domain instead of the source domain?

Thanks
Mark.



On Mon, 25 Mar 2019 at 09:56, Mark Farmer <[hidden email]> wrote:
Hi everyone, can I use pattern matching in drouting groups and rules?
So for example I'd like to match on +4412345678*@example.com

In Asterisk dialplan I would do _+4412345678X

Many thanks
Mark.


--
Mark Farmer
[hidden email]


--
Mark Farmer
[hidden email]


_______________________________________________
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