Re: [asterisk-users] Find out which key ended recording?

2019-06-06 Thread David Cunningham
Hi Steve,

What language is that please? We're using Perl and so far I haven't found
an equivalent there.

Thanks for your help.


On Fri, 7 Jun 2019 at 12:10, Steve Edwards 
wrote:

> On Fri, 7 Jun 2019, David Cunningham wrote:
>
> > We have a need to record audio and allow the user to press any DTMF key
> > to end the recording. Currently we're using the AGI command "record
> > file" which does allow us to specify which DTMF keys can end the
> > recording.
> >
> > However we also need to know which key actually ended the recording.
> > Note that only allowing # or * to end the recording won't work for us.
> >
> > Does anyone know how we can tell which key ended the recording? Thanks
> > in advance for any help.
>
> Here's a snippet from one of my AGIs:
>
> // record the voice
>  exec_agi("RECORD FILE"
>" %s" // filename
>" wav"// format
>" #*1234567890"
>  // escape digits
>" %d000"  // timeout in ms
>" BEEP"   // BEEP
>  , recorded_path
>  , recording_limit
>  );
>
> // should we abort?
>  if  ('*' == agi_environment.result)
>  {
>  agi_set_variable("STATUS", "*");
>  exit(EXIT_SUCCESS);
>  }
>
> // are we finished?
>  if  ('#' == agi_environment.result)
>  {
>  break;
>  }
>
> Looks like agi_environment.result is your Huckleberry.
>
> --
> Thanks in advance,
> -
> Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
>  https://www.linkedin.com/in/steve-edwards-4244281
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Find out which key ended recording?

2019-06-06 Thread Steve Edwards

On Fri, 7 Jun 2019, David Cunningham wrote:

We have a need to record audio and allow the user to press any DTMF key 
to end the recording. Currently we're using the AGI command "record 
file" which does allow us to specify which DTMF keys can end the 
recording.


However we also need to know which key actually ended the recording. 
Note that only allowing # or * to end the recording won't work for us.


Does anyone know how we can tell which key ended the recording? Thanks 
in advance for any help.


Here's a snippet from one of my AGIs:

// record the voice
exec_agi("RECORD FILE"
  " %s" // filename
  " wav"// format
  " #*1234567890"
// escape digits
  " %d000"  // timeout in ms
  " BEEP"   // BEEP
, recorded_path
, recording_limit
);

// should we abort?
if  ('*' == agi_environment.result)
{
agi_set_variable("STATUS", "*");
exit(EXIT_SUCCESS);
}

// are we finished?
if  ('#' == agi_environment.result)
{
break;
}

Looks like agi_environment.result is your Huckleberry.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Find out which key ended recording?

2019-06-06 Thread David Cunningham
Hello,

We have a need to record audio and allow the user to press any DTMF key to
end the recording. Currently we're using the AGI command "record file"
which does allow us to specify which DTMF keys can end the recording.

However we also need to know *which* key actually ended the recording. Note
that only allowing # or * to end the recording won't work for us.

Does anyone know how we can tell which key ended the recording? Thanks in
advance for any help.

-- 
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread John Novack

Too bad.

LOTS of users will still want to continue to use these cards, example the OP!


Good news it probably suppresses prices on used cards!


John Novack



Malcolm Davenport wrote:

Howdy,

That is correct.

The list of supported cards is in the README file (not the -complete package 
README, but the dahdi-linux README)

Cheers

On Thu, Jun 6, 2019 at 2:52 PM John Novack SCII_U mailto:jnov...@comcast.net>> wrote:

Doesn't DAHDI 3.0 remove support for a bunch of older cards, including the 
TDM400 and 410?


John Novack



Greg Woods wrote:



On Thu, Jun 6, 2019 at 12:17 PM Malcolm Davenport mailto:malco...@sangoma.com>> wrote:

Howdy,

There's a dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz.

Try that.


I noticed that was there, but I didn't try it originally because it's 
obviously a beta version. However, I did download it and try it. It does 
compile, but doesn't work correctly. For one thing, it thinks my Digium card is 
an Ethernet controller:

# lspci | grep Digium
07:01.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog 
card (rev 11)

Attempting to start the dahdi service results in:

Short version:Jun 06 13:11:38 worldsys.gregandeva.net 
 sh[1026]: using 
