How to change the caller-id for outbound calls

Hello, Guys;
I have sip trunk from X provider, They gave me Caller-ID numbers range for example;
202020030 to 202020060

My question is:

  • When I am making outbound call/Outgoing call, Customers will see the First DID number or the Trunk number like " 202020030"!, How shall I change this DID to replace any Number or Special tollfree number instead of displaying The DID(default DID)?
    I need please help!

You can change the caller ID using the CALLERID function. Like so:

same => n,Set(CALLERID(num)= 202020060)

If it does not work, check if you’ve configured the trunk to override the caller ID, if not, your provider might require a specific caller ID, and force it on all outbound calls, your provider can tell you if that’s the case.

How to override the caller id Please?

I tried the Option one and is not working.

What do you mean override callerID please? How to configure?

I don’t remember exactly where and what, but look at your pjsip configuration, the parameters are documented in the Asterisk wiki, at Just search for one of the parameters you already use, to find the right page.

Also check in the SIP traffic towards your provider, that Asterisk is indeed sending what you expect. If Asterisk is sending what you except, your provider is blocking you from changing the CID, and you would need to have them accept your CID.

You can use tools like ngrep or better, sngrep to look at the SIP traffic transmitted from Asterisk. You can also use the logging features of the PJSIP modules.

Your options with the provider, will depend on local laws and regulations, as well as the providers policies.

can you check that you are not setting CID in the pjsip configuration (can you post it)
also can you check what asterisk sends in the invite to your provider

Hello, I am SIP.conf not Psip.conf!

In that case you need to make urgent plans to upgrade. chan_sip is no longer in the develpment code branch.

I suspect the issue here is that you have set fromuser to an account name, on an account that is authenticated by name. As the From user is the default method for signalling caller ID, that will mean that the caller ID will not get through. You need to find out what methods the provide accepts for caller ID and enable them. Typically, if not using the From user, they will use P-Asserted-Identity or Remote-Party-ID, but there are some outlyers, which may require custom headers to be set, rather than just enabling options.

Fromuser, I set the domain name( using IP as per Provider). Shall I change fromuser? If yes what should I do?

It would be very strange to set fromuser to the domain name!

You need to ask the provider as they determine how the From user is used and how the caller ID can be passed.

It is possible that setting sendrpid to one or either of “yes” or “pai” will work in your case, but that depends on the provider.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.