Hey guys, I’m trying to set a callerid based on what extension is calling out… I have tried to do it this way:
;Dial Out with full 10 digit number
exten=>_NXXNXXXXXX,1,NoOp(#### [from-internal] ####)
exten=>_NXXNXXXXXX,2,Set(CALLER_NUMBER=${CALLERID(num)})
exten=>_NXXNXXXXXX,3,NoOp(#### ${CALLER_NUMBER} ####)
exten=>_NXXNXXXXXX,4,Gotoif($["${CALLER_NUMBER}" = "1111111111"]?10:7)
exten=>_NXXNXXXXXX,5,Gotoif($["${CALLER_NUMBER}" = "2222222222"]?13:7)
exten=>_NXXNXXXXXX,6,Gotoif($["${CALLER_NUMBER}" = "3333333333"]?16:7)
exten=>_NXXNXXXXXX,7,Set(CALLERID(num)=0000000000)
exten=>_NXXNXXXXXX,8,Dial(SIP/${EXTEN}@TRUNK)
exten=>_NXXNXXXXXX,9,Hangup()
exten=>_NXXNXXXXXX,10,Set(CALLERID(num)=1111111111)
exten=>_NXXNXXXXXX,11,Dial(SIP/${EXTEN}@TRUNK)
exten=>_NXXNXXXXXX,12,Hangup()
exten=>_NXXNXXXXXX,13,Set(CALLERID(num)=2222222222)
exten=>_NXXNXXXXXX,14,Dial(SIP/${EXTEN}@TRUNK)
exten=>_NXXNXXXXXX,15,Hangup()
exten=>_NXXNXXXXXX,16,Set(CALLERID(num)=3333333333)
exten=>_NXXNXXXXXX,17,Dial(SIP/${EXTEN}@TRUNK)
exten=>_NXXNXXXXXX,18,Hangup()
For some reason, I can’t get it to jump to the right section… it always uses the first callerid with “0000000000”
Any help appreciated.
Thanks.