[Asterisk-Users] CallerID/variable setting.
Ken D'Ambrosio
ken at jots.org
Mon Apr 24 09:57:06 MST 2006
Hey, all. I'm trying to set my CID such that, internally, I see a
four-digit extension (which is also handy when checking VM), but
externally, I see the full 10-digit number. So I plugged these lines into
my extensions.conf:
exten => _XXXXXXX,1,GotoIf($[ ${CALLERIDNUM} != 1625]?4:2)
exten => _XXXXXXX,2,Set(CALLERIDNUM=6031234${CALLERIDNUM:1})
exten => _XXXXXXX,3,NoOp(${CALLERIDNUM})
exten => _XXXXXXX,4,Dial(${OUTBOUNDTRUNK}/${EXTEN})
(I wanted to test against my own extension, "1625"; if that worked, I
wanted to strip off the "1", and then prepend the 603-123-4 to my
remaining three digits.)
Which is all well and good -- until I actually try to use it. Then, I get:
-- Executing GotoIf("SIP/1625-f89a", "0?4:2") in new stack
-- Goto (internal,7654321,2)
-- Executing Set("SIP/1625-f89a", "CALLERIDNUM=6031234625") in new stack
-- Executing NoOp("SIP/1625-f89a", "1625") in new stack
-- Executing Dial("SIP/1625-f89a", "Zap/g1/7654321") in new stack
Why does my "NoOp" line show my 1625 extension, when CALLERIDNUM is -- as
far as I can tell -- being set to 6031234625? (I looked against the "Set"
command page on the Wiki, and I think I'm doing it right.)
Asterisk 1.2.3, if that matters.
Thanks,
-Ken
More information about the asterisk-users
mailing list