Forums Read-only archive

Change IP in Contact Header in Register

3 posts · Brekeke PBX Forum

BrekekeUserGermany Original post
1. Brekeke Product Name and Version:
Brekeke PBX, Version 3.8.3.4, Pro

2. Java version:
openjdk version "1.8.0_162"

3. OS type and the version:
Linux 4.9.0-4-amd64 x86_64

4. UA (phone), gateway or other hardware/software involved:
-

5. Your problem:

Hi everyone,

we are registering our Brekeke PBX to an external Serviceprovider.
Our PBX has 2 Interfaces, one with internal IP (10.72.XX.X), one with external IP (212.160.XXX.XXX)

The incoming calls should go through the external IP.

In the register from Brekeke PBX to the SIP Provider the PBX always send the internal IP 10.72.XX.X as contact and then the provicer tries to send all incoming calls to this IP.

Example:
Contact: <__sip:0049XXXXXXXX@10.72.XX.X:5060>;expires=3600;q=1.0

The register is successfull, but the calls are being send to the wrong IP.

Why does the PBX use this IP in the contact?
Is there a way to configure the PBX to use the external IP 217.160.XXX.XXX?

Thanks for your help & best regards
BrekekeUserGermany
I found a matching problem in in another Thread:
http://www.brekeke-sip.com/bbs/viewtopi ... ht=contact

The solution to change the IP in th Contact is the following:

Matching Patterns:
To = sip:0049XXXXXXXX@XXX.sip
$request = ^REGISTER

Deploy Patterns:
$ifdst = 217.160.XXX.XXX

Best Regards
Mike
Hi

Your DialPlan rule may work but it doesn't store the registration record in the internal database listed under [Registered Clients].

To avoid the issue, please use "&net.registrar.thru.if" instead of "$ifdst".
The recommended DialPlan rule is like this.
[Matching Patterns]
$request = ^REGISTER
To = sip:0049XXXXXXXX@XXX.sip

[Deploy Patterns]
&net.registrar.thru.if = 192.168.217.160
$action = register