I have successfully set up asterisk with SIP Trunk and custom caller ID works fine when calling numbers within the United States (SIP Trunk from US).
When calling a US number, the custom caller ID shows up as specified in asterisk config on the recipient phone without country code (+1).
However, I want to do international calls as well with custom caller ID, but when calling international numbers and specifying country code (0045 for Denmark etc), the number shows up as +145. I cannot seem to find a way to get rid of the +1 country code.
Is this possible? I do not have any DID’s as these are only used for incoming calls from my understanding, and I only care about outbound calls.
Do I have to get a SIP Trunk provider from each of the countries I wish to call to set a callerID that will show up without country code on the recipients phone or can I do some magic in the asterisk configuration files?
Your problem is not entirely clear.
First of all, I do not see any caller ID manipulations in the provided dialplan - you manipulate with DIDs only.
Then, when you are making outgoing calls, your VoIP provider might replace your original caller ID with some predefined format, and adapting a caller ID to the international format (E.164) is a usual practice.
Or I did not understand you correctly and you should alter called ID at your end for incoming rather than outgoing calls? Could you clarify this?
Sorry for being unclear, I am a bit confused myself.
In my SIP Trunk settings, I have configured it to use the E164 format.
To explain, let me use two examples with my current setup:
I set my caller ID to 8004003000
I call my friend in the United States
Custom caller ID (8004003000) shows up as the number calling on my friends phone.
When I call Denmark however:
I set my caller ID to 75757575
I call my friend in Denmark
Number +175757575 shows up on my friends phone as the number calling
The country code +1 ruins it, as my friend can see that this is not a Danish number calling him, but instead a number from the United States because the +1 is set. Because of this reason, he will not pick up the phone.
What I want, is the number to show up correctly (without +1) on international calls.
When it comes to the configuration files, I have no idea what is the correct approach. Should I do this differently?
If I understood your scenario correctly, you cannot influence caller ID on your friend’s phone in Denmark because your VoIP provider adds prefix +1 automatically. It is a usual prctice for providers to adapt numbers to E.164 in international calls.
“The country code +1 ruins it, as my friend can see that this is not a Danish number calling him” - this is true as you are leasing a US number from your VoIP provider, not a Danish one, right?
“Because of this reason, he will not pick up the phone” - why? Incoming calls should be free for him.
This is essentially a commercial question, not a technical one. You need to find a service provider that will handle the caller ID in the way you want.
However, before doing that, have you tried sending + followed by the Danish country code?
Also note that when I get spam calls, I find the are tagged as INTERNATIONAL or OUT OF AREA, but with a UK number. You may find that your calls are flagged as international by the Danish operator, independently of the Caller ID, and the customer sir reacting to that, rather than the +1.
As your SIP carrier is US for sure it would display +1 to your foreign countries calls. You can’t change it and probably need to go through a SIP trunk with Danish carrier if you want to display a “local” CLI.
There is nothing in SIP that requires this behaviour. It is a choice made by the management of the provider, although any sensible provider would require you present a full international Danish number, not the Danish national number.