[asterisk-users] set(CALLERID(name) not working

sean darcy seandarcy2 at gmail.com
Sat Nov 8 21:07:04 CST 2008


I've tried to create a subroutine that sets callerid name based on number.

extensions.conf:

...........
exten => s,1,Answer()
exten => s,n,GoSub(set-callerid-name,0${CALLERID(num)},1)
exten => s,n,Dial(${mainline},60)
.......

[set-callerid-name]
exten => 0,1,NoOp( no CALLERID num set)
exten => 02025462677,1,Set(CALLERID(name) = "Fred" )
................
exten => _X.,2,NoOp(CALLERID: ${CALLERID(name)})
exten => _X.,3,Return()

But it doesn't work. CALLERID(name) isn't changed:

...............
     -- Executing [2026478447 at teliax-in:2] Answer("IAX2/john-7775", "") 
in new stack
     -- Executing [2026478447 at teliax-in:4] Gosub("IAX2/john-7775", 
"set-callerid-name|02025462677|1") in new stack
     -- Executing [02025462677 at set-callerid-name:1] 
Set("IAX2/john-7775", "CALLERID(name) = "Fred" ") in new stack
     -- Executing [02025462677 at set-callerid-name:2] 
NoOp("IAX2/john-7775", "CALLERID: Cell Phone   CT") in new stack
     -- Executing [02025462677 at set-callerid-name:3] 
Return("IAX2/john-7775", "") in new stack
     -- Executing [2026478447 at teliax-in:5] Dial("IAX2/john-7775", 
"DAHDI/1|60") in new stack
     -- Called 1
............


Why not? How come CALLERID(name) isn't Fred??

sean




More information about the asterisk-users mailing list