Re: [asterisk-users] Asterisk and CentOS 8

2020-05-03 Thread Patrick Wakano
Hello George,
Hope this finds you well!
I wonder if there has been any progress on this matter?

I've been working to have Asterisk running on CentOS 8 and our jump from
CentOS 6 to 8 doesn't look too bad The missing packages found are:
gmime-devel, iksemel-devel, corosynclib-devel, libresample-devel, hoard and
python-devel. Python-devel could be replaced by python2-devel or
python3-devel (python36-devel), but I am not sure if there is any python
incompatibility... gmime-devel, iksemel-devel and hoard seems of no use
(and they were already missing for CentOS 6 too), so only corosynclib (if
you are using it) and libresample may be a problem Does anyone knows
what is the use of libresample-devel package?

Just to share the experience so far, to build Asterisk it is needed to
install the epel-release and enable PowerTools. By ignoring the missing
packages, the compilation works and we can start Asterisk. My only concern
was about the libresample-devel because in the past I think its absence
caused issues when loading/starting pjsip modules, but it didn't happen
this time (but I am not using pjsip, I just loaded it with the sample
config files)
Following on and making Asterisk a systemd service instead of using init.d,
I first checked the service file under contrib/systemd but it seems to
serve a different purpose, so it could not be used. Instead a very simple
one does the job. Just make sure your exec cmd does not have the '-c'
option (used in safe_asterisk), because this was causing me a 100% CPU
usage (related to this:
https://unix.stackexchange.com/questions/191621/systemd-service-using-100-of-my-cpu-when-it-doesnt-if-i-start-it-without-syste/368037#368037
)
Be aware that SELinux may cause permissions and access problems when
running as systemd service It took me a whole day to figure out that
under our configuration (that have included files outside the /etc/asterisk
folder) the "problem" was SELinux.
Finally, configure firewalld to allow the SIP and RTP ports and you should
be ready to go.
Also, we are using rpmbuild to create an Asterisk package. rpmbuild (or new
red hat policies) is more strict and now complains about the python
shebangs that do not have a version (files contrib/script/ref*.py -> what
is this used for??). When using the DONT_OPTMIZE flag the compiler warns
for every single file saying, so it is quite annoying but does not to cause
issues:
/usr/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Wcpp].
Anyway, these problems do not happen if you manually build with the simple
configure and make commands.

Cheers,
Patrick Wakano

On Fri, 18 Oct 2019 at 11:54, Carlos Chavez  wrote:

> They only problem I have found so far is while trying to install
> Alembic for SQLAlchemy (for realtime configs).  Those are the only packages
> that I cannot get working properly.  Vanilla Asterisk works fine  with the
> only extra package needed being libedit-devel that is not included in any
> "official" repo.  You need to download the Fedora Core 29 packages to in
> order to successfully compile Asterisk.  That being said, I would not
> recommend trying to put this in production any time soon.
> On 10/17/2019 11:19 AM, George Joseph wrote:
>
> At the current time, we do not recommend attempting to build Asterisk on
> CentOS 8.  Many packages Asterisk uses are not yet available and would
> require building from their sources.  The Asterisk packages are also not
> available in the EPEL 8 or CentOS 8 repositories yet for the same reason.
>
> We'll update you when we think it's safe.
>
>
> --
> *George Joseph*
> Digium - A Sangoma Company | Software Developer | Software Engineering
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> direct/fax: +1 256 428 6012
> Check us out at: https://digium.com ยท https://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
-- 
_
-- 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] Better way of streaming radio than "musiconhold" for Asterisk 17.4 ?

2020-05-03 Thread Jonathan H
Way back in 2016 the only way to allow callers to listen in to a stream "at
will" was to do the following:

moh.conf

[radio]
mode=custom
application=/usr/bin/mplayer https://example.com/stream.mp3 -quiet -ao
pcm:file=/dev/stdout -af volume=5,resample=8000,channels=1,format=alaw

extensions.conf

exten => radio,1,Verbose(1, Entered radio context)
  same  => n,Set(VOLUME(TX)=1)
  same  => n,WaitExten(27006,m(radio))
  same  => n,Goto(#,1)

It kind of works, but two problems here:
It's pulling data 24x7, giving the radio host artificial stats - all rather
needless as maybe one or two people might listen for 10 mins each in a day.
And even though mplayer seems to stay up and running all the time,
sometimes Asterisk will stop listening on that pipe and everything needs a
restart (random, less than once a week).

Is there a more modern/sensible way of achieving the same, just ensuring
that stream plays if someone listens, isn't playing when no-one is
listening, and listening can be exited with a specified key?

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