In fact, Dial() doesn't return instantly like it should, in the case it is used with ENUM. Dial application using the ENUMLOOKUP function doesn't skip to the next priority like it was expected, if destination server doesn't answer to the INVITE messages sent by our server. For example, in the following code, if the first Dial using ENUM fails to reach the contact's server, instead of skipping to the next priority Dialing Zap channel instead, Asterisk keeps sending INVITE messages to the destination server published in ENUM until dial timeout expires (120), and only then jumps to the next priority, Dialing Zap:
exten => _X.,1,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c)}|counter=0) exten => _X.,2,GotoIf($["${counter}"<"${sipcount}"]?3:6) exten => _X.,3,Set(counter=$[${counter}+1]) exten => _X.,4,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,${counter})}) exten => _X.,5,GotoIf($["${counter}"<"${sipcount}"]?3:6) exten => _X.,6,Dial(Zap/g1/${EXTEN}) Is this an Asterisk BUG or is it there some way I can solve this problem? Regards, Ricardo. Alex Balashov wrote: > On Wed, 20 Jun 2007, [EMAIL PROTECTED] wrote: > > >> Is it possible to force the Dial function to skip to the next priority if it >> doesn't find the server of the called contact within a few seconds? >> >> I know I can use: >> Dial(Technology/resource[&Tech2/resource2...][|timeout][|options][|URL]) >> where I can use some short timeout in the "timeout" option, but if I do so, >> when some call is well succeeded, it will only ring for that time! >> > > I think you basically have to pick one or the other. Either set a long > timeout (15-30 sec, e.g. Dial(SIP/whatever,20) or don't use this feature. > > The good news is that if the destination SIP server is actually > unreachable, Dial() should return almost instantly, at which point it > should jump to the failure priority. > > -- > Alex Balashov > Evariste Systems > Web : http://www.evaristesys.com/ > Tel : +1-678-954-0670 > Direct : +1-678-954-0671 > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- --------------------------- Ricardo Carvalho ITEC / IRICUP / Reitoria UP tel: +351220408108 sip:[EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------- _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users