[asterisk-users] Newbie query: how to write priority n+101

Mark Michelson mmichelson at digium.com
Thu Feb 5 14:49:43 CST 2009


Geoff Lane wrote:
> Hi All,
> 
> Asterisk 1.4.12 on CentOS 5
> 
> Sorry for a question that I'm guessing is obvious to most of you.
> 
> I'm trying to revamp my dialplan. When I first created it, I had
> something like:
> 
> exten => s,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
> exten => s,2,Dial(${rgMain},${RINGTIME},t)
> exten => s,3,VoiceMail(main at default)
> exten => s,103,VoiceMail(main at default)
> 
> Now I want to play around to add things like the privacy manager and
> blacklist handling, which all goes before priority 2 in the above. The
> Dial() application jumps to the priority 101 more than its own
> priority (i.e. n+101) if it times out. But how can I specify this if
> I'm numbering priorities as 1,n,n,n,n?
> 
> (BTW, the reason for priority 3 in the above extension is that in an
> earlier version of Asterisk, Dial() sometimes jumped to the next
> priority rather than one 101 more).
> 
> TIA,
> 

Actually, jumping to priority n + 101 is a thing of the past, and this will only 
occur now if you pass the 'j' option to Dial. Dial will just go to the next 
priority on a timeout now, and the DIALSTATUS channel variable will be set to 
"NOANSWER" I suspect that if you enable verbose console logging, you'll actually 
see that priority 3 is what is being executed and not priority 103.

Check out the UPGRADE.txt file in Asterisk 1.4. In the "Applications" section, 
you'll see:

* In previous Asterisk releases, many applications would jump to priority n+101
   to indicate some kind of status or error condition.  This functionality was
   marked deprecated in Asterisk 1.2.  An option to disable it was provided with
   the default value set to 'on'.  The default value for the global priority
   jumping option is now 'off'.

Mark Michelson



More information about the asterisk-users mailing list