Re: [asterisk-users] deadagi on 11 and 1.4

2012-12-10 Thread Steve Edwards

On Mon, 10 Dec 2012, Jerry Geis wrote:

How can extensions.conf be changed to work with both Asterisk 11 and 
1.4.X such that 1.4.X calls deadagi and 11 just calls agi as deadagi is 
no more.


On Mon, 10 Dec 2012, Danny Nicholas wrote:

Put a GLOBAL in extensions.conf with the version and use GOTOIF to run 
AGI/DEADAGI dependent on it.


When do you know what version of Asterisk is executing your dialplan?

If you know at installation time, pass your dialplan through a 
preprocessor (even something as simple as sed -e 's/@DEADAGI@/deadagi/g').


If you truly don't know until execution time (and I can't imagine this is 
true), you could define a channel variable ('DEADAGI') to either 'deadagi' 
or 'agi' once and then reference it in your dialplan as:


exten = *,n, execif(1,${MY-AGI},null-agi,--null)

At least you aren't evaluating your version condition throughout your 
dialplan.


Curiously (and unfortunately) (at least in 1.2), you can't just define a 
variable and then execute it as:


exten = *,n, ${MY-AGI}(null-agi,--null)

I'd advise the full preprocessor approach. The additional functionality it 
provides will result in a easier to maintain system. I do it with all of 
my Asterisk 'conf' files.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] deadagi on 11 and 1.4

2012-12-10 Thread Danny Nicholas
Put a GLOBAL in extensions.conf with the version and use GOTOIF to run
AGI/DEADAGI dependent on it.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jerry Geis
Sent: Monday, December 10, 2012 10:01 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] deadagi on 11 and 1.4

How can extensions.conf be changed to work with both Asterisk 11 and 1.4.X
such that 1.4.X calls deadagi and 11 just calls agi as deadagi is no more.

Thanks,

jerry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] deadagi on 11 and 1.4

2012-12-10 Thread Jerry Geis

How can extensions.conf be changed to work with both
Asterisk 11 and 1.4.X such that 1.4.X calls deadagi and 11 just calls 
agi as deadagi is no more.


Thanks,

jerry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users