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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to