Discussion:
[asterisk-dev] AMI originate - 2 callerid (local and remote)
Stephen Coles
2008-11-24 15:04:19 UTC
Permalink
In the originate command you can set callerID - there should be 2 one
for local and one for the remote side of the connection



Am using the originate command to dial a number to my phone - I have to
set it up so my phone comes up with my extension and name for it to show
my extension and name on the phone I'm calling (unlike when you dial
direct from the phone).



I would like to show that the phone is being dialled by the computer on
my phone or even the party I'm dialling and then my name and number to
show on the remote phone



An example of the originate command with 2 caller id's:



Action: originate

Channel: SIP/220

Exten: 321654

Callerid_local: "Computer Dial: Bob Smith" <321654>

Callerid_remote: "Steve" <01231453123>

Priority: 1



This would then show Computer Dial: Bob Smith <321654> on my phone and
on the bob smith's phone (the phone number I'm dialling) Steve
01231453123



Callerid_local and callerid_remote could be called CallerID_Channel and
CallerID_Exten to keep them in line with the other asterisk variables
used.



Stephen Coles
IT Services
Wellpak(UK) Ltd

Tel:

+44 (0)1386 768200

Address:

Enterprise Way
Vale Business Park
Evesham WR11 1GS

Fax:

+44 (0)1386 768300


Email:

***@wellpak.co.uk <mailto:***@wellpak.co.uk>

Website:

www.wellpak.co.uk <http://www.wellpak.co.uk>

The information contained in this message or any of its attachments may
be privileged and confidential, and is intended exclusively for the
addressee.
The views expressed may not be official policy, but the personal views
of the originator. If you are not the addressee, any disclosure,
reproduction, dissemination or use of this communication is not
authorised. If you have received this message in error, please advise
the sender by using the reply facility in your e-mail software.

Wellpak (UK) Limited: Registration #3124635. Registered office:
Enterprise Way, Vale Business Park, Evesham WR11 1GS, England.

P Please consider the environment before printing this email
Jared Smith
2008-11-24 15:21:17 UTC
Permalink
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.
Sergey Tamkovich
2008-11-26 09:46:48 UTC
Permalink
Post by Jared Smith
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.
Action: originate
Channel: SIP/220
Exten: 321654
Priority: 1
Callerid: “Computer Dial: Bob Smith” <321654>
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?

May be the idea of having 2 callerids in the originate(callfiles) isn't
that bad?
Steve Davies
2008-11-26 10:14:46 UTC
Permalink
Post by Sergey Tamkovich
Post by Jared Smith
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.
Action: originate
Channel: SIP/220
Exten: 321654
Priority: 1
Callerid: "Computer Dial: Bob Smith" <321654>
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.
Post by Sergey Tamkovich
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:

http://www.voip-info.org/tiki-index.php?page=Asterisk+Manager+API+Action+Originate

even if some things are mentioned only indirectly.

Regards,
Steve

Loading...