[asterisk-users] Pre-routing manipulation of calls

Kevin DeGraaf kevin at kdegraaf.net
Fri Dec 19 14:18:17 CST 2008


> I use number 1 with a Gosub(get_name,s,1)
> 
> It jumps to a mysql lookup against the number and sets the name and 
> continues on.

Based on the ambiguity of the documentation with respect to extension
sorting order [0], I ended up going with the "pre-incoming" context
idea.  It worked fine.

[pre-incoming]
exten =>
_X.,1,Set(CALLERID(name)=${IF($["${DB(cidname/${CALLERID(num)})}" = ""]
?${CALLERID(name)}:${DB(cidname/${CALLERID(num)})})})
exten => _X.,n,Goto(incoming,${EXTEN},1)

By the way, I'm using the AstDB for CallerID overrides, which seems like
it would be more reliable than using an external database.  Is there
some advantage (e.g. scalability) to using MySQL?

Thanks.

[0] http://tinyurl.com/3jn62a

-- 
Kevin DeGraaf



More information about the asterisk-users mailing list