[asterisk-users] DeadAgi

2007-12-06 Thread Bhrugu Mehta
hi, all
I am new to use DeadAgi,
can anybody help me how to use DeadAgi,

actually i want this,

when caller hangup his/her phone, i want to send packet to my other app that
check caller hung up done.

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


[asterisk-users] DeadAgi

2009-09-17 Thread Anahi Ludueña

Hi people, I have the following dialplan:

[context]
exten => s,1,Noop(Start)
...
exten => h,1,Noop(Ending)
exten => h,n,DEADAGI(finconf.php,${ARG1},${ARG2})


When it is running, the asterisk gives the following error:

-- Launched AGI Script /var/lib/asterisk/agi-bin/finconf.php
  ==  finconf.php|800|: Failed to execute 
'/var/lib/asterisk/agi-bin/finconf.php': No such file or directory

But the file is there. The command ls -l returns:

-rwxrwxrwx 1 root root   140 Sep 17 15:42 finconf.php

Why does it return the error?

Thanks,




Anahi Ludueña
 

  
_
Llévate Messenger en el móvil a todas partes ¡Conéctate!
http://www.microsoft.com/spain/windowsmobile/messenger/default.mspx___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] deadagi

2012-09-12 Thread Jerry Geis

Moving from 1.4 to 11 deadagi is deprecated.

Is there a suggest way in the dialplan to handle the "case" of either.
Was hoping to keep one extensions.conf file and just call the 
appropriate agi/deadagi.


What's the best way to do that?

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


Re: [asterisk-users] DeadAgi

2007-12-06 Thread Steve Edwards
On Thu, 6 Dec 2007, Bhrugu Mehta wrote:

> I am new to use DeadAgi,
> can anybody help me how to use DeadAgi,
>
> actually i want this,
>
> when caller hangup his/her phone, i want to send packet to my other app that
> check caller hung up done.

It's "dead" easy :)

Deadagi() is just like agi() with a couple of differences. In fact (in 
1.2), both are defined in res_agi.c and "dead" is just a flag passed to 
run_agi().

The differences are how much interaction you can have with the channel* 
and whether your AGI gets a "HUP" when the channel is hung up.

While deadagi() is usually executed in the "h" extension, it is not a 
requirement.

*) I was curious what the exact differences were so I started reading 
through ast_waitfor_nandfds(). Unfortunately I have a very low frustration 
level for code written with single character variable names like c and n.

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DeadAgi

2007-12-23 Thread Matt Riddell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve Edwards wrote:
> On Thu, 6 Dec 2007, Bhrugu Mehta wrote:
> 
>> I am new to use DeadAgi,
>> can anybody help me how to use DeadAgi,
>>
>> actually i want this,
>>
>> when caller hangup his/her phone, i want to send packet to my other app that
>> check caller hung up done.
> 
> It's "dead" easy :)
> 
> Deadagi() is just like agi() with a couple of differences. In fact (in 
> 1.2), both are defined in res_agi.c and "dead" is just a flag passed to 
> run_agi().
> 
> The differences are how much interaction you can have with the channel* 
> and whether your AGI gets a "HUP" when the channel is hung up.
> 
> While deadagi() is usually executed in the "h" extension, it is not a 
> requirement.
> 
> *) I was curious what the exact differences were so I started reading 
> through ast_waitfor_nandfds(). Unfortunately I have a very low frustration 
> level for code written with single character variable names like c and n.

There is some debate over this but the gist of it is that AGI will send
a kill to your script if the channel is hung up.  DeadAGI won't.

You're now not supposed to run AGI on a channel that dies and not
supposed to run DeadAGI on a live channel.

We've had to split our billing and routing for this, and since doing so
everything has worked fine.

Asterisk 1.6 will not suffer this problem and DeadAGI will be deprecated.

- --
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHbwAJDQNt8rg0Kp4RAjUzAJ9jq1sFitOR7yG//0GgP5A7lvDbBgCfQg3P
n/o4vp6IlSghf2AjNbOFpjU=
=Yp/5
-END PGP SIGNATURE-


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DeadAgi

2007-12-23 Thread Steve Edwards
On Mon, 24 Dec 2007, Matt Riddell wrote:

> There is some debate over this but the gist of it is that AGI will send
> a kill to your script if the channel is hung up.  DeadAGI won't.

res_agi.c says SIGHUP, not SIGKILL.

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DeadAgi

