[asterisk-users] Multiple 'routes' to extension in different
contextes. How to influence search oder?
Brian Candler
B.Candler at pobox.com
Mon Oct 16 07:20:20 MST 2006
On Mon, Oct 16, 2006 at 02:08:05PM +0200, Benoit Panizzon wrote:
> [myself]
> ; National Destinations
> exten => _0z.,1,Dial(SIP/someisp/${EXTEN});
> exten => _0z.,n,Dial(Zap/g1/${EXTEN});
>
> ; International Destinations
> exten => _00z.,1,Dial(SIP/someisp/${EXTEN});
> exten => _00z.,n,Dial(Zap/g1/${EXTEN});
>
> include => freedestinations;
>
> [freedestinations]
> ; Local Free Destionations
> exten => _0800.,1,Dial(Zap/g1/${EXTEN});
>
> ; International Free Destionations
> exten => _0049.,1,Dial(SIP/FWD/*${EXTEN}:2);
> ------------------------------
>
> Now I get into this situation. I would like to call a german Free Numer:
> 0049800xxxxxxx
>
> This is best matched in the context [freedestinations], and also the cheapest.
> My Telco charges a fee to call free destionations abroad.
> But still: exten => _00z. is being matched.
>
> Is there a way to solve this in a clever way? I have started just copying all
> [freedestination] extensions into [myself] but every time I have to change
> anything I have to change it everywhere.
Try moving the [myself] destinations into another context, say [pstn], then
do
[myself]
include => freedestinations
include => pstn
whilst your friends' contexts only include => freedestinations
Check the wiki:
http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf+sorting
Regards,
Brian.
More information about the asterisk-users
mailing list