With default settings, a forwarded call attempts to display the number of the original caller (TIM mobile in your example) to the destination party (Swisscom mobile). Unfortunately, because caller ID ‘spoofing’ is commonly used by spammers and scammers, carriers have implemented various restrictions.
I’m reasonably sure that the outbound leg was rejected because of caller ID, but if you believe otherwise, paste a new log including a SIP trace. At the Asterisk command prompt, type pjsip set logger on
and try the forwarded call again. The Asterisk log will now show the SIP messages, along with the regular entries. Please use pastebin.com (or another ‘permanent’ paste site) so future readers of this thread can follow along; hastebin pastes expire after 7 days.
If you don’t care about the caller ID, in Follow-Me set Change External CID Configuration and Fixed CID Value to a number you have with the outbound provider, and you should be good to go.
If sending the original caller’s number is important, consider forwarding to a SIP app on the destination mobile, rather than a mobile voice call.
If that’s undesirable, consult the provider’s documentation on how to send a caller ID that is not yours. For example, you may need to send +393… instead of 393…, and include P-Asserted-Identity and/or Diversion headers. Some providers require signing a special agreement releasing them from responsibility for fraudulent spoofed caller ID.
Some providers won’t allow you to send a number that is not yours. In that case, you might consider using a different one for forwarded calls, or for outbound calling in general.
Thank you very much for the complete analyis, with plenty of valuable information.
I have edited my post replacing the URL of the logfile.
I have realized that the problem was the codec, because the provider answered “unsupported media type”. So I have deselected all the codecs except ulaw, alaw and G729 in the codec section of the outbound trunk. This solved the problem: the call rings to the PSTN number.
Nevertheless, as you correctly said, the Dellmont providers like Voipchief don’t allow any CID that is no registered and the call is anonymous,
I will try to ask, but I am doubtful that the Dellmont providers give such documentation (provided that they even allow in some way to propagate a non-authorized CID). Could you please give me some instructions on how to set the Asserted-Identity in freePBX?
Could you please give me some example of VOIP provider that allow the propagation of the CID? I would like to choose the one with the easier setup procedure, even if it isn’t the cheapest one. I tried with Voxbeam but I gave up because of the complexity and poor support.