2007-12-23 Thread Matt Riddell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve Edwards wrote:
> On Mon, 24 Dec 2007, Matt Riddell wrote:
> 
>> There is some debate over this but the gist of it is that AGI will send
>> a kill to your script if the channel is hung up.  DeadAGI won't.
> 
> res_agi.c says SIGHUP, not SIGKILL.

Correct.

- --
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHb2LODQNt8rg0Kp4RAiIMAJ4u0fl9KfqkL9ViG4RPzjdlNteSbwCeOKmh
WD4Ygd1aMNj7Rastk7bU9Po=
=595g
-END PGP SIGNATURE-

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DeadAgi

2009-09-17 Thread Danny Nicholas
Either the file is missing something like #!/usr/bin/php or there is an
error in what the file is trying to access

 

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Anahi Ludueña
Sent: Thursday, September 17, 2009 2:58 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] DeadAgi

 

Hi people, I have the following dialplan:

[context]
exten => s,1,Noop(Start)
...
exten => h,1,Noop(Ending)
exten => h,n,DEADAGI(finconf.php,${ARG1},${ARG2})


When it is running, the asterisk gives the following error:

-- Launched AGI Script /var/lib/asterisk/agi-bin/finconf.php
  ==  finconf.php|800|: Failed to execute
'/var/lib/asterisk/agi-bin/finconf.php': No such file or directory

But the file is there. The command ls -l returns:

-rwxrwxrwx 1 root root   140 Sep 17 15:42 finconf.php

Why does it return the error?

Thanks,

  _  

Anahi Ludueña

 





  _  

Disfruta antes que nadie del nuevo Windows Live Messenger
<http://download.live.com> 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] DeadAgi

2009-09-17 Thread Geraint Lee
1) does the file exist
2) is it chmod'd to 755 (not sure if this matters though)
3) do you have something like #!/usr/bin/php at the start of the php file?

Cheers

Geraint

2009/9/17 Anahi Ludueña 

>  Hi people, I have the following dialplan:
>
> [context]
> exten => s,1,Noop(Start)
> ...
> exten => h,1,Noop(Ending)
> exten => h,n,DEADAGI(finconf.php,${ARG1},${ARG2})
>
>
> When it is running, the asterisk gives the following error:
>
> -- Launched AGI Script /var/lib/asterisk/agi-bin/finconf.php
>   ==  finconf.php|800|: Failed to execute
> '/var/lib/asterisk/agi-bin/finconf.php': No such file or directory
>
> But the file is there. The command ls -l returns:
>
> *-rwxrwxrwx 1 root root   140 Sep 17 15:42 finconf.php*
>
> Why does it return the error?
>
> Thanks,
>
> *
> --
> *
>
> *Anahi Ludueña*
>
>
>
>
>
> --
> Disfruta antes que nadie del nuevo Windows Live 
> Messenger
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> 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 --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] DeadAgi

2009-09-17 Thread Tilghman Lesher
On Thursday 17 September 2009 15:06:28 Geraint Lee wrote:
> 1) does the file exist
> 2) is it chmod'd to 755 (not sure if this matters though)
> 3) do you have something like #!/usr/bin/php at the start of the php file?

4) Is the file in MS-DOS format (i.e. do you have \r\n at the end of every
line, instead of only \n)?  That invisible character (\r) will prevent the
file from executing, as Unix is looking for a file on the filesystem named
/usr/bin/php\r, and that file probably doesn't exist.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] DeadAgi

2009-09-17 Thread Anahi Ludueña

Thanks for the answers!
The file didn't have the first line!
#!/usr/bin/phpBye!





Anahi Ludueña
 



> From: tles...@digium.com
> To: asterisk-users@lists.digium.com
> Date: Thu, 17 Sep 2009 15:59:21 -0500
> Subject: Re: [asterisk-users] DeadAgi
> 
> On Thursday 17 September 2009 15:06:28 Geraint Lee wrote:
> > 1) does the file exist
> > 2) is it chmod'd to 755 (not sure if this matters though)
> > 3) do you have something like #!/usr/bin/php at the start of the php file?
> 
> 4) Is the file in MS-DOS format (i.e. do you have \r\n at the end of every
> line, instead of only \n)?  That invisible character (\r) will prevent the
> file from executing, as Unix is looking for a file on the filesystem named
> /usr/bin/php\r, and that file probably doesn't exist.
> 
> -- 
> Tilghman Lesher
> Digium, Inc. | Senior Software Developer
> twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
> Check us out at: www.digium.com & www.asterisk.org
> 
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
  
