We help IT Professionals succeed at work.
Get Started

Asterisk 1.8.6 setting outbound callerid based on caller

Last Modified: 2013-11-12
Hi Gurus,

I'm an asterisk programming novice and I need help with finding the correct syntax to match and set an outgoing call from a specific user from a specific SIP Trunk and set as a specific caller id, i.e.:

User A from SIP Trunk A @ exten 202 ==> dialing out ==> set callerid = 3101234567
User B from SIP Trunk B @ exten 202 ==> dialing out ==> set callerid = 3101235555

The problem is that the calls are originating from another PBX, i.e. MS Lync, via a SIP Trunk.

So my thinking is, I need to find out the outgoing SIP info of the caller, if it matches, set the caller id via:

So I'm not sure if i need to use a marco or gotoif or what...Please help.

Watch Question
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE