Does anyone have a better ENUM lookup handler than the built-in ENUMLOOKUP() function? The built-in function does not properly handle multiple return values such as: 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" "!^\\+1866(.*)$!sip:1866\\1 at tollfree.sip-happens.com!" . 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" "!^\\+1866(.*)$!sip:1641641866\\1 at sip.tollfreegateway.com!" . And thus does not handle roll-over should one be unavailable for whatever reason. There is this voip-info.org wiki page: http://www.voip-info.org/tiki-index.php?page=Asterisk+and+multiple+ENUM +entries but the downloads that it's pointing to seem to be dead. Sure I could take to writing an AGI script and probably be done it in a few hours, but why re-invent the wheel? Thanx, b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080506/01b347cd/attachment.pgp
There is a enumlookup.agi that is included with FreePBX and thus trixbox, PBX in a flash, etc. etc. If you have trouble finding it let me know and I can send you it. I can;t really vouch for its quality, but I do use it and it does work... but i;m not sure how well it handles multiple results. I know it will successfully connect to systems that give multiple results, i;m just not sure if it does infact failover if the first one doesn;t work. -- Matt ________________________________________ From: asterisk-users-bounces at lists.digium.com [asterisk-users-bounces at lists.digium.com] On Behalf Of Brian J. Murrell [brian at interlinx.bc.ca] Sent: Tuesday, May 06, 2008 10:34 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] better enumlookup handler Does anyone have a better ENUM lookup handler than the built-in ENUMLOOKUP() function? The built-in function does not properly handle multiple return values such as: 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" "!^\\+1866(.*)$!sip:1866\\1 at tollfree.sip-happens.com!" . 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" "!^\\+1866(.*)$!sip:1641641866\\1 at sip.tollfreegateway.com!" . And thus does not handle roll-over should one be unavailable for whatever reason. There is this voip-info.org wiki page: http://www.voip-info.org/tiki-index.php?page=Asterisk+and+multiple+ENUM +entries but the downloads that it's pointing to seem to be dead. Sure I could take to writing an AGI script and probably be done it in a few hours, but why re-invent the wheel? Thanx, b.
7 maj 2008 kl. 04.34 skrev Brian J. Murrell:> Does anyone have a better ENUM lookup handler than the built-in > ENUMLOOKUP() function? The built-in function does not properly handle > multiple return values such as: > > 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" > "!^\\+1866(.*)$!sip:1866\\1 at tollfree.sip-happens.com!" . > 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" > "!^\\+1866(.*)$!sip:1641641866\\1 at sip.tollfreegateway.com!" . > > And thus does not handle roll-over should one be unavailable for > whatever reason.Quoting RFC 3824: "Only one SIP URI, ideally, appears in an ENUM record set for a telephone number. While it may initially seem attractive to provide multiple SIP URIs that reach the same user within ENUM, if there are multiple addresses at which a user can be contacted, considerably greater flexibility is afforded if multiple URIs are managed by a SIP location service that is identified by a single record in ENUM. Behavior for parallel and sequential forking in SIP, for example, is better managed in SIP than in a set of ENUM records." There's a long section later on in this RFC about how to make it work if you still want to have multiple SIP records... We look forward to source code improvements! /O
Brian J. Murrell wrote:> Does anyone have a better ENUM lookup handler than the built-in > ENUMLOOKUP() function? The built-in function does not properly handle > multiple return values such as: > > 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" "!^\\+1866(.*)$!sip:1866\\1 at tollfree.sip-happens.com!" . > 8.9.9.3.2.8.8.6.6.8.1.e164.org has NAPTR record 200 10 "u" "E2U+SIP" "!^\\+1866(.*)$!sip:1641641866\\1 at sip.tollfreegateway.com!" .Have you taken a look at the ENUMQUERY() and ENUMRESULT() functions that are a part of Asterisk 1.6? The ENUMQUERY() function lets you do a single enum query for a number. Then, the ENUMRESULT() function lets you access and iterate through all of the records received from the query. Then, you can use dialplan logic to try each one without having to actually do the lookup over and over ... I have an unsupported 1.4 backport of these functions available. svn co http://svncommunity.digium.com/svn/russell/asterisk-1.4/ -- Russell Bryant Senior Software Engineer Open Source Team Lead Digium, Inc.