[Serusers] Routing troubles
Toni Heinonen
Toni.Heinonen at teleware.fi
Mon Aug 16 15:21:20 CEST 2004
Hello,
I have troubles with SER routing. It's complaining about a syntax error
on these lines:
if (uri=~"teleware.fi") {
if (method=="REGISTER") {
save("location");
break;
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
} else if (uri=~"^tel:") {
forward("1.2.3.4", "5060");
} else if (uri=~"^sip:[0-9]") {
forward("1.2.3.4", "5060");
} else if (uri=~"^sip:+[0-9]") {
forward("1.2.3.4", "5060");
};
The problem is on one of the else if -lines. Are the nested ifs causing
trouble?
Is the config otherwise OK, the scenario is this: For requests to our
domain, forward to (registered) users, for calls to PSTNs, forward to
1.2.3.4 and for calls to other SIP addresses, forward to correct SIP
proxies.
--
TONI HEINONEN
TELEWARE OY
Mob. +358 40 836 1815 / Tel. +358 (9) 3434 9110
Laajalahdentie 23, FIN-00330 Helsinki, Finland
toni at teleware.fi / www.teleware.fi
More information about the sr-users
mailing list