[asterisk-users] Teliax: where's the space in CALLERID(num) from?
sean darcy
seandarcy2 at gmail.com
Sat Jun 6 14:05:21 CDT 2009
I'm having trouble setting callerid with teliax. I use a simple dial-out
subroutine to set the callerid depending on the calling extension, and
then dial out. Teliax is saying they're not seeing any callerid info.
[DialOut] ; subroutine for dialing out.
exten => s,1,NoOp(Context: DialOut called with outgoing number ${ARG1} )
exten => s,n,NoOp(${CALLERID(num)}XXXX)
exten => s,n,GotoIf($[${CALLERID(num)} > 200]?dial-out)
exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ?
${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} )
exten => s,n(dial-out),Dial(${First-Preferred-Out}/${ARG1})
...............
Here's the CLI when dialing out:
-- Executing [917yyyxxxx at longdistance:2] Gosub("SIP/178-081c52a0",
"DialOut,s,1(917yyyxxxx)") in new stack
-- Executing [s at DialOut:1] NoOp("SIP/178-081c52a0", "Context:
DialOut called with outgoing number 917yyyxxxx ")
in new stack
-- Executing [s at DialOut:2] NoOp("SIP/178-081c52a0", "178XXXX") in
new stack
-- Executing [s at DialOut:3] GotoIf("SIP/178-081c52a0", "0?dial-out")
in new stack
-- Executing [s at DialOut:4] Set("SIP/178-081c52a0",
"CALLERID(num)=xxxyyyy178 ") in new stack
-- Executing [s at DialOut:5] Dial("SIP/178-081c52a0",
"IAX2/zzzzzzzzzzzzz at nyc.teliax.net/917yyyxxxx") in new stack
................
Now I think the reason that teliax isn't seeing my callerid is that it's
looking for a valid 10 digit number. But when * sets the callerid in
s at DialOut:4 there's a trailing space(and yes, in real life I use an
actual 10 digit number), so teliax is probably getting 11 characters as
the callerid.
But CALLERID(num) does not start with a trailing space - see
s at DialOut:2, so concatenating it with the rest of the number shouldn't
create a space. Right?
sean
More information about the asterisk-users
mailing list