<div dir="ltr"><div><div><div><div><div><div><div>Hi<br><br></div>We want optimize my extensions file conf on asterisk 11.4.0 :<br><br><br></div>We have a big quantity of extensions, all are same "design":<br><br>
<br>; Destination: Gambia Type: Fixe<br> exten => _00220X.,1,Set(CDR(CodeCom)=BUS-GMB)<br> exten => _00220X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})<br> exten => _00220X.,3,Set(CALLERID(all)=${NUMID})<br>
exten => _00220X.,4,Set(CALLERPRES()=${CALLPRES})<br> exten => _00220X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)<br> exten => _00220X.,6,Hangup<br><br>; Destination: Libya Type: Fixe<br> exten => _00218X.,1,Set(CDR(CodeCom)=BUS-LBY)<br>
exten => _00218X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})<br> exten => _00218X.,3,Set(CALLERID(all)=${NUMID})<br> exten => _00218X.,4,Set(CALLERPRES()=${CALLPRES})<br> exten => _00218X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)<br>
exten => _00218X.,6,Hangup<br><br>; Destination: Tunisia Type: Fixe<br> exten => _00216X.,1,Set(CDR(CodeCom)=BUS-TUN)<br> exten => _00216X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})<br> exten => _00216X.,3,Set(CALLERID(all)=${NUMID})<br>
exten => _00216X.,4,Set(CALLERPRES()=${CALLPRES})<br> exten => _00216X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)<br> exten => _00216X.,6,Hangup<br><br>; Destination: Algeria Type: Fixe<br> exten => _00213X.,1,Set(CDR(CodeCom)=BUS-DZA)<br>
exten => _00213X.,2,AGI(Caller-ID.agi,${IAXVAR(ACCOUNTID)})<br> exten => _00213X.,3,Set(CALLERID(all)=${NUMID})<br> exten => _00213X.,4,Set(CALLERPRES()=${CALLPRES})<br> exten => _00213X.,5,Dial(SIP/Trunk-Telco/${EXTEN:2},180,rt)<br>
exten => _00213X.,6,Hangup<br><br><br></div>My .conf file is ~80000 line<br><br></div>He have a solution for reduc this ? because a lot of line if "same"<br><br></div>I think's use a AGI style:<br>
<br>; Destination: Libya Type: Fixe<br>
exten => _00218X.,1,AGI(Extensions.agi,${IAXVAR(ACCOUNTID)})<br>; Destination: Tunisia Type: Fixe<br>
exten => _00216X.,1,AGI(Extensions.agi,${IAXVAR(ACCOUNTID)})<br>; Destination: Algeria Type: Fixe<br>
exten => _00213X.,1,AGI(Extensions.agi,${IAXVAR(ACCOUNTID)})<br><br></div>and into my Extensions.agi, i sent the other line. Do you think's that it's a good idea ?<br><br></div>Best regards<br>Olivier<br>
<br><div><div><br><br><br></div></div></div>