[customtransf]
include=>from-internal
exten=>_XXXXXXXXXX,1,Noop()
same=>n,Set(GLOBAL(announcement)=/var/lib/asterisk/sounds/en/demo-thanks)
same=>n,Set(transf_num=${SHELL(cat /etc/asterisk/foward.list | egrep ${CALLERID(num)} | awk -F - '{print $1}')})
same=>n,Set(GLOBAL(transf)=${transf_num:0:3})
same=>n,Set(GLOBAL(dest)=${EXTEN})
same=>n,originate(Local/${transf}@customtransf_dial,exten,from-internal,${dest},1)
same=>n,Hangup()
[customtransf_dial]
exten=>_x.,1,Set(CALLERID(num)=${dest})
same=>n,Dial(SIP/${transf},,A(${announcement}))
same=>n,Hangup()
No hay comentarios:
Publicar un comentario