I would like to set the caller ID for outbound calls based on the calling party’s preference. Some people want their DID to be used while others prefer the company’s main number to be used. How can I determine who the calling party is within my outbound context? With that information, I can lookup their caller ID preference and then call SetCallerID.
You could issolate every phone in their own context then include the primary one.
In each small context, you then define the outbound extension and right before the Dial, you use Set(callerid(num)). This way, every phone has the callerid that they want.
But to do this, you must be on a PRI line or VoIP that accept calledID Change
[quote=“Dimitripietro”]You could issolate every phone in their own context then include the primary one.
In each small context, you then define the outbound extension and right before the Dial, you use Set(callerid(num)). This way, every phone has the callerid that they want.
But to do this, you must be on a PRI line or VoIP that accept calledID Change[/quote]
We provide VoIP service to multiple companies, each one with up to 60 phones. We currently have a separate outbound context for each company so all users within the company use the company’s main TN for their caller ID.
What you suggest would work, but would add so much code to the dial plan that it doesn’t seem worth it. Thanks for the suggestion.
what about an AGI that queried a db table for the preferred CallerID. you could have a little web app to maintain the preferences then.
or how about a prefix that asked for the CallerID (maybe even an IVR and menu options) then carried on to Dial() ?
[quote=“baconbuttie”]what about an AGI that queried a db table for the preferred CallerID. you could have a little web app to maintain the preferences then.
or how about a prefix that asked for the CallerID (maybe even an IVR and menu options) then carried on to Dial() ?[/quote]
In order to query a db table, I’d have to know who the originating caller is. That’s the information I’m looking for - how do I know the originating caller? In the outbound context, the EXTEN variable holds the number to be dialed, not the number of the extension that has originated the call.
you’ll have the channel value (e.g. SIP/100-2345) so you can get it from there can’t you ?
I’m not following you here. How do I determine the originating caller’s TN?
ok, i just dug out an AGI i wrote last year to block internal callers from calling particular numbers … in AGI you can use $input{"channel’} and parse that, or $input{“callerid”}
that should be all you need.