Re: [Asterisk-Users] Pattern matching rules for least cost routing
On Wed, 2004-04-21 at 01:03, Fran Boon wrote: On Tue, 2004-04-20 at 23:21, Mark Elkins wrote: No matter what is dialled - I always go out on the 'Default' line. Swapping order makes no difference. If I comment out the 'default' - it does match the 'Cell' pattern - and works. Pattern-matching within a context is not done based on order at all. include = cell include = default [cell] exten = _00[78][234].,1,Playback(posix-cellphone) exten = _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) [default] exten = _0.,1,Playback(posix-defaultroute) exten = _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) Thanks (to the three replies). Ended up leaving the cell pattern matching where it was and putting just the default [def-out] in its own context and 'including' that to the end of the pattern matching with... include= def-out Little by little - I get to shape asterisk to the way I want it to work.. -- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ [EMAIL PROTECTED] - Mark J Elkins, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496 signature.asc Description: This is a digitally signed message part
Re: [Asterisk-Users] Pattern matching rules for least cost routing
On 2004 Apr 20, at 17:21, Mark Elkins wrote: I've got two patterns I want to match on making an outgoing call... (one day - to do Least Cost Routing for Cell/Mobile calls) Firstly - I prefer '0' rather than '9' to get an outside line... Either its a call to a mobile No... (072 -or- 082 -or- 083 -or- 084) or its just another number to dial... I added the following... the playback just advises me which 'route' is being taken In 'extentions.conf' I have... ;Cell Phone call exten = _00[78][234].,1,Playback(posix-cellphone) exten = _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) ;Default catch all - just dial it exten = _0.,1,Playback(posix-defaultroute) exten = _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) No matter what is dialled - I always go out on the 'Default' line. Swapping order makes no difference. If I comment out the 'default' - it does match the 'Cell' pattern - and works. Shouldn't the number I dial match the longest match - not the shortest match as it seems to be doing? Is there a way to change that logic?? Yes, and there's a way without using multiple contexts: just make all extensions the same length, prior to the .: exten = _0XX.,1,Playback(posix-defaultroute) -Tilghman ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Pattern matching rules for least cost routing
I've got two patterns I want to match on making an outgoing call... (one day - to do Least Cost Routing for Cell/Mobile calls) Firstly - I prefer '0' rather than '9' to get an outside line... Either its a call to a mobile No... (072 -or- 082 -or- 083 -or- 084) or its just another number to dial... I added the following... the playback just advises me which 'route' is being taken In 'extentions.conf' I have... ;Cell Phone call exten = _00[78][234].,1,Playback(posix-cellphone) exten = _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) ;Default catch all - just dial it exten = _0.,1,Playback(posix-defaultroute) exten = _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) No matter what is dialled - I always go out on the 'Default' line. Swapping order makes no difference. If I comment out the 'default' - it does match the 'Cell' pattern - and works. Shouldn't the number I dial match the longest match - not the shortest match as it seems to be doing? Is there a way to change that logic?? -- . . ___. .__ Posix Systems - Sth Africa /| /| / /__ [EMAIL PROTECTED] - Mark J Elkins, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496 signature.asc Description: This is a digitally signed message part
Re: [Asterisk-Users] Pattern matching rules for least cost routing
At 12:21 AM +0200 on 4/21/04, Mark Elkins wrote: I've got two patterns I want to match on making an outgoing call... (one day - to do Least Cost Routing for Cell/Mobile calls) Firstly - I prefer '0' rather than '9' to get an outside line... Either its a call to a mobile No... (072 -or- 082 -or- 083 -or- 084) or its just another number to dial... I added the following... the playback just advises me which 'route' is being taken In 'extentions.conf' I have... ;Cell Phone call exten = _00[78][234].,1,Playback(posix-cellphone) exten = _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) ;Default catch all - just dial it exten = _0.,1,Playback(posix-defaultroute) exten = _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) No matter what is dialled - I always go out on the 'Default' line. Swapping order makes no difference. If I comment out the 'default' - it does match the 'Cell' pattern - and works. Shouldn't the number I dial match the longest match - not the shortest match as it seems to be doing? Is there a way to change that logic?? [snip] Here's a quick instruction on how to get matching working more clearly with use of the include statement: http://lists.digium.com/pipermail/asterisk-users/2003-November/027148.html Now, to do more extensive least call routing, you should look at Tholo's LCR database application, which clearly is for the advanced Asterisk weenie with many many routes or service providers. JT ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Pattern matching rules for least cost routing
On Tue, 2004-04-20 at 23:21, Mark Elkins wrote: -SNIP- ;Cell Phone call exten = _00[78][234].,1,Playback(posix-cellphone) exten = _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) ;Default catch all - just dial it exten = _0.,1,Playback(posix-defaultroute) exten = _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) No matter what is dialled - I always go out on the 'Default' line. Swapping order makes no difference. If I comment out the 'default' - it does match the 'Cell' pattern - and works. Pattern-matching within a context is not done based on order at all. To achieve the effect you want: include = cell include = default [cell] exten = _00[78][234].,1,Playback(posix-cellphone) exten = _00[78][234].,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) [default] exten = _0.,1,Playback(posix-defaultroute) exten = _0.,2,Dial(${TRUNK}:${EXTEN:${TRUNKMSD}}) F ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users