[asterisk-dev] AMI originate - 2 callerid (local and remote)

Steve Davies davies147 at gmail.com
Wed Nov 26 04:14:46 CST 2008

2008/11/26 Sergey Tamkovich <serg at voipsolutions.ru>:
> Jared Smith wrote:
>> On Mon, 2008-11-24 at 15:04 +0000, Stephen Coles wrote:
>>> In the originate command you can set callerID – there should be 2 one
>>> for local and one for the remote side of the connection
>> Actually, the way it works is that the CallerID information you specify
>> is sent to the "Channel" leg of the call, and that the other one can be
>> specified in the dialplan using the CALLERID() dialplan function.
>> To take your earlier example:
>> Action: originate
>> Channel: SIP/220
>> Exten: 321654
>> Priority: 1
>> Callerid: "Computer Dial: Bob Smith" <321654>
>> You could simply put this in the dialplan:
>> exten => 321654,1,Set(CALLERID(name)=Steve)
>> exten => 321654,n,Set(CALLERID(num)=01231453123)
>> exten => 321654,n,Dial(SIP/some_provider/${EXTEN})
>> Does that make sense?
> End how to make that usable (callable) by multiple users? Should we
> create different context for each caller? That is kinda inconvenient,
> isn't it?

Yes it would be inconvenient, but only if you were silly enough to
interpret a helpful example as a fully blown implementaion.

> May be the idea of having 2 callerids in the originate(callfiles) isn't
> that bad?

It is not necessary. You pass a "variable:" in with the "Action:
originate", and use that as the callerID. Much of this type of thing
is mentioned in the WiKi page:


even if some things are mentioned only indirectly.


More information about the asterisk-dev mailing list