[asterisk-users] Match a Numer - then continue with dialplan
Leo Ann Boon
leo at datvoiz.com
Tue Dec 19 18:15:26 MST 2006
Douglas Garstang wrote:
> I just know someone is going to ask 'why would you ever want to do that?'. Here's my answer.
>
> We have two companies, each with a dialplan similar to what's below. In the event that the number being dialled does not match any number within our OWN company, we want to set the caller id to be a generic one for the company, NOT one for the user. This is a pretty normal requirement that most companies want. So, in the event that the logic flows beyond coo1_OnNet, we want to reset the caller id of say, 3254001 <Doug>, to 3254000 <Widgets Inc>. If there was a way to match against a number in the dialplan, and then continue execution after that point, we could put this statement at the end of the coo1_OnNet context and it would all be sweet. Without that, I don't have a clue how to do this... unless we stick with out current 3,000 line python script.
>
If you're not using realtime to store your SIP registry, you should be
able to look up the number in the family SIP/Registry (case sensitive)
using the DB functions. If you're using realtime, then you'll have to do
an SQL query.
Leo
More information about the asterisk-users
mailing list