'/etc/dahdi/assigned-spans.conf'
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]: DAHDI_CHANCONFIG failed on channel 1: Invalid argument (22)
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]: Selected signaling not supported
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]: Possible causes:
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]:         FXO signaling is being used on a FXO interface (use a FXS signaling 
variant)
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]:         RBS signaling is being used on a E1 CCS span
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]:         Signaling is being assigned to channel 16 of an E1 CAS span
Jun 06 13:11:38 worldsys.gregandeva.net  
systemd[1]: dahdi.service: Main process exited, code=exited, status=1/FAILURE
Jun 06 13:11:38 worldsys.gregandeva.net  
systemd[1]: dahdi.service: Failed with result 'exit-code'.
Jun 06 13:11:38 worldsys.gregandeva.net  
systemd[1]: Failed to start The DAHDI drivers allow you to use your linux computer to 
accept incoming data and voice interfaces.

(The assigned-spans.conf file has nothing in it but comments)

Long version:
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable 
to specify channel 1: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to 
open channel 1: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:17367 build_channels: 
Unable to register channel '1'
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:17574 process_dahdi: 
Channel '1' failure ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable 
to specify channel 2: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to 
open channel 2: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:17367 build_channels: 
Unable to register channel '2'
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:17574 process_dahdi: 
Channel '2' failure ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable 
to specify channel 3: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to 
open channel 3: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  
asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:17367 build_channels: 
Unable to register channel '3'
Jun 06 13:11:42 

Re: [asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread Malcolm Davenport
Howdy,

That is correct.

The list of supported cards is in the README file (not the -complete
package README, but the dahdi-linux README)

Cheers

On Thu, Jun 6, 2019 at 2:52 PM John Novack SCII_U 
wrote:

> Doesn't DAHDI 3.0 remove support for a bunch of older cards, including the
> TDM400 and 410?
>
>
> John Novack
>
>
>
> Greg Woods wrote:
>
>
>
> On Thu, Jun 6, 2019 at 12:17 PM Malcolm Davenport 
> wrote:
>
>> Howdy,
>>
>> There's a dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz.
>>
>> Try that.
>>
>
> I noticed that was there, but I didn't try it originally because it's
> obviously a beta version. However, I did download it and try it. It does
> compile, but doesn't work correctly. For one thing, it thinks my Digium
> card is an Ethernet controller:
>
> # lspci | grep Digium
> 07:01.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog
> card (rev 11)
>
> Attempting to start the dahdi service results in:
>
> Short version:Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: using
> '/etc/dahdi/assigned-spans.conf'
> Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: DAHDI_CHANCONFIG failed
> on channel 1: Invalid argument (22)
> Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Selected signaling not
> supported
> Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Possible causes:
> Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: FXO signaling
> is being used on a FXO interface (use a FXS signaling variant)
> Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: RBS signaling
> is being used on a E1 CCS span
> Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Signaling is
> being assigned to channel 16 of an E1 CAS span
> Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: dahdi.service: Main
> process exited, code=exited, status=1/FAILURE
> Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: dahdi.service: Failed
> with result 'exit-code'.
> Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: Failed to start The
> DAHDI drivers allow you to use your linux computer to accept incoming data
> and voice interfaces.
>
> (The assigned-spans.conf file has nothing in it but comments)
>
> Long version:
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 1:
> Invalid argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 1: Invalid
> argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
> '1'
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '1' failure
> ignored: ignore_failed_channels.
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 2:
> Invalid argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 2: Invalid
> argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
> '2'
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '2' failure
> ignored: ignore_failed_channels.
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 3:
> Invalid argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 3: Invalid
> argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
> '3'
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '3' failure
> ignored: ignore_failed_channels.
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 4:
> Invalid argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 4: Invalid
> argument
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
> '4'
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '4' failure
> ignored: ignore_failed_channels.
> Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
> WARNING[1333]: chan_dahdi.c:18883 process_dahdi: 

Re: [asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread Greg Woods
On Thu, Jun 6, 2019 at 1:51 PM John Novack SCII_U 
wrote:

> Doesn't DAHDI 3.0 remove support for a bunch of older cards, including the
> TDM400 and 410?
>

If it does, they have a funny way of implementing it, since the proper
modules are still being loaded.

This is a $600+ card, which is about 2/3 of the price of an entire PC built
from parts, and I really don't want to have to buy a new telephony card. If
this is true, then I'll have to go back to finding a way to make 2.11.1
work.

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread John Novack SCII_U

Doesn't DAHDI 3.0 remove support for a bunch of older cards, including the 
TDM400 and 410?


John Novack



Greg Woods wrote:



On Thu, Jun 6, 2019 at 12:17 PM Malcolm Davenport mailto:malco...@sangoma.com>> wrote:

Howdy,

There's a dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz.

Try that.


I noticed that was there, but I didn't try it originally because it's obviously a beta version. However, I did download it and try it. It does compile, but doesn't work 
correctly. For one thing, it thinks my Digium card is an Ethernet controller:


# lspci | grep Digium
07:01.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog card 
(rev 11)

Attempting to start the dahdi service results in:

Short version:Jun 06 13:11:38 worldsys.gregandeva.net 
 sh[1026]: using 
'/etc/dahdi/assigned-spans.conf'
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]: DAHDI_CHANCONFIG failed on channel 1: Invalid argument (22)
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]: Selected signaling not supported
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]: Possible causes:
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]:         FXO signaling is being used on a FXO interface (use a FXS signaling 
variant)
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]:         RBS signaling is being used on a E1 CCS span
Jun 06 13:11:38 worldsys.gregandeva.net  
sh[1026]:         Signaling is being assigned to channel 16 of an E1 CAS span
Jun 06 13:11:38 worldsys.gregandeva.net  
systemd[1]: dahdi.service: Main process exited, code=exited, status=1/FAILURE
Jun 06 13:11:38 worldsys.gregandeva.net  
systemd[1]: dahdi.service: Failed with result 'exit-code'.
Jun 06 13:11:38 worldsys.gregandeva.net  systemd[1]: Failed to start The DAHDI drivers allow you to use your linux computer to accept incoming 
data and voice interfaces.


