Remove Incoming SIP INFO ;phone-contect=nat

Status
Not open for further replies.

Fitim

Customer
Joined
Sep 13, 2018
Messages
13
Reaction score
0
Hello,
Recently i have been using this trunk provider (national operator for fix numbers) and on my all 3cx deployments the incoming calls get this weird sip header. I have been trying everyithing but cannot manage to get rid of it.

Example: 049111222;phone-context=nat

the caller number is correct but on every call i receive this ;phone-contect=nat
 
Are you saying that's coming through as the caller-id? If so, use wireshark to see if they are also presenting the number without the unwanted part in another field and adjust your trunk. Otherwise use a supported provider.
 
  • Like
Reactions: YiannisH_3CX
You could also use the Activity Log of the PBX to look at an incoming Invite. You will need to switch the logging level to Verbose however.
Once you locate the SIP header you should be reading the number from then you can make the adjustment under the Trunks Inbound Parameters.
 
This is the info i am receiving on logs (Verbose)

To: <sip:[email protected]>;tag=d30dd563
From: "0492X444;phone-context=nat"<sip:0492X5444;[email protected]:5060;nf=e>;tag=05bd610a
Call-ID: f0XHeC4e3KciJeoc7_p63w..
 
From what i can see the provider is sending the "0492X444;phone-context=nat" to both the From: Display Name and From: User Part.
If the number is not sent in another SIP field then perhaps you could do something with the Caller ID reformatting. You could try the following:
1582894251941.png

Assuming that your provider is always sending the caller ID in a 8 digit format you could try the following rule:
Source Pattern: (........)(.*)
(........) 8 dots are the number of digits in your number and (.*) means the rest of the data.

Replace pattern: \1
This will only keep the data in the first set.

You could create more rules for other incoming number formats

https://www.3cx.com/docs/cid-reformatting/
 
From what i can see the provider is sending the "0492X444;phone-context=nat" to both the From: Display Name and From: User Part.
If the number is not sent in another SIP field then perhaps you could do something with the Caller ID reformatting. You could try the following:
View attachment 14674

Assuming that your provider is always sending the caller ID in a 8 digit format you could try the following rule:
Source Pattern: (........)(.*)
(........) 8 dots are the number of digits in your number and (.*) means the rest of the data.

Replace pattern: \1
This will only keep the data in the first set.

You could create more rules for other incoming number formats

https://www.3cx.com/docs/cid-reformatting/
Hi,
Thank you for the reply. Since the numbers from my Trunk provider come in different length. Any ideas on how to remove only the last 18 characters (;phone-context=nat )
 
Thank you for the reply. Since the numbers from my Trunk provider come in different length. Any ideas on how to remove only the last 18 characters (;phone-context=nat )
Not sure this is possible but as i mentioned you could create multiple rules to accommodate multiple number lengths given the method works.
The other solution is to switch to a supported provider and avoid all the trouble.
 
Not sure this is possible but as i mentioned you could create multiple rules to accommodate multiple number lengths given the method works.
The other solution is to switch to a supported provider and avoid all the trouble.
Your method is working. I just have to figure to catch all type of lenths. Any idea on how to add multiple conditions ?
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,939
Messages
589,843
Members
164,822
Latest member
Lengo