vi /opt/avx/conf/templates/exten4_macro.txt
exten => i,5,Hangup()
[InComing]
exten => x,1,SetSrcContext()
exten => x,2,Set(Fwcount=1)
exten => x,3,GotoIF(${LEN(${LINENUM})}?4:300)
exten => x,4,checkInComing(${LINENUM}|DARGS|time|Paras|Cause)
exten => x,5,GotoIf($[${AVXCALLCOUNT}>0]?201:6)
exten => x,6,Hangup
exten => x,201,Set(routeCount=0)
exten => x,202,Set(routeCount=$[${routeCount}+1])
exten => x,203,Set(CALLSTR=${CALLSTR-${routeCount}})
exten => x,204,GotoIf($[${routeCount}=${AVXCALLCOUNT}]?205:205)
exten => x,205,MixMonitor(${CALLERID(number)}.avx|b)
exten => x,206,Set(CALLERID(number)=${AVXCALLERID-${routeCount}})
exten => x,207,Noop
exten => x,208,Dial(${CALLSTR},60,tT${mclass})
exten => x,209,Goto(r-${DIALSTATUS},1)
exten => x,300,Goto(macro-mainmenu,s,1)
exten => s,1,AGI(crm.php,http://192.168.1.125/checkcall.php)
exten => s,2,SetSrcContext()