• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Solved Caller ID Reformatting

Status
Not open for further replies.

Andriy

Customer
Advanced Certified
Joined
Apr 14, 2018
Messages
183
Reaction score
16
Hello,

I have trouble setting up Caller ID Reformatting in Japan.
I need to dial numbers in local format due to local SIP provider regulations. Therefore I want to convert e164 format to local. In order to do that I need

1) remove code of Japan (81)
2) prepend (0)

For example to call 81-99-9999-9999 i need to dial
0-99-9999-9999

or replace 81 with 0

I have setup Outbound Caller ID reformatting in Trunk settings as follows:

Source pattern (81)(.*)
Replace Pattern 0\2

However, nothing changed. 3cx still tries to call 81-99-9999-9999 instead of 0-99-9999-9999

Is my setup correct?
Please advice
 
Last edited:
Hello
Thanks for suggestion!

I can not find OriginatorCallerID in in the SIP Trunk “Outbound Parameters” settings tough

Where should I look?
 

Attachments

  • 3CX Phone System Management Console.png
    3CX Phone System Management Console.png
    214.5 KB · Views: 118
since the trunk is not on the supported list i am not sure which sip field the provider uses to read the caller ID from. As a test replace the OutboundCallerID with OriginatorCallerID from the drop down list and see if that works
 
Should i change it at

Remote Party ID - Calling Party : Display Name
or
Remote Party ID - Calling Party : User Part

or both?
 
As i am not aware which value the provider uses i would recommend both and as well as the From: Display Name
 
i have changed both as well as FROM DISPLAY name but no luck.


I have also tried to setup outbound Rules to strip first 2 digits and prepend 0 for Calls to numbers starting with prefix 81

but still no luck

81 is never stripped..
 

Attachments

  • 2.png
    2.png
    196.2 KB · Views: 63
  • 1.png
    1.png
    86.1 KB · Views: 58
Then perhaps the caller id is modified by the E164 settings of the PBX before reaching the outbound rules. Navigate to Settings / E164 and disable to for a test. Then try the call again
 
I have disabled Process E164 Numbers - same result. At least for outbound calls
 
In that case you need to run a capture on the PBX and check what the PBX is sending and what is being sent by the PBX to the provider to determine what is happening.
 
Dear YiannisH

thank you so much for your hep.

Could you please let me know how do I run a capture on the PBX and check what the PBX is sending and what is being sent by the PBX to the provider ?

My provider does not accept calls in international format. So when i dial in local format the call is processed OK.
If I dial in international or e164 format - the call is rejected.

No matter what are the settings in 3cx. This seems strange to me, because when I dial a number, the information goes to 3cx first, and only then passed to provider. Therefore it seems like 3cx is not stripping first 2 digits (81) that represent international code....

Also, I do not understand, why the rules to strip and prepend digits to phone number are present in at least 3 places
1) Trunk caller ID settings
2) 3cx settings (e164 processing)
3) Inbound / Outbound rules

it is unclear which rules take precedence and which are processed first.

Sorry for novice questions but could you please clear out this for me?
 
Could you please let me know how do I run a capture on the PBX and check what the PBX is sending and what is being sent by the PBX to the provider ?
If you navigate to Dashboard / Activity log there is a capture button. That will start a capture from the PBX and you can run a call to replicate the issue.
You can then stop the capture and open it with wireshark. You should be able to find the Invite with the number sent from the phone to the PBX and from the PBX to the provider.

Also, I do not understand, why the rules to strip and prepend digits to phone number are present in at least 3 places
1) Trunk caller ID settings
2) 3cx settings (e164 processing)
3) Inbound / Outbound rules


The trunk caller id setting is to be able to present a specific caller ID for your calls. Re-formating enables you to re-format specific types of numbers to the format of your choice.

E164 is used to format numbers that are dialled in a E164 format and be reformatted there before hitting the outbound rules.

Outbound rules is what the PBX uses to know where to send the call. You can also strip and prepend digits from there if you wish.

The outbound rules are the last to be processed. The call will go through E164 then to the trunk settings and then to outbound rules.
I have never seen a case where the outbound rules are not processed correctly so i would suspect something else is going wrong during the call.
 
  • Like
Reactions: Andriy
I rearranged Outbound rules. and now I can dial 81-99-9999-9999 and 3cx will call 099-9999-9999.
But I do not understand why. As the 2 rules are non-conflicting. One was for numbers starting with 0 others for numbers starting with 81.

But anyway, this will do the trick so that I can call the numbers back without having to redial the whole number.

Now, it would be great to show incoming calls without 81 prefix. Still have not found a way to do so. So please let me know if you have any advice for me.

Thank you
 
I rearranged Outbound rules. and now I can dial 81-99-9999-9999 and 3cx will call 099-9999-9999.
But I do not understand why. As the 2 rules are non-conflicting. One was for numbers starting with 0 others for numbers starting with 81.
Glad to see the issue has been resolved. To see why the first outbound rule matched you will need to run a capture on the PBX and go through the PBX logs to see what was triggering the rule.

Now, it would be great to show incoming calls without 81 prefix. Still have not found a way to do so. So please let me know if you have any advice for me.
You will need to know in which sip field the provider is sending the callers caller ID and in what format the number arrives and re-forma it using the following guide.
https://www.3cx.com/docs/cid-reformatting/
 
  • Like
Reactions: Andriy
it seems after some time incoming calls are showing without +81 prefix as well. Not sure why, maybe the settings did not become active right away a needed a reboot or i do not know why,

but now it works as intended :)
Thanks @YiannisH_3CX for help!
 
Glad to see the issue has been resolved.
 
  • Like
Reactions: Andriy
Status
Not open for further replies.
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.