[asterisk-users] Extenxions Optimization

Olivier CALVANO o.calvano at gmail.com
Sun Jun 9 03:30:45 CDT 2013


Hi

We want optimize my extensions file conf on asterisk 11.4.0 :


We have a big quantity of extensions, all are same "design":


; Destination: Gambia Type: Fixe
        exten => _00220X.,1,Set(CDR(CodeCom)=BUS-GMB)
        exten => _00220X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})
        exten => _00220X.,3,Set(CALLERID(all)=${NUMID})
        exten => _00220X.,4,Set(CALLERPRES()=${CALLPRES})
        exten => _00220X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)
        exten => _00220X.,6,Hangup

; Destination: Libya Type: Fixe
        exten => _00218X.,1,Set(CDR(CodeCom)=BUS-LBY)
        exten => _00218X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})
        exten => _00218X.,3,Set(CALLERID(all)=${NUMID})
        exten => _00218X.,4,Set(CALLERPRES()=${CALLPRES})
        exten => _00218X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)
        exten => _00218X.,6,Hangup

; Destination: Tunisia Type: Fixe
        exten => _00216X.,1,Set(CDR(CodeCom)=BUS-TUN)
        exten => _00216X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})
        exten => _00216X.,3,Set(CALLERID(all)=${NUMID})
        exten => _00216X.,4,Set(CALLERPRES()=${CALLPRES})
        exten => _00216X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)
        exten => _00216X.,6,Hangup

; Destination: Algeria Type: Fixe
        exten => _00213X.,1,Set(CDR(CodeCom)=BUS-DZA)
        exten => _00213X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})
        exten => _00213X.,3,Set(CALLERID(all)=${NUMID})
        exten => _00213X.,4,Set(CALLERPRES()=${CALLPRES})
        exten => _00213X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)
        exten => _00213X.,6,Hangup


My .conf file is ~80000 line

He have a solution for reduc this ? because a lot of line if "same"

I think's use a AGI style:

; Destination: Libya Type: Fixe
        exten => _00218X.,1,AGI(Extensions.agi,${IAXVAR(ACCOUNTID)})
; Destination: Tunisia Type: Fixe
        exten => _00216X.,1,AGI(Extensions.agi,${IAXVAR(ACCOUNTID)})
; Destination: Algeria Type: Fixe
        exten => _00213X.,1,AGI(Extensions.agi,${IAXVAR(ACCOUNTID)})

and into my Extensions.agi, i sent the other line. Do you think's that it's
a good idea ?

Best regards
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130609/12fe9e88/attachment.htm>


More information about the asterisk-users mailing list