[Asterisk-Users] Re-write callerid?
Trevor Peirce
tpeirce at digitalcon.ca
Fri Mar 25 10:25:08 MST 2005
Remco Barende wrote:
> For example Henk has SIP/208 and MSN 00312010000208
> I would like to display Henk <208> for any call that stays in the
> company but 00312010000208 to the outside.
If your internal numbers always match your outside numbers just prefix it
SetCallerID("Company Name" <00312010000${CALLERIDNUM}>)
If outside numbers do not always match internal numbers you can use the
astdb to help
First populate the database
CLI> database put outcid 208 00312010000208
CLI> database put outcid 209 00312010000209
etc.
Second create a macro (not tested)
[macro-setclid]
exten => s,1,DBGet(clid=outcid/${CALLERIDNUM})
exten => s,2,SetCallerID("Company Name" <${clid}>)
exten => s,102,SetCallerID("Company Name" < -- main company number here
-- >)
Then before you dial it's as easy as
Macro(setclid)
This is similar to what I am currently using to tackel this exact problem.
More information about the asterisk-users
mailing list