[ Context 'macro-exttypeA' created by 'pbx_config' ] 'a' => 1. Dial(Local/l${ARG1}@${ARG3}/n|100) [pbx_config] 'o' => 1. Goto(s|1600) [pbx_config] 's' => 1. SetVar(exttimeout=20) [pbx_config] 2. ODBCget(exttimeout=${ARG3}/MYPHONE${ARG1}EXTTIMEOUT) [pbx_config] 3. SetVar(originalnumber=${CALLERIDNUM}) [pbx_config] 4. GotoIf($[${CALLERIDNUM:0:9} = 1${ARG3:1:8}]?5:6) [pbx_config] 5. SetCIDNum($[${CALLERIDNUM:9} - ${ARG4}]) [pbx_config] 6. SetVar(callernumber=${CALLERIDNUM}) [pbx_config] 7. SetVar(callername=${CALLERIDNAME}) [pbx_config] 8. SetVar(mystatus=NOSTATUS) [pbx_config] 9. ResetCDR() [pbx_config] 10. SetVar(knownnumber1=1) [pbx_config] 11. SetVar(knownnumber2=1) [pbx_config] 12. Goto(200) [pbx_config] 200. GotoIf($["${callername:0:1}" = "-"]?201:206) [pbx_config] 201. SetCIDName(${callername:1}) [pbx_config] 202. SetVar(callername=${CALLERIDNAME}) [pbx_config] 203. Goto(212) [pbx_config] 206. GotoIf($["${ARG1:0:1}" = "l"]?2000:212) [pbx_config] 212. GotoIf($["${ACCOUNTCODE}" != ""]?217:213) [pbx_config] 213. Cut(callid=UNIQUEID|.|1) [pbx_config] 214. Cut(callidlast=UNIQUEID|.|2) [pbx_config] 215. SetVar(lastaccount=${callid}${callidlast}) [pbx_config] 216. SetAccount(${lastaccount}) [pbx_config] 217. SetVar(lastaccount=${ACCOUNTCODE}) [pbx_config] 218. ODBCget(desthist=CALLHISTORY/${ARG3}${lastaccount}) [pbx_config] 219. SetCIDName(${callername}${desthist:-$[1 + ${LOCALNUMBERLENGTH}]}) [pbx_config] 220. ODBCput(CALLHISTORY/${ARG3}${lastaccount}=${desthist}F${ARG1:-${LOCALNUMBERLENGTH}}) [pbx_config] 221. SetVar(number3=9) [pbx_config] 222. GotoIf($["${ARG1:0:1}" = "l"]?2000:223) [pbx_config] 223. GotoIf($["${callername:-4:1}" = "F"]?224:400) [pbx_config] 224. SetVar(number3=l${desthist:-3}) [pbx_config] 225. Goto(400) [pbx_config] 400. GotoIf($[${ARG1:0:3} = ${callernumber}]?3000:401) [pbx_config] 401. ODBCget(knownnumber1=${ARG3}/MYPHONE${ARG1}MOBILE) [pbx_config] 402. ODBCget(knownnumber2=${ARG3}/MYPHONE${ARG1}HOME) [pbx_config] Here, the overflow message is given and the CPU goes to 100% when ${callernumber} is too big 403. GotoIf($[${knownnumber1} = ${callernumber}]?4000:404) [pbx_config] 404. GotoIf($[${knownnumber2} = ${callernumber}]?4000:600) [pbx_config] 600. SetVar(number1=${ARG2}) [pbx_config] 601. Cut(callid=UNIQUEID|.|1) [pbx_config] 602. SetVar(rounds=0) [pbx_config] 603. ODBCget(rounds=LOOPCHECK/${ARG3}${callid}) [pbx_config] 604. SetVar(rounds=$[${rounds} + 1]) [pbx_config] 605. ODBCput(LOOPCHECK/${ARG3}${callid}=${rounds}) [pbx_config] 606. GotoIf($[${rounds} > 10]?2000:620) [pbx_config] 620. SetVar(CFIM=0) [pbx_config] 621. ODBCget(CFIM=${ARG3}/MYPHONE${ARG1}CFIM) [pbx_config] 622. GotoIf($[${CFIM} = 0]?640:623) [pbx_config] 623. SetVar(number1=Local/l${CFIM}@${ARG3}/n) [pbx_config] 624. Goto(640) [pbx_config] 640. SetVar(JOIN=0) [pbx_config] 641. ODBCget(JOIN=${ARG3}/MYPHONE${ARG1}JOIN) [pbx_config] 642. GotoIf($[${JOIN} = 0]?800:643) [pbx_config] 643. SetVar(number1=Local/l${JOIN}@${ARG3}/n&${number1}) [pbx_config] 644. Goto(800) [pbx_config] 800. GotoIf($["${number1:0:8}" = "Local/l0"]?801:802) [pbx_config] 801. SetCIDNum(${originalnumber}) [pbx_config] 802. Dial(${number1}|${exttimeout}|ft) [pbx_config] 803. SetVar(mystatus=${DIALSTATUS}) [pbx_config] 804. Goto(1000) [pbx_config] 902. Dial(${ARG2}|100|ft) [pbx_config] 1000. GotoIf($["${mystatus}" = "CONGESTION"]?1001:1010) [pbx_config] 1001. SetVar(CFND=0) [pbx_config] 1002. ODBCget(CFND=${ARG3}/MYPHONE${ARG1}CFND) [pbx_config] 1003. GotoIf($[${CFND} = 0]?1010:1004) [pbx_config] 1004. SetVar(number2=Local/l${CFND}@${ARG3}/n) [pbx_config] 1005. Goto(1200) [pbx_config] 1010. GotoIf($["${mystatus}" = "BUSY"]?1011:1020) [pbx_config] 1011. SetVar(CFBS=0) [pbx_config] 1012. ODBCget(CFBS=${ARG3}/MYPHONE${ARG1}CFBS) [pbx_config] 1013. GotoIf($[${CFBS} = 0]?1020:1014) [pbx_config] 1014. SetVar(number2=Local/l${CFBS}@${ARG3}/n) [pbx_config] 1015. Goto(1200) [pbx_config] 1020. GotoIf($["${mystatus}" = "NOANSWER"]?1021:1400) [pbx_config] 1021. SetVar(CFNA=0) [pbx_config] 1022. ODBCget(CFNA=${ARG3}/MYPHONE${ARG1}CFNA) [pbx_config] 1023. GotoIf($[${CFNA} = 0]?1400:1024) [pbx_config] 1024. SetVar(number2=Local/l${CFNA}@${ARG3}/n) [pbx_config] 1025. Goto(1200) [pbx_config] 1200. GotoIf($["${number2:0:8}" = "Local/l0"]?1201:1202) [pbx_config] 1201. SetCIDNum(${originalnumber}) [pbx_config] 1202. Dial(${number2}|$[${exttimeout} * 2]|ft) [pbx_config] 1203. Goto(1400) [pbx_config] 1400. GotoIf($["${CALLERIDNAME:0:1}" = "-"]?2000:1401) [pbx_config] 1401. GotoIf($[${mystatus} = CONGESTION]?1410:1402) [pbx_config] 1402. MailboxExists(${ARG1}@${ARG3}) [pbx_config] 1403. Goto(s|1600) [pbx_config] 1410. MailboxExists(${ARG1}@${ARG3}) [pbx_config] 1411. Goto(s|1600) [pbx_config] 1503. Voicemail(sb${ARG1}@${ARG3}) [pbx_config] 1504. Goto(s|1520) [pbx_config] 1511. Voicemail(su${ARG1}@${ARG3}) [pbx_config] 1512. Goto(s|1520) [pbx_config] 1520. Wait(5) [pbx_config] 1521. Goto(1600) [pbx_config] 1600. ODBCget(number3=${ARG3}/MYPHONE${ARG1}LAST) [pbx_config] 1601. SetVar(number3=l${number3}) [pbx_config] 1602. GotoIf($["${number3:1:1}" = "0"]?1604:1605) [pbx_config] 1603. SetCIDNum(${originalnumber}) [pbx_config] 1604. Dial(Local/${number3}@${ARG3}/n|100|ft) [pbx_config] 1605. Busy() [pbx_config] 1701. Goto(1602) [pbx_config] 2000. Dial(${ARG2}|100|ft) [pbx_config] 2101. Hangup() [pbx_config] 3000. MailboxExists(${ARG1}@${ARG3}) [pbx_config] 3001. Hangup() [pbx_config] 3101. VoicemailMain(s${ARG1}@${ARG3}) [pbx_config] 3102. Hangup() [pbx_config] 4000. DigitTimeout(10) [pbx_config] 4001. System(/var/lib/asterisk/sounds/personalprompts/fileexists /var/lib/asterisk/sounds/personalprompts/welcome9999${ARG3}.wav) [pbx_config] 4002. Read(response|/var/lib/asterisk/sounds/personalprompts/welcome9999${ARG3}|1) [pbx_config] 4003. GotoIf($[${response} > -1]?4004:4000) [pbx_config] 4004. GotoIf($[${response} < 4]?4005:4000) [pbx_config] 4005. Goto(s|$[$[${response} * 10] + 4000]) [pbx_config] 4010. Goto(3000) [pbx_config] 4020. Goto(600) [pbx_config] 4030. DigitTimeout(3) [pbx_config] 4031. SetCallerID(1${ARG3:1}${ARG1}) [pbx_config] 4032. DISA(no-password|${ARG3}) [pbx_config] 't' => 1. Playback(vm-goodbye) [pbx_config]