Iqbal wrote:
Hi
I was trying to set this up and realised I dont have a IP route :-) its the default one, never really thought of having a IP route , hence what would logix like this work
if (!enum_query("e164.arpa") && !enum_query("e164.info") && !enum_query("freenum.org")) { route(PSTN) }
This may cause unpredictable behaviour, as you never know how the if statement is processed internally. (which lookup will be the first one)
regards, klaus
regards, klaus
This seems to say that if its not present in any goto pstn...although I have got my logix mixed up in the past ;-)
Iqbal Klaus Darilion wrote:
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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.