_
Nuevo Windows Live, un mundo lleno de posibilidades. Descúbrelo.
http://www.microsoft.com/windows/windowslive/default.aspx___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] DeadAgi

2009-09-17 Thread Steve Edwards

On Thu, 17 Sep 2009, Anahi Ludue?a wrote:


Thanks for the answers!
The file didn't have the first line!
#!/usr/bin/php


Glad you found the answer. However...


The command ls -l returns:

-rwxrwxrwx 1 root root   140 Sep 17 15:42 finconf.php


Having an executable with 777 permissions is a very bad idea. Think about 
somebody (or some program) executing something like:


echo "rm -f -r /whatever-they-want" \
>/var/lib/asterisk/agi-bin/finconf.php

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] DeadAgi

2009-09-18 Thread Ishfaq Malik


Steve Edwards wrote:
> On Thu, 17 Sep 2009, Anahi Ludue?a wrote:
>
>> Thanks for the answers!
>> The file didn't have the first line!
>> #!/usr/bin/php
>
> Glad you found the answer. However...
>
>> The command ls -l returns:
>>
>> -rwxrwxrwx 1 root root 140 Sep 17 15:42 finconf.php
>
> Having an executable with 777 permissions is a very bad idea. Think 
> about somebody (or some program) executing something like:
>
> echo "rm -f -r /whatever-they-want" \
> >/var/lib/asterisk/agi-bin/finconf.php
>
Agreeing with the above here, really you want the script owned by 
asterisk.asterisk and permissions of 0755

Ish

> 
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office: 0161 660 3062

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


Re: [asterisk-users] DeadAgi

2009-09-18 Thread Anahi Ludueña

Thanks guys, I'll take it into account!...





Anahi Ludueña
 



> Date: Fri, 18 Sep 2009 10:13:12 +0100
> From: i...@pack-net.co.uk
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] DeadAgi
> 
> 
> 
> Steve Edwards wrote:
> > On Thu, 17 Sep 2009, Anahi Ludue?a wrote:
> >
> >> Thanks for the answers!
> >> The file didn't have the first line!
> >> #!/usr/bin/php
> >
> > Glad you found the answer. However...
> >
> >> The command ls -l returns:
> >>
> >> -rwxrwxrwx 1 root root 140 Sep 17 15:42 finconf.php
> >
> > Having an executable with 777 permissions is a very bad idea. Think 
> > about somebody (or some program) executing something like:
> >
> > echo "rm -f -r /whatever-they-want" \
> > >/var/lib/asterisk/agi-bin/finconf.php
> >
> Agreeing with the above here, really you want the script owned by 
> asterisk.asterisk and permissions of 0755
> 
> Ish
> 
> > 
> >
> > ___
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> > Register Now: http://www.astricon.net
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> -- 
> Ishfaq Malik
> Software Developer
> PackNet Ltd
> 
> Office: 0161 660 3062
> 
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
  
_
Chatea sin límites en Messenger con la tarifa plana de Orange
http://serviciosmoviles.es.msn.com/messenger/orange.aspx___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] DeadAgi

2009-09-18 Thread Steve Edwards
>> On Thu, 17 Sep 2009, Anahi Ludue?a wrote:
>>
>>> Thanks for the answers! The file didn't have the first line! 
>>> #!/usr/bin/php

> Steve Edwards wrote:

>> Glad you found the answer. However...
>>
>>> The command ls -l returns:
>>>
>>> -rwxrwxrwx 1 root root 140 Sep 17 15:42 finconf.php
>>
>> Having an executable with 777 permissions is a very bad idea. Think 
>> about somebody (or some program) executing something like:
>>
>> echo "rm -f -r /whatever-they-want" \
>>> /var/lib/asterisk/agi-bin/finconf.php

On Fri, 18 Sep 2009, Ishfaq Malik wrote:

> Agreeing with the above here, really you want the script owned by 
> asterisk.asterisk and permissions of 0755

If the file has the permissions set to 755, the ownership is irrelevant to 
the execution.

755 (-rwxr-xr-x) means:

1) 7 (rwx) -- read, write, and execute by the user that owns the file,

2) 5 (r-x) -- read and execute by members of the group that owns the file,

3) 5 (r-x) -- read and execute by users not in the group that owns the 
file.

Thus, anybody can execute the AGI.

