[Asterisk-Users] How does * process the extensions??

WipeOut . wipeout at linuxmail.org
Sat Mar 29 11:31:47 MST 2003


Hi,

How does * read and process the extension.conf file??

The reason I ask is that I think it probably has a very large impact on how the calls are routed and processed by the system especially when it comes to least cost routing..

Let me explain...with an example..

I am using the * Devkit to get to grips with the system, so I have and X100P (Zap/1) and and S100U (Zap/2)..

Below is my extensions.conf and the output from 'show dialplan'...

When I look at 'show dialplan' on the console the order of the various entries has been shifted around in a different order to the way it was entered into the extensions.conf file.. So the file must not processed sequentially..

The way it is setup now appears to work but I have had to make a slightly odd [dialout] configuration in so that it would in fact do the leased cost routing and use the international numbers correctly..

So does the order of the entries in the show dialplan have any relevance to the way the system works or is there some other logic that determines the way the calls are routed and processed?? 

BTW if there is something that I have done in this config that is fundamentally wrong please let me know what it is and why it is wrong.. I am still a newbie and have only had a working system for about a week..

Thanks..

===== extensions.conf - start =====

[general]
static=yes
writeprotect=no

[globals]

[default]
;incoming calls
exten => s,1,Dial(Zap/2)

[extensions]
exten => 1234,1,Dial(Zap/2,,t)
exten => 1234,2,Congestion
exten => 1235,1,Dial(SIP/1235,,t)
exten => 1235,2,Congestion
exten => 1236,1,Dial(SIP/1236,,t)
exten => 1236,2,Congestion

include => parkedcalls
include => dialout

[dialout]
ignorepat => 9
exten => _9[01][1-9].,1,Dial(Zap/1/${EXTEN:1})
exten => _9[01][1-9].,2,Congestion

include => international

[international]
ignorepat => 9

; Mobile phones - South Africa
exten => _90027[78].,1,Dial(Zap/1/<access-number>ww${EXTEN:1})
exten => _90027[78].,2,Congestion

; Landlines - South Africa
exten => _90027[1-3].,1,Dial(Zap/1/<access-number>ww${EXTEN:1})
exten => _90027[1-3].,2,Congestion

; Canada - All Phones
exten => _9001.,1,Dial(Zap/1/<access-number>ww${EXTEN:1})
exten => _9001.,2,Congestion

===== extensions.conf - end =====

===== show dialplan - start =====

[ Context 'international' created by 'pbx_config' ]
  '_9001.' =>       1. Dial(Zap/1/<access-number>ww${EXTEN:1})        [pbx_config]
                    2. Congestion()                               [pbx_config]
  '_90027[1-3].' => 1. Dial(Zap/1/<access-number>ww${EXTEN:1})        [pbx_config]
                    2. Congestion()                               [pbx_config]
  '_90027[78].' =>  1. Dial(Zap/1/<access-number>ww${EXTEN:1})        [pbx_config]
                    2. Congestion()                               [pbx_config]

  Ignore pattern => '9'                                           [pbx_config]

[ Context 'dialout' created by 'pbx_config' ]
  '_9[01][1-9].' => 1. Dial(Zap/1/${EXTEN:1})                     [pbx_config]
                    2. Congestion()                               [pbx_config]

  Include =>        'international'                               [pbx_config]
  Ignore pattern => '9'                                           [pbx_config]

[ Context 'extensions' created by 'pbx_config' ]
  '1234' =>         1. Dial(Zap/2||t)                             [pbx_config]
                    2. Congestion()                               [pbx_config]
  '1235' =>         1. Dial(SIP/1235||t)                          [pbx_config]
                    2. Congestion()                               [pbx_config]
  '1236' =>         1. Dial(SIP/1236||t)                          [pbx_config]
                    2. Congestion()                               [pbx_config]

  Include =>        'parkedcalls'                                 [pbx_config]
  Include =>        'dialout'                                     [pbx_config]

[ Context 'default' created by 'pbx_config' ]
  's' =>            1. Dial(Zap/2)                                [pbx_config]

===== show dialplan - end =====
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze



More information about the asterisk-users mailing list