try this in extentions.conf, it should do what you want...
exten => 2001,1,ChanIsAvail(SIP/2001&SIP/3001) exten => 2001,2,SubString,ToDial=${AVAILCHAN}|0|8 exten => 2001,3,Dial(${ToDial},20) exten => 2001,4,Voicemail(u2001) exten => 2001,5,Hangup exten => 2001,104,Voicemail(b2001) exten => 2001,105,Hangup
exten => 3001,1,ChanIsAvail(SIP/3001&SIP/2001) exten => 3001,2,SubString,ToDial=${AVAILCHAN}|0|8 exten => 3001,3,Dial(${ToDial},20) exten => 3001,4,Voicemail(u3001) exten => 3001,5,Hangup exten => 3001,104,Voicemail(b3001) exten => 3001,105,Hangup
Another example that functions as I think you want is below. I like the example above, but if you want to stay away from variables for some reason, the function below does the same as above for calling 2001. You can copy and reverse the numbers for 3001 as well.
exten => 2001,1,Dial(SIP/2001,20) ; Ring first line for 20 seconds if it's not in use
exten => 2001,2,Voicemail(u2001) ; Line 1 rang for 20 seconds, no one answered, send to VM as unavailable
exten => 2001,3,Hangup ; I always terminate a logical set of steps with hangup, just in case..
exten => 2001,102,Dial(SIP/3001,20) ; Line 2001 was busy, try dialing line 3001.
exten => 2001,103,Voicemail(b2001) ; No one answered 3001, but 2001 is busy, lets tell the caller we are on the phone
exten => 2001,104,Hangup ; Just in case...
exten => 2001,203,Voicemail(b2001) ; Line 2001 AND 3001 were busy, maybe I'm calling myself? Let the caller know we are on the phone
exten => 2001,204,Hangup ; just in case...
This should work just fine. I'm not sure how high priority can go before something goes poof. But two +101 jumps definitely work. I'll have to see how many times you can jump and how high a priority you can have.
-Chris
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
