Different CalerID (outbound calls and internal extension)

How can I setup CalledID for a specific extension, but still allow it to preserve the internal extension when making SIP calls? I need different DID CallerID for extensions for outbound calls, but when calling an internal extension it comes up with the DID caller ID (not an internal extension). Any ideas?


The question is not clear.

You can set caller ID:

  • explicitly with the caller ID function;
  • for arriving calls in the device entry for the source;
  • as a default, for outgoing call, in the general section of the technology configuration file;
  • if not using Remote Party ID, etc., using fromuser in sip.conf, for outgoing calls.

Using the function is the most flexible, but it depends on the dialplan. As Asterisk doesn’t come with a production dialplan, you will need to provide the relevant part of your dialplan.

Thank you David,

So, to be more precise, I need to have following:

  1. When I make calls to outside (outbound calls) I’d like to have CallerID according to my DID’s pool
  2. When I make calls to internal extensions I’d like users to see my internal extension as well.

In your dialplan you 'll have a exenstion of even better context for internal calls

example for numbers 400-499
exten => _4XX,1,NoOp(Internal Call)
exten => _4XX,n,Set(CALLERID(num)=My internal number
exten => _4XXn,Dial(SIP/${exten})

for outgoing calls you 'll have something like this:

exten =>_0XXXXXXXXX,NoOp(External Call)
exten => _0XXXXXXXXX,n,Set(CALLERID(num)=My DID number
exten => _0XXXXXXXXX,Dial(SIP/${exten})

you can find more info at voip-info.org/wiki/view/Setting+Callerid

The CallerID for internal calls is set in the sip.conf (parameter callerid):

callerid="Name Surname"<345>

For calls to the PSTN, you will have to use the CallerID function to change the CallerID on outgoing calls:

exten => _.X,n,Set(CALLERID(all)="Name"<DID_number>)
exten => _.X,n,Dial(SIP/Provider_Trunk/Number_to_Dial)

It works now - thank you all!