[Asterisk-Dev] Dev Meeting list

Scott Laird scott at sigkill.org
Thu Apr 28 17:34:47 MST 2005


On Apr 28, 2005, at 4:38 PM, Tilghman Lesher wrote:
> You already didn't need to, if you used labels:
>
> exten => 123,1,DBGet(....)
> exten => 123,n(dial),Dial(....)
> exten => 123,n,SomethingWhenNoAnswer
> .....
> exten => 123,dial+101,SomethingWhenBusy

Yeah, but this can be trouble-prone:

   ...
   exten => 123,n(dialmain),Dial(Provider1)
   exten => 123,n,Playback("please-wait")
   exten => 123,n(dialbackup),Dial(BackupNumber)
   exten => 123,dialmain+101,Dial(Provider2)
   exten => 123,n,Dial(BackupNumber)
   exten => 123,dialbackup+101,Playback("cant-reach-user")

This is kind of contrived, but follow along for a second.  As things 
stand here, it's not really obvious that the second line from the end 
will flow into the final line if it fails, but that's probably not 
catastrophic.  But look at what happens if you remove the second--the 
last two lines actually end up with the *same* priority number, and 
things suddenly start failing for no obvious reason.  There will 
probably be a warning spit out when you run 'reload', but it'll scroll 
past and get lost in the flood of notifications that reload usually 
generates.

The 'n' priority stuff is better then what we had in 1.0, but it 
doesn't really make error handling much better, because its prone to 
hidden priority number collisions.

Getting rid of the implicit n+101 is the next step on the road to 
giving Asterisk a really solid extension language.


Scott




More information about the asterisk-dev mailing list