You could have the permission set to 500 (-r-x--) meaning only the 
owner can read (which is a prerequisite to execute) and execute the file, 
assuming that the user executing Asterisk is the owner of the file.

You could even have the permission set to 1 (-x) if you execute 
Asterisk as root.

Personally, since I am usually the "lone developer and admin," I set the 
ownership of /var/lib/asterisk/ and below to my username so I don't have 
to use sudo every time I update an AGI or a sound file. I set the 
permissions of the AGIs to 755 so the user running Asterisk can execute 
them as well.

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


[Asterisk-Users] DeadAGI Application

2004-08-31 Thread Darren Wiebe
I downloaded the astcc calling card program.  Thanks, it is very easy to 
setup and works Excellent.  Anyway, it says to use DeadAGI to run it 
rather than AGI.  I don't know what I am doing wrong.  I just updated my 
asterisk from cvs and rebuilt and reinstalled.  I do not have an 
application called DeadAGI.  I have searched the source, google, etc. 
but have not been able to find anything.  Any pointers?

Darren Wiebe
[EMAIL PROTECTED]
___
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


[asterisk-users] DeadAgi application issue

2009-07-25 Thread Max Alex
Hi All,
I have working asterisk 1.4.24.1, but I have issues with DeadAgi
application.
I am using hylafax and iaxmodem with asterisk, mail 2 fax and fax 2 mail
feature.

My system details are below:
OS: Centos 5.3
Asterisk Version: 1.4.24.1
Dahdi version:  dahdi-linux-2.1.0.4, dahdi-tools-2.1.0.2
Zap device: Network controller: Sangoma Technologies Corp. A104d QUAD T1/E1
AFT card
Kernel: 2.6.18-128.1.10

We have used HylaFAX+ for the mail 2 fax and fax2mail feature.
We have setup incoming and outgoing phpagi scripts for the calculation for
fax and billing too.
But when we are sending and receiving the faxes it is working fine,
But some times the deadagi application got stuck the channels.
And becuase of that the phpagi scripts are not completed.
In that case we need to restart asterisk complusary.
We are using zap lines for the outbound and inbound faxes.

Can any one suggest solution for this?

Thanks in advance!!!

Thanks,
Max Alex
Voip Developer
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

RE: [Asterisk-Users] DeadAGI Application

2004-09-01 Thread Florian Overkamp
Hi, 

> -Original Message-
> I downloaded the astcc calling card program.  Thanks, it is 
> very easy to 
> setup and works Excellent.  Anyway, it says to use DeadAGI to run it 
> rather than AGI.  I don't know what I am doing wrong.  I just 
> updated my 
> asterisk from cvs and rebuilt and reinstalled.  I do not have an 
> application called DeadAGI.  I have searched the source, google, etc. 
> but have not been able to find anything.  Any pointers?

It should be in the regular AGI code, but tell us, what version of asterisk
are you running ? DeadAGI has been around for a while, but not forever, so
if your code is 'ancient', better upgrade :-)

Best regards,
Florian

___
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


Re: [Asterisk-Users] DeadAGI Application

2004-09-01 Thread Martin Holler
Darren Wiebe <[EMAIL PROTECTED]> writes:

> I downloaded the astcc calling card program.  Thanks, it is very easy
> to setup and works Excellent.  Anyway, it says to use DeadAGI to run
> it rather than AGI.  I don't know what I am doing wrong.  I just
> updated my asterisk from cvs and rebuilt and reinstalled.  I do not
> have an application called DeadAGI.  I have searched the source,
> google, etc. but have not been able to find anything.  Any pointers?

Hi,

probably you are searching for this
http://www.voip-info.org/wiki-Asterisk+cmd+AGI
There is one big heading called "Use DeadAGI when you have no living
channel". From that page you have a link to
http://www.voip-info.org/wiki-Asterisk+cmd+DeadAGI
But the information there says that the command does not exist in
Asterisk 1.0 or 0.9 ...

Greetings,
 Martin
___
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


Re: [Asterisk-Users] DeadAGI Application

2004-09-01 Thread Darren Wiebe
I'm not sure what the problem is with my source.  I'm running the latest 
copy, as of this morning, from cvs.  DeadAGI will not build on my server 
but it will build on my laptop.  I'll have to have a look at my source.  
I just copied the res_agi.so file across this morning and everything 
works fine.  Thanks for your help.

