Re: [asterisk-users] faxdetect on/off on the fly?

2013-01-04 Thread David Cunningham
Hi Danny,

Can you please elaborate on how in the dialplan we can set faxdetect on and
off?

We currently have it set on in sip.conf.

Thanks.


On 3 January 2013 17:21, Danny Nicholas da...@debsinc.com wrote:

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *David Cunningham
 *Sent:* Thursday, January 03, 2013 3:13 PM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* [asterisk-users] faxdetect on/off on the fly?

 ** **

 Hello,

 We want the ability to choose from an AGI script whether or not to enable
 faxdetect for calls over SIP or DAHDI. Is this possible, or can anyone
 suggest a workaround?

 Thanks for any advice.

 You should be able to call the AGI and set a dialplan variable and use
 Gotoif to do/not do faxdetect.  Reading the .sample files for 11.0 it seems
 that normally these are “configured until restart/reload” but with a little
 testing, the default should be overrideable.


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




-- 
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
--
_
-- 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] faxdetect on/off on the fly?

2013-01-04 Thread Danny Nicholas
Don't think you actually can, per se.  What you can do is set a variable and
redirect to the line that has this defined or undefined.

Let's say that you have 4 lines;  SIP/1001 and DAHDI/1 have faxdetect=yes
defined in sip.conf and chan_dahdi.conf. SIP/1002 and DAHDI/2 have
faxdetect=no in the respective places.  Simple Perl AGI to set dialplan
variable:

cat selline.pl

#!/usr/local/bin/perl

#

#

# Send USEFAX to Dialplan

#

#

use strict;

use warnings;

require Asterisk::AGI;

# turn off I/O buffering

$| = 1;

 

# the AGI object

my $agi = new Asterisk::AGI;

my %input = $agi-ReadParse();

 

print STDOUT SET VARIABLE USEFAX \ON\ \n;

print STDOUT SET VARIABLE USEFAX \OFF\ \n;

exit;

In the Dialplan

Exten = s,1,Answer()

Exten = s,n,AGI(selline.pl)

Exten = s,n,Gotoif($

exten = s,1,Gotoif($[${USEFAX} = ON]?on:off)

exten = s,n(on),Dial(SIP/1001)

exten = s,n,hangup

exten = s,n(off),Dial(SIP/1002)

exten = s,n,hangup

 

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of David
Cunningham
Sent: Friday, January 04, 2013 1:11 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] faxdetect on/off on the fly?

 

Hi Danny,

Can you please elaborate on how in the dialplan we can set faxdetect on and
off?

We currently have it set on in sip.conf.

Thanks.



On 3 January 2013 17:21, Danny Nicholas da...@debsinc.com wrote:

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of David
Cunningham
Sent: Thursday, January 03, 2013 3:13 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] faxdetect on/off on the fly?

 

Hello,

We want the ability to choose from an AGI script whether or not to enable
faxdetect for calls over SIP or DAHDI. Is this possible, or can anyone
suggest a workaround?

Thanks for any advice.


You should be able to call the AGI and set a dialplan variable and use
Gotoif to do/not do faxdetect.  Reading the .sample files for 11.0 it seems
that normally these are configured until restart/reload but with a little
testing, the default should be overrideable.


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




-- 
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019

--
_
-- 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] faxdetect on/off on the fly?

2013-01-04 Thread Warren Selby
On Thu, Jan 3, 2013 at 9:39 PM, David Cunningham
dcunning...@voisonics.comwrote:

 We have all calls going to an AGI, which decides where the number will get
 routed to, and if fax detection should be enabled for this call. The choice
 should only apply to the current call.


What criteria would determine if fax detection should be enabled?  From
reading this message, what it sounds like is you want the call to go to the
AGI, and if a CNG tone is detected, you want it to go to a specific fax
extension.  That's what faxdetect does.  You enable it on all your lines,
and if a CNG tone is detected, it sends it to the fax exten in the
current context.  This would remove your routing AGI form the picture, so I
don't think you want faxdetect enabled on your lines.

Maybe I'm misunderstanding, but to me, it seems like you're trying to
detect a CNG tone and base your routing decision on that inside your AGI.
Faxdetect will detect the CNG tone after the call is answered and
automatically route for you.  It's not the kind of thing you want to set on
a call by call basis.  If you're looking to detect a CNG tone inside your
AGI, I'm not sure what mechanism is available for that.


