Alle 10:09, lunedì 30 maggio 2005, Ozan Blotter ha scritto:
Dear Friends,
I do not want to make accounting for numbers beginning with 833
prefix, is there a way for it ?
yes, check sip uri and set accouting flag accordingly:
if !(uri=~"^sip:833*@WHATEVER") { # warning: reg exp not tested!
setflag(1); # 1 is accounting flag as defined in acc module settings
}
the second part is somewhat tricky...
if (!lookup("location")) {
if (uri=~"^sip:053[0-9]*@") {
prefix("1111");
rewritehost ("192.168.1.10");
break;
};
The 'break' makes ser stop without relaying, you should remove it.
If your gateway acts as UAC only you should just prefix 1111 and then t_relay
without rewriting host, Anyway if your gateway acts as UAS rewriting is
correct, but the problem is 'break' which prevents your routing to reach
t_relay in route(1), again remove the break!
In this 'if' section you may want to set up a failure_route which reverts to
original uri and then prefixes 2222, in case 1111 port is busy (and possibly
sets another failure route for 3333 and so on...)
ciao
--
Giovanni Balasso
giaso(a)yahoo.it