[asterisk-dev] ENUM and overlapped dialing

Russell Bryant russell at digium.com
Sat Mar 7 09:02:49 CST 2009


On Mar 7, 2009, at 3:21 AM, Timo Teräs wrote:

> 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 think that ENUMQUERY() should still return a valid ID for the lookup  
attempt.

Then, I think the "getnum" option could be updated to return a  
negative value if an error occurred, as opposed to 0 for when the  
result was just empty.  When an error has occurred, a new option like  
"reason" could be added to get a string based representation of the  
failure.

--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org







More information about the asterisk-dev mailing list