Forums Read-only archive

Maching IP addres instead DID - SOLVED

4 posts · Brekeke SIP Server Forum

sadzas Original post
1. Brekeke Product Name and version: 2.2.6.2 Academic

2. Java version: java version "1.6.0_07"

3. OS type and the version: Ubuntu 8.04

6. Your problem:

It is possible to define an IP address in Maching patterns? and forward everything to another IP address?

I mean,

THIS -->
MACHING PATTERNS
$request=^INVITE
To=sip:(0115353044.+)@190\.xxx\.xxx\.162$

DEPLOY PATTERNS
To=sip:%1@192.168.2.1


instead this-->

$request=^INVITE
To=sip:(0115254.+)@

To=sip:%1@192.168.2.1

Thanks in advance!
lakeview
Which IP address are you talking about?
Is it sender's IP address?

If you mean the sender's IP address, you can use $addr variable.
sadzas
VoIP provider ------ Brekeke -------- PBX
190.x.x.162 200.x.x.162 192.168.2.1

All traffic from 190.x.x.162 must go to 192.168.2.1
All traffic from 192.168.2.1 must go to 190.x.x.162

That is what I want.

I already try it with $addr, but without results....

How can I define that?

thanks!
peng
>All traffic from 190.x.x.162 must go to 192.168.2.1

You may want to configure like this.

[Maching patterns]
$addr=^190\..{1,3}\..{1,3}\.162

[Deploy patterns]
$target=192.168.2.1