Alessio Focardi
2004-Oct-04 06:27 UTC
[Asterisk-Users] exten patterns: how to match from XXX to ZZZ ?
Hello asterisk-users, just wondering: how can I write a pattern extension that states "from this extension to this other" ? For example: Calls coming to extensions [200-250] have to be trunked to a server Calls coming to extensions [251-299] have to be trunked to a different one Tnx for any help ! -- Best regards, Alessio mailto:afoc@interconnessioni.it
Benjamin on Asterisk Mailing Lists
2004-Oct-04 06:43 UTC
[Asterisk-Users] exten patterns: how to match from XXX to ZZZ ?
On Mon, 4 Oct 2004 15:27:40 +0200, Alessio Focardi <afoc@interconnessioni.it> wrote:> Calls coming to extensions [200-250] have to be trunked to a server > > Calls coming to extensions [251-299] have to be trunked to a different > onethe closest you can get to that with only two patterns would be: exten => _2[0-4]X,1,NoOp(calls to extensions 200-249) ... exten => _2[5-9]X,1,NoOp(calls to extensions 250-299) ... so if you want to split it right in the middle (200-249 is 50 extensions, 250-299 is 50 extensions) then that would work in your favour. rgds benjk -- Sunrise Telephone Systems, 9F Shibuya Daikyo Bldg., 1-13-5 Shibuya, Tokyo, Japan. NB: Spam filters in place. Messages unrelated to the * mailing lists may get trashed.
Alessio Focardi
2004-Oct-04 06:52 UTC
[Asterisk-Users] exten patterns: how to match from XXX to ZZZ ?
Hello Benjamin, It seems pretty reasonable, Tnx ! BoAML> On Mon, 4 Oct 2004 15:27:40 +0200, Alessio Focardi BoAML> <afoc@interconnessioni.it> wrote:>> Calls coming to extensions [200-250] have to be trunked to a server >> >> Calls coming to extensions [251-299] have to be trunked to a different >> oneBoAML> the closest you can get to that with only two patterns would be: exten =>> _2[0-4]X,1,NoOp(calls to extensions 200-249) BoAML> ... exten =>> _2[5-9]X,1,NoOp(calls to extensions 250-299) BoAML> ... BoAML> so if you want to split it right in the middle (200-249 is 50 BoAML> extensions, 250-299 is 50 extensions) then that would work in your BoAML> favour. BoAML> rgds BoAML> benjk -- Best regards, Alessio mailto:afoc@interconnessioni.it