On May 21, 2003 at 23:23, Nils Ohlmeier <nils(a)iptel.org> wrote:
Hi,
On Wednesday 21 May 2003 23:14, Jamin W. Collins wrote:
The problem comes when one of the phones is not
registered properly with
the SER proxy and the PBX requests it. The request fails the location
lookup and is sent back to the PBX. To correct this I've tried matching
the "src_ip" to see if the request is from the PBX however this doesn't
appear to work. I have the following condition in the ser.cfg,
shouldn't this stop requests from 1.2.3.4 being sent back to 1.2.3.4?
if (!lookup("location")) {
log(1, "Location lookup failure.");
if (src_ip=="1.2.3.4") || (src_ip=="1.2.3.6") {
^ ^ ^ ^
Please remove the "" around the IPs.
This is a bug. I will fix it. Anyway is faster not to use "" (using
quotes will perform a rev. dns lookup if the argument is a name and not
an ip).
And i'm not sure if the () || () works for an if.
Please try (()||()) instead
It works (or at least it should).
Andrei