Darren Wiebe
[EMAIL PROTECTED]
Florian Overkamp wrote:
Hi, 

 

-Original Message-
I downloaded the astcc calling card program.  Thanks, it is 
very easy to 
setup and works Excellent.  Anyway, it says to use DeadAGI to run it 
rather than AGI.  I don't know what I am doing wrong.  I just 
updated my 
asterisk from cvs and rebuilt and reinstalled.  I do not have an 
application called DeadAGI.  I have searched the source, google, etc. 
but have not been able to find anything.  Any pointers?
   

It should be in the regular AGI code, but tell us, what version of asterisk
are you running ? DeadAGI has been around for a while, but not forever, so
if your code is 'ancient', better upgrade :-)
Best regards,
Florian
___
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
 

___
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


[Asterisk-Users] DeadAGI variables confusion

2006-02-02 Thread Dave Brooks
Hi * users,

We're using calls to external scripts through AGI at various points
throughout our IVR system. We use these scripts to log certain events
and to make certain choices that I wasn't sure would be possible in
the dial plan. The problem comes with with the final call to our
script. We use this line:

exten => h,1,deadagi(log.php|{$service}|Hung up|${UNIQUEID})

I know there are some issues with getting variables through DeadAGI,
but I just wanted some clarification, because I haven't seen it
explained clearly. Certainly the value of UNIQUEID was being
successfully passed to log.php in earlier versions of * but isn't now
(I just installed version 1.2.4)

Any advice welcome. Even if it is telling me we've beein doing this
all wrong the whole time!

Regards,
DaveB
___
--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] deadagi on v1.4.xx

2010-12-19 Thread John Millican

Hello all,
I have a perl script that updates a M$ SQL DB based on an ivr that is 
run on asterisk.

When it runs as a normal agi, it works great.

when run as a DeadAGI it does not work.

When i execute the script from h channel withDeadAGI and agi debug on i get:

[2010-12-20 01:08:54] -- Launched AGI Script 
/var/lib/asterisk/agi-bin/insert_10day_var.pl

[2010-12-20 01:08:54] AGI Tx >> agi_request: insert_10day_var.pl
[2010-12-20 01:08:54] AGI Tx >> agi_channel: SIP/
[2010-12-20 01:08:54] AGI Tx >> agi_language: en
[2010-12-20 01:08:54] AGI Tx >> agi_type: SIP
[2010-12-20 01:08:54] AGI Tx >> agi_uniqueid: 1292825277.243
[2010-12-20 01:08:54] AGI Tx >> agi_callerid: 
[2010-12-20 01:08:54] AGI Tx >> agi_calleridname: 
[2010-12-20 01:08:54] AGI Tx >> agi_callingpres: 0
[2010-12-20 01:08:54] AGI Tx >> agi_callingani2: 0
[2010-12-20 01:08:54] AGI Tx >> agi_callington: 0
[2010-12-20 01:08:54] AGI Tx >> agi_callingtns: 0
[2010-12-20 01:08:54] AGI Tx >> agi_dnid: unknown
[2010-12-20 01:08:54] AGI Tx >> agi_rdnis: unknown
[2010-12-20 01:08:54] AGI Tx >> agi_context: 
[2010-12-20 01:08:54] AGI Tx >> agi_extension: h
[2010-12-20 01:08:54] AGI Tx >> agi_priority: 3
[2010-12-20 01:08:54] AGI Tx >> agi_enhanced: 0.0
[2010-12-20 01:08:54] AGI Tx >> agi_accountcode: in call file>

[2010-12-20 01:08:54] AGI Tx >>
[2010-12-20 01:08:54] -- AGI Script insert_10day_var.pl completed, 
returning 0


Which is identical to the debug output when it work from the live 
channel AGI


but I do not get the data in the db as it does when run by hand.
I am very tired, frustrated and have been googleing my butt of, no luck.

I know the script is getting the vars in as I had mistakenly left a 
print statement in, which of course caused the script to bail but it 
showed the correct info before it failed.


Could it be that even though it is running DeadAGI that there is a 
sighup killing the script?  if any suggestions on what to do about it?

AT:  http://www.voip-info.org/wiki/view/Asterisk+cmd+DeadAGI
I did see that in 1.2 even on a deadagi I might have to catch the sighup 
and it said


Your script will have to block SIGHUP signals, which you can do like so:

Perl:
 $SIG{HUP} = "IGNORE"

