On Fri, 25 Mar 2005, Trevor Peirce wrote:

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.


Great this and Florian Overkamp's suggestion will solve the problem indeed.

And in extensions.conf I have separate extensions for national and international calls so I can just create a set for each.

Thanks both!
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to