Re: [asterisk-users] Question on Priorities

2007-04-02 Thread Steve Murphy
On Sun, 2007-04-01 at 10:49 +0200, Philipp Kempgen wrote:

 Priority jumping is deprecated anyways. Better use something
 like Goto(s-${DIALSTATUS},1). See extensions.conf for examples.
 
 Regards,
   Philipp
 

I totally agree! While you can get what you want with +101 
jumping, I highly suggest you NOT USE IT. The above 
Goto(s-${DIALSTATUS}|1) can get you where you want to go,
and a few other different ways, too:

In AEL:

Dial(.)
switch(${DIALSTATUS})
{
   case BUSY:
  whatever;
  break;
   case UNAVAILABLE:
  whatever;
  break;
   case 
}

would work, as well as:

Dial(...);
if(${DIALSTATUS} == BUSY)
 {  }
else if(${DIALSTATUS} == UNAVAILABLE)
 {...}
else ...


would also work.

But I find it awkward that you would use labels (invented to help get
rid of specific priority numbers being used) plus +101 jumping!

You don't need +101 jumping to do what you want to do; they are
DEPRECATED, and will soon disappear; using them can lead to confusion
and bugs; so now is a good time to start writing dialplans that don't
use them, and avoid an expensive rewrite later!

I mentioned confusion and bugs above... I'd like to illustrate...

Here are a few of the apps that offer +101 priority jumping:
voicemail, queue, authenticate, sendtext, dial, playback, transfer,
chanisavail, 
system, and more. The really interesting stuff happens when two or three
of these apps are used in sequence in the dialplan, and you aren't
taking into account what might happen if one of them jumps to +101 and
you weren't thinking it would!

at priority 1: Playback(something)
2: Chanisavail(...)
3. Dial( ...)
4. Playback(somethingelse)
at priority 104: Playback(yetsomethingelse)
105: Voicemail()
106: goto somewhereelse

If there's a problem with the 4. playback, you'll end up collecting
voicemail!

In order to avoid this kind of problem, you have to spread out your
priority numbers so one calls' +101 jump won't jump into another's +101
block. To do this, you have to know how big each call's +101 block is.
So you can kiss goodbye to the niceness of using n priorities instead of
specific numbers, and then you also have complications if you have to
add code to a +101 block, and the numbers start
to intrude on some other +101 block. And, on top of that, you have to
stick in some extra goto's to jump to the next priority, because of the
priority spreading!

Using the +101 stuff and doing solid dialplan programming would demand
that you do exactly what I've outlined in the last paragraph! You can't
expect to just IGNORE the possibilities. My first ideas about building a
compiler for asterisk were based on automatically doing all the stuff I
just outlined, so the average user wouldn't fall into the traps and
snares of what can occur when you aren't careful.


There are good reasons they decided to go with result values instead of
+101 jumping, and in my opinion, not using +101 jumping would be a
better path to walk down!

murf

   



smime.p7s
Description: S/MIME cryptographic signature
___
--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


Re: [asterisk-users] Question on Priorities

2007-04-01 Thread Philipp Kempgen
Yuan LIU wrote:

 From: Rizwan Hisham [EMAIL PROTECTED]
 Date: Sat, 31 Mar 2007 17:01:51 +0500

 [inbound-sip]
 exten = uxbod,1,Dial(sip/1001,20,jt)
 exten = uxbod,n,Hangup

 exten = uxbod,102,PlayBack(uxbod)
 exten = uxbod,103,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,104,Hangup()

 here if dial fails then n+101 =102 extension will get executed unless you
 use j option in dial application and priority jumping has to be set to
 priorityjumping=yes in the general section of your extensions.conf file.

 In your dialplan i dont know y you r forcing the caller to goto voicemail
 even if the call  has already answered. I hope you understand my
 modification in your dialplan.

 On 3/31/07, --[ UxBoD ]-- [EMAIL PROTECTED] wrote:
 Hi,

 I am attempting to change my dialplan to use 'n' priorities and labels
 for easier reading, and less re-numbering :) but how do you handle the
 plus 101 ? In my extensions.conf I have a simple plan for testing :-
 
 There is a simpler way, by using label.

Priority jumping is deprecated anyways. Better use something
like Goto(s-${DIALSTATUS},1). See extensions.conf for examples.

Regards,
  Philipp

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
 Let's use IT to solve problems and not to create new ones.
   Asterisk? - http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998