I tried this and now at least I get a status after the DeadAGI returns, 
which it did not get with out it.  Although the status is FAILURE.


Any suggestions?
Thanks,
JohnM




--
_
-- 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 and billsec or answeredtime

2007-08-28 Thread Giedrius Augys
Hello,
  I want to create php rate script and I'm using Deadagi. But I allways get
billsec 0 , or nothing. Can you help me to solve this problem...
My extension.conf:
exten => _123,1,DeadAgi(rate.php)
exten => _123,2,hangup

And my simple test php script rate.php
#!/usr/local/bin/php -q
answer();

$AGI->stream_file('demo-thanks');
$AGI->stream_file('vm-goodbye');

$AGI->hangup();

$billsec = get_var($AGI,"CDR(billsec)");
debug("Billsec: $billsec", 1);

function debug($string, $level=3) {
global $AGI;
$AGI->verbose($string, $level);
}

function get_var( $agi, $value) {
$r = $agi->get_variable( $value );

if ($r['result'] == 1) {
$result = $r['data'];
return $result;
}
else
return '';
}

?>
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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

[asterisk-users] DeadAgi Application in asterisk 1.6

2009-02-18 Thread Max Alex
Hi All,
I have configured the phpagi application for counting the duration of call,
The call is originated from the script and after hangup the call the
duration and status will be stored.
This functionality and php script is working fine with deadagi application
with asterisk 1.4.
I have a problem with asterisk 1.6 deadagi application, when the call is
hangup at that time the script is exited and no duration and status will be
counted, So please provide help regarding this deadagi application in
asterisk 1.6 branch,
Please help me regarding this!!
Thanks in Advance!!!

Thanks,
Max Alex
Voip Developer
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] DeadAgi application not exiting

2009-08-08 Thread Steve Edwards
On Sat, 8 Aug 2009, Max Alex wrote:

> Actually the scripts which are set to run to the hangup of channels, 
> which is originated for sending fax. We are trying to get the answer 
> time, duration of fax on hangup of that channels, but the script becomes 
> stuck and we need to restart the asterisk and also we are not getting 
> any output of script as it is stuck.

Let's start with:

1) Posting to the correct list. This sounds like a -users question, not a 
-dev question. (If it doesn't involve changing the C source code of 
Asterisk, it's a -users question.)

2) A "meaningful" subject. I suspect users have more than 1 "issue" with 
deadagi(). How about "DeadAGI application not exiting?"

The purpose of 1 & 2 are twofold: to help you get an answer and to help 
the "next" guy when he is searching the archives to see if anyone else has 
had this issue and resolution. You did search the archives didn't you?

3) What version of Asterisk?

4) What language and version is your script written in?

5) Who's AGI library are you using?

6) What have you tried that failed to resolve your issue?

7) What have you done to collect useful information?

The "agi debug" command (I'm a 1.2 Luddite) can be very helpful.

8) Is your script starting?

9) Where in your script is it getting "stuck?"

10) Are you violating the AGI protocol?

Do you actually have to stop Asterisk? What happens if you "kill 
-[1|9|15]" the process running your script.

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


[Asterisk-Users] DeadAGI and Hangup on channel

2006-01-27 Thread Grigoriy Puzankin
Hello,

I'm trying to catch channel hangup in DeadAgi script. For example, A
calls to DeadAgi script which connects (Dial) to B. After Dial command
exits I need to identify where hangup came from: A or B. CHANNEL
STATUS returns 6 (Line is Up) regardless of who hungup.

In CLI "show channels" states that channel A to DeadAgi is UP even if
A and B hungup.

If A stays on the line after conversation with B (hangup from B), then
DeadAgi would continue (with prompts and etc.), if A is off then
DeadAgi should exit gracefully (not killed as Agi).

Does anyone know how to do it?

Thanks in advance.

--
Grigoriy Puzankin

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


Re: [asterisk-users] deadagi and billsec or answeredtime

2007-08-28 Thread Atis
On 8/28/07, Giedrius Augys <[EMAIL PROTECTED]> wrote:
> Hello,
>   I want to create php rate script and I'm using Deadagi. But I allways get
> billsec 0 , or nothing. Can you help me to solve this problem...

It seems that there is problem with Answer(). Does it get executed
from AGI? Do you hear voice prompts?

You can try adding Answer() before DeadAgi().

Regards,
Atis

