[Asterisk-Users] Extensions.conf sugestion?

Dave Packham dave.packham at utah.edu
Fri May 16 09:51:25 MST 2003


we are in process of writing a PHP interface for * conf files.  we are parsing the files like INI files but the only prob I have so far is that separate extensions in a context dont have any unique tag that I can capture.

This works ok


[trunkld]
;
; Long distance context accessed through trunk
;
exten => _91NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:1})
exten => _91NXXNXXXXXX,2,Congestion

[international]
;
; Master context for international long distance
;
ignorepat => 9
include => longdistance
include => trunkint



This does not, how do I separate the extensions apart from the [default] context so that PHP can modify them seperatly?

[default]
;
exten => s,1,Background,radsgreet
;exten => s,2,Setmusiconhold,default
;exten => s,2,Dial,Phone/phone1|20
exten => t,1,Hangup
exten => i,1,Playback,invalid
exten => i,2,Goto,s|1

; Dave's Extension
exten => 70907,1,Dial,SIP/70907|30
exten => 70907,2,VoiceMail,u70907
exten => 70907,102,VoiceMail,b70907
exten => 70907,103,Hangup

; Andrew's Extension
exten => 70902,1,Dial,SIP/70902|30
exten => 70902,2,VoiceMail,u70902
exten => 70902,102,VoiceMail,b70902
exten => 70902,103,Hangup


Can we add something like this to * that wont kill older versions? so that I can parse out the extensions to be searched on and modified?

{70907}
; Dave's Extension
exten => 70907,1,Dial,SIP/70907|30
exten => 70907,2,VoiceMail,u70907
exten => 70907,102,VoiceMail,b70907
exten => 70907,103,Hangup

{70902}
; Andrew's Extension
exten => 70902,1,Dial,SIP/70902|30
exten => 70902,2,VoiceMail,u70902
exten => 70902,102,VoiceMail,b70902
exten => 70902,103,Hangup


Dave Packham




More information about the asterisk-users mailing list