(The assigned-spans.conf file has nothing in it but comments)

Long version:
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 
1: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 1: 
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register 
channel '1'
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '1' failure 
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 
2: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 2: 
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register 
channel '2'
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '2' failure 
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 
3: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 3: 
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register 
channel '3'
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '3' failure 
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 
4: Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net  asterisk[1333]: [Jun  6 13:11:42] ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 4: 
Invalid argument

Re: [asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread Greg Woods
On Thu, Jun 6, 2019 at 12:17 PM Malcolm Davenport 
wrote:

> Howdy,
>
> There's a dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz.
>
> Try that.
>

I noticed that was there, but I didn't try it originally because it's
obviously a beta version. However, I did download it and try it. It does
compile, but doesn't work correctly. For one thing, it thinks my Digium
card is an Ethernet controller:

# lspci | grep Digium
07:01.0 Ethernet controller: Digium, Inc. Wildcard TDM410 4-port analog
card (rev 11)

Attempting to start the dahdi service results in:

Short version:Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: using
'/etc/dahdi/assigned-spans.conf'
Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: DAHDI_CHANCONFIG failed
on channel 1: Invalid argument (22)
Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Selected signaling not
supported
Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Possible causes:
Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: FXO signaling is
being used on a FXO interface (use a FXS signaling variant)
Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: RBS signaling is
being used on a E1 CCS span
Jun 06 13:11:38 worldsys.gregandeva.net sh[1026]: Signaling is
being assigned to channel 16 of an E1 CAS span
Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: dahdi.service: Main
process exited, code=exited, status=1/FAILURE
Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: dahdi.service: Failed
with result 'exit-code'.
Jun 06 13:11:38 worldsys.gregandeva.net systemd[1]: Failed to start The
DAHDI drivers allow you to use your linux computer to accept incoming data
and voice interfaces.

(The assigned-spans.conf file has nothing in it but comments)

Long version:
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 1:
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 1: Invalid
argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
'1'
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '1' failure
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 2:
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 2: Invalid
argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
'2'
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '2' failure
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 3:
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 3: Invalid
argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
'3'
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '3' failure
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 4:
Invalid argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:12002 mkintf: Unable to open channel 4: Invalid
argument
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
ERROR[1333]: chan_dahdi.c:17367 build_channels: Unable to register channel
'4'
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:17574 process_dahdi: Channel '4' failure
ignored: ignore_failed_channels.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
'userbase' (on reload) at line 23.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
'vmsecret' (on reload) at line 31.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to
'hassip' (on reload) at line 35.
Jun 06 13:11:42 worldsys.gregandeva.net asterisk[1333]: [Jun  6 13:11:42]
WARNING[1333]: chan_dahdi.c:18883 

[asterisk-users] Fail2ban for asterisk 16 PJSIP

2019-06-06 Thread John T. Bittner
Hello

Anyone have a working copy of Fail2ban asterisk filter asterisk.conf
for Asterisk 16 running PJSIP.

I have tried 10 different filters but none of them show any matches when 
testing with
fail2ban-regex

I see date template hits but no matches

My log
[2019-06-06 15:37:20] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 50670137772977-30593645157868@192.168.1.8) - Failed to authenticate
[2019-06-06 15:37:52] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'INVITE' from '"as100" ' failed for 
'188.214.128.172:5076' (callid: 03e7f9d2dcdf4252506c440137e822b7) - No matching 
endpoint found
[2019-06-06 15:37:58] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352844365933467-383842003849650@192.168.1.8) - Failed to authenticate
[2019-06-06 15:37:58] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352844365933467-383842003849650@192.168.1.8) - Failed to authenticate
[2019-06-06 15:37:58] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352844365933467-383842003849650@192.168.1.8) - Failed to authenticate
[2019-06-06 15:37:58] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352844365933467-383842003849650@192.168.1.8) - Failed to authenticate
[2019-06-06 15:38:36] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352413680053562-322991201237060@192.168.1.8) - Failed to authenticate
[2019-06-06 15:38:36] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352413680053562-322991201237060@192.168.1.8) - Failed to authenticate
[2019-06-06 15:38:36] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352413680053562-322991201237060@192.168.1.8) - Failed to authenticate
[2019-06-06 15:38:36] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 352413680053562-322991201237060@192.168.1.8) - Failed to authenticate
[2019-06-06 15:39:14] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 211973110361898-30014604441241@192.168.1.8) - Failed to authenticate
[2019-06-06 15:39:14] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 211973110361898-30014604441241@192.168.1.8) - Failed to authenticate
[2019-06-06 15:39:14] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 211973110361898-30014604441241@192.168.1.8) - Failed to authenticate
[2019-06-06 15:39:14] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'REGISTER' from '"2405" ' failed for '71.127.239.22:65476' 
(callid: 211973110361898-30014604441241@192.168.1.8) - Failed to authenticate
[2019-06-06 15:39:17] NOTICE[18081] res_pjsip/pjsip_distributor.c: Request 
'INVITE' from '"as100" ' failed for 
'188.214.128.172:5071' (callid: 8e12f1560bfe2c3ed5be895108727c46) - No matching 
endpoint found