___
--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


Re: [asterisk-users] Question on Priorities

2007-04-01 Thread --[ UxBoD ]--
Cool. That is nice and clean :) Many thanks.

On Sat, 31 Mar 2007 23:32:45 -0700
Yuan LIU [EMAIL PROTECTED] wrote:

 From: Rizwan Hisham [EMAIL PROTECTED]
 Date: Sat, 31 Mar 2007 17:01:51 +0500
 
 [inbound-sip]
 exten = uxbod,1,Dial(sip/1001,20,jt)
 exten = uxbod,n,Hangup
 
 exten = uxbod,102,PlayBack(uxbod)
 exten = uxbod,103,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,104,Hangup()
 
 here if dial fails then n+101 =102 extension will get executed
 unless you use j option in dial application and priority jumping has
 to be set to priorityjumping=yes in the general section of your
 extensions.conf file.
 
 In your dialplan i dont know y you r forcing the caller to goto
 voicemail even if the call  has already answered. I hope you
 understand my modification in your dialplan.
 
 On 3/31/07, --[ UxBoD ]-- [EMAIL PROTECTED] wrote:
 
 Hi,
 
 I am attempting to change my dialplan to use 'n' priorities and
 labels for easier reading, and less re-numbering :) but how do you
 handle the plus 101 ? In my extensions.conf I have a simple plan
 for testing :-
 
 There is a simpler way, by using label.
 
 [inbound-sip]
 exten = uxbod(ntest),1,Dial(sip/1001,20,t)
 exten = uxbod,n,PlayBack(uxbod)
 exten = uxbod,n,Hangup()
 exten = uxbod,ntest+101,PlayBack(uxbod)
 exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,n,Hangup()
 
 Yuan Liu
 
 [inbound-sip]
 exten = uxbod,1,Dial(sip/1001,20,t)
 exten = uxbod,n,PlayBack(uxbod)
 exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,n,Hangup()
 exten = uxbod,103,PlayBack(uxbod)
 exten = uxbod,104,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,105,Hangup()
 
 So when the extension has to add 101 do I just do n+101 ?
 
 TIA
 
 --
 This message has been scanned for viruses and dangerous content by
 MailScanner, and is
 believed to be clean.
 
 ___
 --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
 
 
 
 
 --
 Regards
 Rizwan Hisham
 Software Engineer
 
 
 ___
 --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
 
 
 ___
 --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
 

-- 
This message has been scanned for viruses and dangerous content by MailScanner, 
and is
believed to be clean.

___
--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


Re: [asterisk-users] Question on Priorities

2007-04-01 Thread --[ UxBoD ]--
Okay, I have changed it too :-

[inbound-sip]
exten = uxbod(u1),1,Dial(sip/1001,20,t)
exten = uxbod,n,PlayBack(uxbod)
exten = uxbod,n,Hangup()
exten = uxbod,u1+101,PlayBack(uxbod)
exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,n,Hangup()

but when I do a extensions reload I get :-

[Apr  1 10:12:14] WARNING[20191]: pbx_config.c:2256 pbx_load_config:
Invalid priority/label 'u1' at line 75

On Sat, 31 Mar 2007 23:32:45 -0700
Yuan LIU [EMAIL PROTECTED] wrote:

 From: Rizwan Hisham [EMAIL PROTECTED]
 Date: Sat, 31 Mar 2007 17:01:51 +0500
 
 [inbound-sip]
 exten = uxbod,1,Dial(sip/1001,20,jt)
 exten = uxbod,n,Hangup
 
 exten = uxbod,102,PlayBack(uxbod)
 exten = uxbod,103,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,104,Hangup()
 
 here if dial fails then n+101 =102 extension will get executed
 unless you use j option in dial application and priority jumping has
 to be set to priorityjumping=yes in the general section of your
 extensions.conf file.
 
 In your dialplan i dont know y you r forcing the caller to goto
 voicemail even if the call  has already answered. I hope you
 understand my modification in your dialplan.
 
 On 3/31/07, --[ UxBoD ]-- [EMAIL PROTECTED] wrote:
 
 Hi,
 
 I am attempting to change my dialplan to use 'n' priorities and
 labels for easier reading, and less re-numbering :) but how do you
 handle the plus 101 ? In my extensions.conf I have a simple plan
 for testing :-
 
 There is a simpler way, by using label.
 
 [inbound-sip]
 exten = uxbod(ntest),1,Dial(sip/1001,20,t)
 exten = uxbod,n,PlayBack(uxbod)
 exten = uxbod,n,Hangup()
 exten = uxbod,ntest+101,PlayBack(uxbod)
 exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,n,Hangup()
 
 Yuan Liu
 
 [inbound-sip]
 exten = uxbod,1,Dial(sip/1001,20,t)
 exten = uxbod,n,PlayBack(uxbod)
 exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,n,Hangup()
 exten = uxbod,103,PlayBack(uxbod)
 exten = uxbod,104,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,105,Hangup()
 
 So when the extension has to add 101 do I just do n+101 ?
 
 TIA
 
 --
 This message has been scanned for viruses and dangerous content by
 MailScanner, and is
 believed to be clean.
 
 ___
 --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
 
 
 
 
 --
 Regards
 Rizwan Hisham
 Software Engineer
 
 
 ___
 --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
 
 
 ___
 --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
 