--Warren Selby, dCAP
http://www.SelbyTech.com http://www.selbytech.com
--
_
-- 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] faxdetect on/off on the fly?

2013-01-04 Thread Eric Wieling
I believe Asterisk 11 is the first version which allows you to enable and 
disable faxdetect on the fly.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Warren Selby
Sent: Friday, January 04, 2013 2:42 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] faxdetect on/off on the fly?

On Thu, Jan 3, 2013 at 9:39 PM, David Cunningham dcunning...@voisonics.com 
wrote:


We have all calls going to an AGI, which decides where the number will 
get routed to, and if fax detection should be enabled for this call. The choice 
should only apply to the current call.



What criteria would determine if fax detection should be enabled?  From reading 
this message, what it sounds like is you want the call to go to the AGI, and if 
a CNG tone is detected, you want it to go to a specific fax extension.  That's 
what faxdetect does.  You enable it on all your lines, and if a CNG tone is 
detected, it sends it to the fax exten in the current context.  This would 
remove your routing AGI form the picture, so I don't think you want faxdetect 
enabled on your lines.  


Maybe I'm misunderstanding, but to me, it seems like you're trying to detect a 
CNG tone and base your routing decision on that inside your AGI.  Faxdetect 
will detect the CNG tone after the call is answered and automatically route for 
you.  It's not the kind of thing you want to set on a call by call basis.  If 
you're looking to detect a CNG tone inside your AGI, I'm not sure what 
mechanism is available for that.  



--Warren Selby, dCAP
http://www.SelbyTech.com


--
_
-- 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] faxdetect on/off on the fly?

2013-01-04 Thread Steve Edwards

On Fri, 4 Jan 2013, Danny Nicholas wrote:


Simple Perl AGI to set dialplan variable:

print STDOUT SET VARIABLE USEFAX \ON\ \n;

print STDOUT SET VARIABLE USEFAX \OFF\ \n;


You need to read the response from each request to comply with the AGI 
protocol.


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


[asterisk-users] faxdetect on/off on the fly?

2013-01-03 Thread David Cunningham
Hello,

We want the ability to choose from an AGI script whether or not to enable
faxdetect for calls over SIP or DAHDI. Is this possible, or can anyone
suggest a workaround?

Thanks for any advice.

-- 
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
--
_
-- 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] faxdetect on/off on the fly?

2013-01-03 Thread Danny Nicholas
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of David
Cunningham
Sent: Thursday, January 03, 2013 3:13 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] faxdetect on/off on the fly?

 

Hello,

We want the ability to choose from an AGI script whether or not to enable
faxdetect for calls over SIP or DAHDI. Is this possible, or can anyone
suggest a workaround?

Thanks for any advice.

You should be able to call the AGI and set a dialplan variable and use
Gotoif to do/not do faxdetect.  Reading the .sample files for 11.0 it seems
that normally these are configured until restart/reload but with a little
testing, the default should be overrideable.

--
_
-- 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] faxdetect on/off on the fly?

2013-01-03 Thread Steve Edwards

On Thu, 3 Jan 2013, David Cunningham wrote:

We want the ability to choose from an AGI script whether or not to 
enable faxdetect for calls over SIP or DAHDI.


What's the 'use case?'

You're going to call in and execute an AGI that will enable faxdetect for 
future calls to this channel or other channels?


Should the 'change' survive an Asterisk restart or an OS reboot?

--
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] faxdetect on/off on the fly?

2013-01-03 Thread David Cunningham
Hi Steve,

We have all calls going to an AGI, which decides where the number will get
routed to, and if fax detection should be enabled for this call. The choice
should only apply to the current call.

Thanks very much.


On 3 January 2013 17:46, Steve Edwards asterisk@sedwards.com wrote:

 On Thu, 3 Jan 2013, David Cunningham wrote:

  We want the ability to choose from an AGI script whether or not to enable
 faxdetect for calls over SIP or DAHDI.


 What's the 'use case?'

 You're going to call in and execute an AGI that will enable faxdetect for
 future calls to this channel or other channels?

 Should the 'change' survive an Asterisk restart or an OS reboot?

 --
 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-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users




-- 
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
--
_
-- 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