Any help is much appreciated.

Thanks

John Bittner
CTO
[xaccellogoemail]
380 US Highway 46, Suite 500
Totowa, NJ 07512
Phone: 201.806.2602 x2405
Fax:   201.806.2604
Cell:   973.390.1090
www.xaccel.net

CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential
and privileged information which should not be shared or forwarded. Any 
unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies of the e-mail.

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread Malcolm Davenport
Howdy,

There's a dahdi-linux-complete-3.1.0-rc1+3.1.0-rc1.tar.gz.

Try that.

On Thu, Jun 6, 2019 at 1:11 PM Greg Woods  wrote:

> Seems like I post about this about once a year, when it's time to upgrade
> Fedora.
>
> I first got this error trying to compile a patched version of
> dahdi-linux-2.11.1; I noticed that there is now a
> dahdi-linux-complete-3.0.0+3.0.0, so I tried that one with the same result.
>
> If I compile it while running kernel-4.16.8-300.fc28.x86_64, it compiles
> fine, but when I try to compile it while
> running kernel-5.0.16-100.fc28.x86_64, I get this error:
>
> CC [M]
>  
> /local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.o
> /local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.c:
> In function ‘Oct6100UserGetTime’:
> /local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.c:38:2:
> error: implicit declaration of function ‘do_gettimeofday’; did you mean
> ‘do_settimeofday64’? [-Werror=implicit-function-declaration]
>   do_gettimeofday();
>   ^~~
>   do_settimeofday64
> cc1: some warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:277:
> /local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.o]
> Error 1
> make[3]: *** [scripts/Makefile.build:492:
> /local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x]
> Error 2
> make[2]: *** [Makefile:1581:
> _module_/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi]
> Error 2
> make[2]: Leaving directory '/usr/src/kernels/5.0.16-100.fc28.x86_64'
> make[1]: *** [Makefile:74: modules] Error 2
> make[1]: Leaving directory
> '/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux'
> make: *** [Makefile:9: all] Error 2
>
> At first I thought this might be due to using a newer version of gcc that
> was being stricter about turning warnings into errors, but it compiles fine
> with the older kernel. So I tried some stupid stuff like calling
> do_gettimeofday64() instead; same error. I also tried the suggestion of
> using settimeofday64() instead; different error (argument type mismatch,
> but even if it had compiled, I wouldn't have expected that code to actually
> work).  Also tried explicitly declaring "void do_gettimeofday()" (since the
> return value isn't being used); different error.
>
> I expect this isn't a hard thing to fix, but it has been many years since
> I've done any C programming and I am quite rusty.
>
> Anyone else run into this, and have a fix?
>
> Thanks,
> --Greg
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users



-- 
--
Malcolm Davenport
Digium - a Sangoma company | Senior Product Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Tel/Fax: +1 256 428 6252
malco...@sangoma.com
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] error compiling dahdi for recent kernels