> My extension.conf:
> exten => _123,1,DeadAgi(rate.php)
> exten => _123,2,hangup
>
> And my simple test php script rate.php
> #!/usr/local/bin/php -q
>  include_once (dirname(__FILE__)."/phpagi.php");
> $AGI = new AGI();
>
> $AGI->answer();
>
> $AGI->stream_file('demo-thanks');
> $AGI->stream_file('vm-goodbye');
>
> $AGI->hangup();
>
> $billsec = get_var($AGI,"CDR(billsec)");
> debug("Billsec: $billsec", 1);
>
> function debug($string, $level=3) {
> global $AGI;
> $AGI->verbose($string, $level);
> }
>
> function get_var( $agi, $value) {
> $r = $agi->get_variable( $value );
>
> if ($r['result'] == 1) {
> $result = $r['data'];
> return $result;
> }
> else
> return '';
> }
>
> ?>
>
>
> ___
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>
> http://lists.digium.com/mailman/listinfo/asterisk-users
>


-- 
Atis Lezdins,
IT Responsible of BEST Riga,
[EMAIL PROTECTED]
ICQ: 142239285
Skype: atis.lezdins
Cell Phone: +371 28806004 [Tele2, Latvia]
Work phone: +1 800 7502835 [Toll free, USA]
?BEST? -> www.BEST.eu.org

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] deadagi and billsec or answeredtime

2007-08-28 Thread Giedrius Augys
I solve this problem. I'm not sure, but you get billsec when you use Dial
application. Using dial app , I get billsec.

2007/8/28, Atis <[EMAIL PROTECTED]>:
>
> On 8/28/07, Giedrius Augys <[EMAIL PROTECTED]> wrote:
> > Hello,
> >   I want to create php rate script and I'm using Deadagi. But I allways
> get
> > billsec 0 , or nothing. Can you help me to solve this problem...
>
> It seems that there is problem with Answer(). Does it get executed
> from AGI? Do you hear voice prompts?
>
> You can try adding Answer() before DeadAgi().
>
> Regards,
> Atis
>
> > My extension.conf:
> > exten => _123,1,DeadAgi(rate.php)
> > exten => _123,2,hangup
> >
> > And my simple test php script rate.php
> > #!/usr/local/bin/php -q
> >  > include_once (dirname(__FILE__)."/phpagi.php");
> > $AGI = new AGI();
> >
> > $AGI->answer();
> >
> > $AGI->stream_file('demo-thanks');
> > $AGI->stream_file('vm-goodbye');
> >
> > $AGI->hangup();
> >
> > $billsec = get_var($AGI,"CDR(billsec)");
> > debug("Billsec: $billsec", 1);
> >
> > function debug($string, $level=3) {
> > global $AGI;
> > $AGI->verbose($string, $level);
> > }
> >
> > function get_var( $agi, $value) {
> > $r = $agi->get_variable( $value );
> >
> > if ($r['result'] == 1) {
> > $result = $r['data'];
> > return $result;
> > }
> > else
> > return '';
> > }
> >
> > ?>
> >
> >
> > ___
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
>
> --
> Atis Lezdins,
> IT Responsible of BEST Riga,
> [EMAIL PROTECTED]
> ICQ: 142239285
> Skype: atis.lezdins
> Cell Phone: +371 28806004 [Tele2, Latvia]
> Work phone: +1 800 7502835 [Toll free, USA]
> ?BEST? -> www.BEST.eu.org
>
> ___
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Pagarbiai  / Best Regards,
Giedrius Augys
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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

Re: [asterisk-users] deadagi and billsec or answeredtime

2007-08-28 Thread Atis
On 8/28/07, Giedrius Augys <[EMAIL PROTECTED]> wrote:
> I solve this problem. I'm not sure, but you get billsec when you use Dial
> application. Using dial app , I get billsec.

Well, Dial usually changes ANSWER status, because you usually answer
phone that is ringing. If you won't answer, you won't get billsec.

Regards,
Atis

