Providers have different requirements for formatting outbound caller ID.
If you want to guess at a solution, for a chan_sip trunk, try setting sendrpid=pai
or sendrpid=yes
For pjsip, set Send RPID/PAI to Both.
Also check that Generate Diversion Headers is on.
Otherwise, look at your provider’s documentation and any examples they may have. Or ask them about any specific requirements for these headers: From P-Asserted-Identity Remote-Party-ID Diversion
Also, ask them how the number should be formatted. For example, a number in London, UK might be sent as 02072223333 442072223333 +442072223333
Your provider may accept only one of those formats and if the incoming leg shows the number in a different format, you will need to adjust it.
Make sure that your Outbound Route and Trunk settings are not overriding the caller ID.
If no luck, post your trunk settings (mask phone numbers, account numbers and passwords, but make it clear what each field is). A SIP trace of a call showing the wrong caller ID would also be useful.
There is nothing in this trace that shows the call being answered. It also doesn’t show what the headers were set with. You need to run a sip set debug on so we can actually see the SIP headers.
But the fact it can’t do transcoding on the codecs that are wanted is another issue.
You have seemed to have missed a very important step. Making the actual call so we could see what the headers look like when it’s sent to the provider.
You need to run that command and make a test call.
No, that’s your CallerID that you are presenting to your carrier to send out. Is that exactly what you are seeing on the other side when you get the call as the CallerID?
Do you have a Route CID set up in your Outbound Routes? If so, is that set to override anything? Also, does your provider allow you to send any ole CallerID?
I’m not familiar with Serbia / Kosovo area so please confirm:
Original call from 049490XXX (IPKO mobile) to +38138606XXX (your company number in Priština) on Telekomi trunk.
Outbound call to 049681XXX shows caller ID 100070XXX.
Is that supposed to be a Pirot number (you have numbers in both areas)? This seems like a strange format (you couldn’t dial that from anywhere). I’d expect them to require 0100070XXX or 381100070XXX or +381100070XXX.
Are you forcing this number in the Trunk (force trunk CID)? In the Outbound Route (override extension)? What happens if you turn that off?