2019-06-06 Thread Greg Woods
Seems like I post about this about once a year, when it's time to upgrade
Fedora.

I first got this error trying to compile a patched version of
dahdi-linux-2.11.1; I noticed that there is now a
dahdi-linux-complete-3.0.0+3.0.0, so I tried that one with the same result.

If I compile it while running kernel-4.16.8-300.fc28.x86_64, it compiles
fine, but when I try to compile it while
running kernel-5.0.16-100.fc28.x86_64, I get this error:

CC [M]
 
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.o
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.c:
In function ‘Oct6100UserGetTime’:
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.c:38:2:
error: implicit declaration of function ‘do_gettimeofday’; did you mean
‘do_settimeofday64’? [-Werror=implicit-function-declaration]
  do_gettimeofday();
  ^~~
  do_settimeofday64
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:277:
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x/oct612x-user.o]
Error 1
make[3]: *** [scripts/Makefile.build:492:
/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/oct612x]
Error 2
make[2]: *** [Makefile:1581:
_module_/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi]
Error 2
make[2]: Leaving directory '/usr/src/kernels/5.0.16-100.fc28.x86_64'
make[1]: *** [Makefile:74: modules] Error 2
make[1]: Leaving directory
'/local/src/dahdi/dahdi-linux-complete-3.0.0+3.0.0/linux'
make: *** [Makefile:9: all] Error 2

At first I thought this might be due to using a newer version of gcc that
was being stricter about turning warnings into errors, but it compiles fine
with the older kernel. So I tried some stupid stuff like calling
do_gettimeofday64() instead; same error. I also tried the suggestion of
using settimeofday64() instead; different error (argument type mismatch,
but even if it had compiled, I wouldn't have expected that code to actually
work).  Also tried explicitly declaring "void do_gettimeofday()" (since the
return value isn't being used); different error.

I expect this isn't a hard thing to fix, but it has been many years since
I've done any C programming and I am quite rusty.

Anyone else run into this, and have a fix?

Thanks,
--Greg
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] RHS of the To: address in MESSAGE transactions

2019-06-06 Thread Brian J. Murrell
I'm trying to use linphone-android with asterisk but there is an aspect
of the way asterisk and linphone-android interact with MESSAGE
transactions that is causing problems.

The linphone-android folks consider both the To: and From: address in
MESSAGE transactions when deciding which "chat" to put a received
MESSAGE into.  Every combination of To: and From: address are a
separate "chat" in their messaging paradigm.

So when asterisk sends a MESSAGE transaction such as:

MESSAGE 
sip:my_sip_account@[2001:123:ab:123:51e2:cc83:ae66:8c70]:38915;transport=udp;app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1
 SIP/2.0
Via: SIP/2.0/UDP 
[2001:123:ab:123::2]:5060;rport;branch=z9hG4bKPj138c026c-4437-4b59-982f-f991521d3cdc
From: "5565551212" 
;tag=5b5fe395-ff22-44fa-aa6b-7f770f8e0026
To: 

Contact: 
Call-ID: 5e4fc686-72ce-4c20-bd2f-7f82e232a9db
CSeq: 29808 MESSAGE
Max-Forwards: 70
User-Agent: Asterisk PBX 13.26.0
Content-Type: text/plain
Content-Length: 4

hey!

it files it into the chat for the combination of:

From: "5565551212" 
;tag=5b5fe395-ff22-44fa-aa6b-7f770f8e0026
To: 


and because the To: includes the IP address of the client, every time
the client moves networks (or even regenerates a new "Privacy
Extensions" IPv6 address) a new chat is created for the same sender.

Their position is that the RHS of the To: should be the name of the
Asterisk machine such as:

To: 


While that seems odd to me, from a common-sense perspective, I don't
have a deep enough background in the SIP protocol to decide if it's
wrong or not, and if it's not, how to make Asterisk do it, as in
something similar to the pjsip from_domain endpoint parameter that can
be used to set the domain of the From: header for MESSAGEs to that
endpoint.

Any opinions, ideas or otherwise?  Is the position of what should be in
the RHS of the To: address even valid or MUST it always be the address
of the next hop on path to delivering the MESSAGE?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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