-- 
This message has been scanned for viruses and dangerous content by MailScanner, 
and is
believed to be clean.

___
--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


Re: [asterisk-users] Question on Priorities

2007-04-01 Thread Philipp Kempgen
--[ UxBoD ]-- wrote:

 [inbound-sip]
 exten = uxbod(u1),1,Dial(sip/1001,20,t)
 exten = uxbod,n,PlayBack(uxbod)
 exten = uxbod,n,Hangup()
 exten = uxbod,u1+101,PlayBack(uxbod)
 exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
 exten = uxbod,n,Hangup()
 
 but when I do a extensions reload I get :-
 
 [Apr  1 10:12:14] WARNING[20191]: pbx_config.c:2256 pbx_load_config:
 Invalid priority/label 'u1' at line 75

The label belongs to the priority not to the extension.


Regards,
  Philipp

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
 Let's use IT to solve problems and not to create new ones.
   Asterisk? - http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998
___
--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


Re: [asterisk-users] Question on Priorities

2007-04-01 Thread --[ UxBoD ]--
Thank you - Got it now. Makes everything look a lot cleaner :)

On Sun, 01 Apr 2007 11:58:20 +0200
Philipp Kempgen [EMAIL PROTECTED] wrote:

 --[ UxBoD ]-- wrote:
 
  [inbound-sip]
  exten = uxbod(u1),1,Dial(sip/1001,20,t)
  exten = uxbod,n,PlayBack(uxbod)
  exten = uxbod,n,Hangup()
  exten = uxbod,u1+101,PlayBack(uxbod)
  exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
  exten = uxbod,n,Hangup()
  
  but when I do a extensions reload I get :-
  
  [Apr  1 10:12:14] WARNING[20191]: pbx_config.c:2256 pbx_load_config:
  Invalid priority/label 'u1' at line 75
 
 The label belongs to the priority not to the extension.
 
 
 Regards,
   Philipp
 

-- 
This message has been scanned for viruses and dangerous content by MailScanner, 
and is
believed to be clean.

___
--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


[asterisk-users] Question on Priorities

2007-03-31 Thread --[ UxBoD ]--
Hi,

I am attempting to change my dialplan to use 'n' priorities and labels
for easier reading, and less re-numbering :) but how do you handle the
plus 101 ? In my extensions.conf I have a simple plan for testing :-

[inbound-sip]
exten = uxbod,1,Dial(sip/1001,20,t)
exten = uxbod,n,PlayBack(uxbod)
exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,n,Hangup()
exten = uxbod,103,PlayBack(uxbod)
exten = uxbod,104,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,105,Hangup()

So when the extension has to add 101 do I just do n+101 ?

TIA

-- 
This message has been scanned for viruses and dangerous content by MailScanner, 
and is
believed to be clean.

___
--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


Re: [asterisk-users] Question on Priorities

2007-03-31 Thread Rizwan Hisham

[inbound-sip]
exten = uxbod,1,Dial(sip/1001,20,jt)
exten = uxbod,n,Hangup

exten = uxbod,102,PlayBack(uxbod)
exten = uxbod,103,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,104,Hangup()

here if dial fails then n+101 =102 extension will get executed unless you
use j option in dial application and priority jumping has to be set to
priorityjumping=yes in the general section of your extensions.conf file.

In your dialplan i dont know y you r forcing the caller to goto voicemail
even if the call  has already answered. I hope you understand my
modification in your dialplan.

