my execif variable ignored in Asterisk dialplan
Matthew Barrera
For Extension 4111 I want to rewrite the caller id, if is 4111 must become 4442 I put this in dialplan reload and..is ignored. Why?
exten => 4111,1,ExecIf($["${CALLERID(num)}" = "4111"]?Set(${CALLERID(num)=4442))
exten => 4111,n(dial),Dial(DAHDI/g7/${EXTEN},10)
exten => 4111,n,Hangup() 1 Answer
Solution found, must be posted in the "called" number, not in caller number. The correct syntax is
exten => 4112,1,ExecIf($["${CALLERID(num)}" = "4111"]?set(CALLERID(all)=My company<1234489>))