[asterisk-dev] ENUM and overlapped dialing

Timo Teräs timo.teras at iki.fi
Sat Mar 7 03:21:16 CST 2009


Hi,

I'm trying to get asterisk SVN to do overlapped dialing with ENUMQUERY / ENUMRESULT.
But this seems to be impossible currently.

E.g. if my enum tree is like:
*.1.my.enum. NAPTR ...
*.1.2.my.enum. NAPTR ...
*.2.2.my.enum. NAPTR ...

The query for "2.my.enum" will return "no data", but query for "3.my.enum"
would return "domain does not exist". And for overlapped dialing, I need to
do the queries for each parent domain; not just the complete number.

The basic flaw is that ENUMQUERY does not return the info if query failed because
of DNS error "domain does not exist" or "no data".

With "no data" I could make the dialplan execute "Incomplete()" or just make it
collect more digits. And on "domain does not exist" it could play right away
"invalid number".

Now the fix is simple. To make ENUMQUERY / ENUMRESULT somehow return why there
is no results: because query failed, because domain does not exists or because
the result was empty (valid child domains exist). Any preference how this
should be done?

ENUMQUERY() to return negative errors code/string?
ENUMRESULT(ID,result) to return error code/string?

Currently the only way to figure if something bad happened is that
ENUMRESULT(ID,getnum) returns zero. But as explained this is not enough.

I'm willing to code and send a patch on the bug tracker.

Cheers,
  Timo



More information about the asterisk-dev mailing list