On 3/31/07, --[ UxBoD ]-- [EMAIL PROTECTED] wrote:


Hi,

I am attempting to change my dialplan to use 'n' priorities and labels
for easier reading, and less re-numbering :) but how do you handle the
plus 101 ? In my extensions.conf I have a simple plan for testing :-

[inbound-sip]
exten = uxbod,1,Dial(sip/1001,20,t)
exten = uxbod,n,PlayBack(uxbod)
exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,n,Hangup()
exten = uxbod,103,PlayBack(uxbod)
exten = uxbod,104,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,105,Hangup()

So when the extension has to add 101 do I just do n+101 ?

TIA

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is
believed to be clean.

___
--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





--
Regards
Rizwan Hisham
Software Engineer
___
--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


Re: [asterisk-users] Question on Priorities

2007-03-31 Thread Rizwan Hisham

also only priorities are added incase of priority jumping, not extensions.

On 3/31/07, --[ UxBoD ]-- [EMAIL PROTECTED] wrote:


Hi,

I am attempting to change my dialplan to use 'n' priorities and labels
for easier reading, and less re-numbering :) but how do you handle the
plus 101 ? In my extensions.conf I have a simple plan for testing :-

[inbound-sip]
exten = uxbod,1,Dial(sip/1001,20,t)
exten = uxbod,n,PlayBack(uxbod)
exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,n,Hangup()
exten = uxbod,103,PlayBack(uxbod)
exten = uxbod,104,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,105,Hangup()

So when the extension has to add 101 do I just do n+101 ?

TIA

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is
believed to be clean.

___
--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





--
Regards
Rizwan Hisham
Software Engineer
___
--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


Re: [asterisk-users] Question on Priorities

2007-03-31 Thread Yuan LIU

From: Rizwan Hisham [EMAIL PROTECTED]
Date: Sat, 31 Mar 2007 17:01:51 +0500

[inbound-sip]
exten = uxbod,1,Dial(sip/1001,20,jt)
exten = uxbod,n,Hangup

exten = uxbod,102,PlayBack(uxbod)
exten = uxbod,103,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,104,Hangup()

here if dial fails then n+101 =102 extension will get executed unless you
use j option in dial application and priority jumping has to be set to
priorityjumping=yes in the general section of your extensions.conf file.

In your dialplan i dont know y you r forcing the caller to goto voicemail
even if the call  has already answered. I hope you understand my
modification in your dialplan.

On 3/31/07, --[ UxBoD ]-- [EMAIL PROTECTED] wrote:


Hi,

I am attempting to change my dialplan to use 'n' priorities and labels
for easier reading, and less re-numbering :) but how do you handle the
plus 101 ? In my extensions.conf I have a simple plan for testing :-


There is a simpler way, by using label.

[inbound-sip]
exten = uxbod(ntest),1,Dial(sip/1001,20,t)
exten = uxbod,n,PlayBack(uxbod)
exten = uxbod,n,Hangup()
exten = uxbod,ntest+101,PlayBack(uxbod)
exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,n,Hangup()

Yuan Liu


[inbound-sip]
exten = uxbod,1,Dial(sip/1001,20,t)
exten = uxbod,n,PlayBack(uxbod)
exten = uxbod,n,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,n,Hangup()
exten = uxbod,103,PlayBack(uxbod)
exten = uxbod,104,VoiceMail([EMAIL PROTECTED],s)
exten = uxbod,105,Hangup()

So when the extension has to add 101 do I just do n+101 ?

TIA

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is
believed to be clean.

___
--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





--
Regards
Rizwan Hisham
Software Engineer




___
--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



___
--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


[Asterisk-Users] question about priorities?

2005-12-08 Thread James Armstrong
I'm not sure if Priority is the correct term, but it is the order number 
as in exten = fax,1-


If I have an application that loads / includes another file, will a line 
of the same order in the included file override the one in the main 
application? What I need to do is:


[test]
include custom-test
exten = s,1,Playback(
exten = 2,2,Hangup



[custom-text]
exten = s,1,Background(...


And have the call come in to s,1 but use the custom code then fall back 
to s,2 in the main app. I want to modify the way AMP does the Menus / 
Automated attendant and change one line. It needs to be in the custom 
file because AMP will overwrite any changes I make to the 
_additional.conf files when I reload or change anything with AMP.


I hope that makes sense,
James


___
--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