Iqbal wrote:
Hi
I am having a little difficulty in setting up enum lookups.
When a call comes in for a number prefixed with 00, for enum i would
really have to replace this with a + prefix since enum requires that,
however if this is done then I have problems with the lcr table and my
prefixes, since they all are without + sign hence if no enum found I
need to strip the plus off again before I pass it on to my pstn gateway.
I was attempting to do something like this..would it be correct
if (uri=~"^sip:00[0-9]*@")
{ strip(2); prefix("+");
};
# So now we have the + sign in front
if (uri=~"^sip:\+[0-9]*@") {
log(1, "+ International number detected\n");
if (!enum_query("e164.arpa") || !enum_query("e164.info")) {
One of the enum queries will always be FALSE, thus the condition is
always true! Try instead:
if (enum_query("e164.arpa")) {
log(1,"ENUM found in public ENUM");
route(IP)
} else if (enum_query("e164.info")) {
log(1,"ENUM found in private ENUM");
route(IP)
} else if (enum_query("freenum.org")) {
log(1,"ENUM found in freenum");
route(IP)
} else {
log(1,"No ENUM, route to PSTN");
route(PSTN)
}
strip(1);
route (8); # normal pstn
};
else {
route(1); # e164 result };
Problem is, whatif results were present in both trees, would that be a
problem. Also if the e164 message works, I guess then you dont really
need to do anything since its just goes out on SIP.
Iqbal
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers