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

Jared Smith jsmith at digium.com
Mon Nov 24 09:21:17 CST 2008


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?


-- 
Jared Smith
Training Manager
Digium, Inc.




More information about the asterisk-dev mailing list