> 2007/8/28, Atis <[EMAIL PROTECTED] >:
> > On 8/28/07, Giedrius Augys <[EMAIL PROTECTED] > wrote:
> > > Hello,
> > >   I want to create php rate script and I'm using Deadagi. But I allways
> get
> > > billsec 0 , or nothing. Can you help me to solve this problem...
> >
> > It seems that there is problem with Answer(). Does it get executed
> > from AGI? Do you hear voice prompts?
> >
> > You can try adding Answer() before DeadAgi().
> >
> > Regards,
> > Atis
> >
> > > My extension.conf:
> > > exten => _123,1,DeadAgi(rate.php)
> > > exten => _123,2,hangup
> > >
> > > And my simple test php script rate.php
> > > #!/usr/local/bin/php -q
> > >  > > include_once (dirname(__FILE__)."/phpagi.php");
> > > $AGI = new AGI();
> > >
> > > $AGI->answer();
> > >
> > > $AGI->stream_file('demo-thanks');
> > > $AGI->stream_file('vm-goodbye');
> > >
> > > $AGI->hangup();
> > >
> > > $billsec = get_var($AGI,"CDR(billsec)");
> > > debug("Billsec: $billsec", 1);
> > >
> > > function debug($string, $level=3) {
> > > global $AGI;
> > > $AGI->verbose($string, $level);
> > > }
> > >
> > > function get_var( $agi, $value) {
> > > $r = $agi->get_variable( $value );
> > >
> > > if ($r['result'] == 1) {
> > > $result = $r['data'];
> > > return $result;
> > > }
> > > else
> > > return '';
> > > }
> > >
> > > ?>
> > >
> > >
> > > ___
> > > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> > >
> > > asterisk-users mailing list
> > > To UNSUBSCRIBE or update options visit:
> > >
> > >
> http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> >
> >
> > --
> > Atis Lezdins,
> > IT Responsible of BEST Riga,
> > [EMAIL PROTECTED]
> > ICQ: 142239285
> > Skype: atis.lezdins
> > Cell Phone: +371 28806004 [Tele2, Latvia]
> > Work phone: +1 800 7502835 [Toll free, USA]
> > ?BEST? -> www.BEST.eu.org
> >
> > ___
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >
> http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
>
>
> --
> Pagarbiai  / Best Regards,
> Giedrius Augys
> ___
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>
> http://lists.digium.com/mailman/listinfo/asterisk-users
>


-- 
Atis Lezdins,
IT Responsible of BEST Riga,
[EMAIL PROTECTED]
ICQ: 142239285
Skype: atis.lezdins
Cell Phone: +371 28806004 [Tele2, Latvia]
Work phone: +1 800 7502835 [Toll free, USA]
?BEST? -> www.BEST.eu.org

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DeadAgi Application in asterisk 1.6

2009-02-19 Thread Philipp Kempgen
Max Alex schrieb:
> I have configured the phpagi application for counting the duration of call,
> The call is originated from the script and after hangup the call the
> duration and status will be stored.
> This functionality and php script is working fine with deadagi application
> with asterisk 1.4.
> I have a problem with asterisk 1.6 deadagi application, when the call is
> hangup at that time the script is exited and no duration and status will be
> counted, So please provide help regarding this deadagi application in
> asterisk 1.6 branch,

You need to block some signals (HUP? INT? PIPE? TERM? QUIT :-) in
your script.
http://www.php.net/manual/en/function.pcntl-signal.php
http://www.php.net/manual/en/function.pcntl-sigprocmask.php


Philipp Kempgen
-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [Asterisk-Users] DeadAGI and Hangup on channel

2006-01-30 Thread Grigoriy Puzankin
Hello,

GP> I'm trying to catch channel hangup in DeadAgi script.

Googling didn't help. Channel status AGI command returns 6 - "line is
up", because hangup has been requested only (and not completed).

I found the following solution. In res_agi.c source I found usage of
ast_check_hangup(chan) function. Then I added one AGI command to
retrieve ast_check_hangup function value.

Add the following routine to res_agi.c:

static int handle_getchannelhangup(struct ast_channel *chan, AGI *agi, int 
argc, char *argv[])
{   
  
int res;
  
res = ast_check_hangup(chan))
fdprintf(agi->fd, "200 result=%d\n", res);
return RESULT_SUCCESS;
}

Declare agi command usage:

static char usage_getchannelhangup[] =
" Usage: GET CHANNEL HANGUP\n"
" \tChecks if hangup was requested on channel.\n"
" Returns 1 if hangup was requested on the channel, otherwise - 0.\n";

Add function definition to static agi_command commands[MAX_COMMANDS]:

{ { "get", "channel", "hangup", NULL }, handle_getchannelhangup, "Checks if 
hangup requested on current channel.", usage_getchannelhangup },

I'm not C programmer, my apologies to gurus.

If anyone find it useful then this could be a FEATURE REQUEST.

--
Grigoriy Puzankin

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


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