Re: [asterisk-users] Patch to remove numbers from the logs

2021-07-21 Thread Patrick Wakano
If you need something quick you could create a batch script with sed or awk
to remove the log lines you want and attach it to the prerotate script of
logrotate (in case you use any of these in your env). Certainly this is not
a final solution but it is already something that doesn't depend on an
asterisk patch.

On Sat, 10 Jul 2021 at 01:13, Dovid Bender  wrote:

>
>
> On Fri, Jul 9, 2021 at 10:49 AM George Joseph  wrote:
>
>>
>>
>> On Thu, Jul 8, 2021 at 3:58 PM Dovid Bender  wrote:
>>
>>> Hi,
>>>
>>> We have a project where people will be making payments over the phone. I
>>> would like block Asterisk from logging any time the system is processing a
>>> card. So be it SayDigits(123456789), when the user enters DTMF or when I
>>> pass a card number as a variable to an AGI etc. I assume this affects
>>> others and I would like to have the patch created in a way that a. will be
>>> accepted by Sangoma and b. will work for anyone else that has this issue.
>>>
>>
>> Are you talking strictly about normal messages generated by the dialplan
>> or all messages, even warnings, errors, etc generated internally?
>>
>> Mainly verbose messages (so no warnings, errors etc.)
>
>>
>>
>>> My idea was to have a channel variable
>>> for exampleSet(CHANNEL(LOG_DIGITS)=OFF) and then have ast_logger check to
>>> see if the variable is set.
>>>
>>
>> Would you need to do this on a channel-by-channel basis or could you set
>> a global variable?
>>
> Because we would want to enable and disable it. Meaning we want all the
> logging on in general however at certain times where there is sensitive
> information we would not want it logged
>
>>
>>
>>> The problem I faced that wherever the logger is called a string is
>>> passed. So any digits (e.g. channel ID, thread ID etc.) would have the
>>> digits removed which I assume would hurt people. My solution was to have a
>>> configuration file where you would put in regex strings that we would
>>> replace. For instance if I set LOG_DIGITS=OFF and in the Dialplan I had
>>> CARD=4111
>>> EXP_MOTH=12
>>> EXP_YEAR=2025
>>>
>>
>> Are those variables set on the channel?
>>
> Yes they are. For instance Exten => _XX,1,Set(Month=${EXTEN})
>
>>
>>
>>>
>>> In the configuration file I would have
>>> CARD=([0-9]{15,16})
>>> EXP_MONTH=([1-2]?[0-9])
>>> EXP_YEAR=(202[5-9])
>>>
>>
>> I'd skip the config file and  make teh regexes global dialplan variables.
>>
> But then how would you have multiple? Have the strings comma delimited or
> one large string (e.g.
>  CARD=([0-9]{15,16})|EXP_MONTH=([1-2]?[0-9])|EXP_YEAR=(202[5-9])). One
> possible is the limit of a line in Asterisk if I recall correctly, was 256
> characters.
>
>>
>>
>>> The system would then look for any of the above expressions and then
>>> replace the numbers with an X. Does that seem like a patch that would get
>>> accepted? is that completely in left field? Any thoughts on a better way of
>>> doing it? I know I can change the verbosity to 0 but then I would get
>>> nothing at all in the logs.
>>>
>>> TIA.
>>>
>>> Dovid
>>>
>>> --
>>> _
>>> -- 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
>
> --
> _
> -- 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

Re: [asterisk-users] Asterisk and CentOS 8

2020-12-09 Thread Patrick Wakano
In case anyone out there is working with CentOS, you might reconsider that
decision: https://blog.centos.org/2020/12/future-is-centos-stream/


On Mon, 11 May 2020 at 23:53, George Joseph  wrote:

>
>
> On Sun, May 3, 2020 at 6:07 PM Patrick Wakano  wrote:
>
>> Hello George,
>> Hope this finds you well!
>> I wonder if there has been any progress on this matter?
>>
>
> Sorry, I missed this last week.   We have an internal issue open to
> revisit CentOS 8 and it's at the top of our backlog right now so we should
> have something in the next few weeks.
>
> Thanks for sharing your experience!
>
>
>>
>> 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 

Re: [asterisk-users] Exceptionally long queue length queuing

2020-07-22 Thread Patrick Wakano
Hello list,
Hope you are all doing well!

Sorry for the long email but I tried to explain all I've seen regarding
this issue I am going to open a ticket for this issue but I found it
useful to already explain it here.

I've also recently faced this "Exceptionally long queue length queuing"
error in some servers running 16.8.0 and after A LOT of investigation, I've
discovered what is causing it in my case (not sure if is the same case as
initially reported by Dovid)
So, what I discovered is that in case the diaplan has a Wait() and during
this wait period many "deferrable frames" are received, the final piece of
the Wait function (ast_safe_sleep_conditional) can throw the "Exceptionally
long queue length queuing" error message.
It is not really common to get a lot of "deferrable frames" (see
ast_is_deferrable_frame) but we can have that by simply putting on hold and
off hold while the channel is on "wait".
My production case is a little more complex and happens while on Wait and
with the AST_CONTROL_SRCCHANGE event. This happens when an old Asterisk
13.13.0 receives a hold REINVITE and starts a new RTP stream (with
different SSRC) towards some other victim Asterisk with the Music on Hold
while still sending the original caller RTP (so at this point 2 RTP streams
with different SSRCs are sent to the destination that happens to be a
channel currently on Wait). I could not find any ticket for such bug, but
version 16.8.0 does not have this problem and instead seems to inject the
Music on Hold in the existing RTP stream so there aren't 2 streams at the
same time to the same destination. The problem with 2 streams is that each
RTP package of the new stream generates a source change frame
(AST_CONTROL_SRCCHANGE), and at 50pps this builds up a lot of events fast
and so if the Wait is high the issue pops up (I agree having a channel on
Wait for too long is not a good practice but noone is perfect...). Also if
multiple channels are facing this situation then the problem just escalates
very bad.
When the "Exceptionally long queue length queuing" is happening all AMI
commands seem to fail, BYE messages seem to be missed/delayed, internal
timeouts expire and all sort of weird things happen to all channels in the
server, apparently the whole Asterisk process gets locked in this loop
affecting everything else... and this is what makes this issue really bad
because Asterisk can become completely unresponsive while the error message
is happening... if it only could throw the error and keep working fine I
guess it would be reasonable leaving it up to the dialplan logic to avoid a
long Wait()
Anyway, to replicate the issue is enough a simple dialplan like this:
exten => ,1,Answer()
same => n,Wait(30)
same => n,NoOp(After wait)
same => n,Playback(goodbye)
same => n,Hangup()
After calling in and while in the Wait(30), repeatedly press Hold/Unhold in
the telephone (with Linphone just press the hold once and then press and
hold the spacebar which will repeatedly do the hold and unhold several
times). After Wait is finished the "Exceptionally long queue length
queuing" will show up but gets resolved very fast just because I think
there weren't enough frames queued to really freeze Asterisk for too long.

Thank you,
Kind regards,
Patrick Wakano

On Fri, 3 Jul 2020 at 19:29, Joshua C. Colp  wrote:

> On Fri, Jul 3, 2020 at 3:32 AM Dovid Bender  wrote:
>
>>
>>
>> On Mon, Jun 29, 2020 at 6:46 AM Joshua C. Colp  wrote:
>>
>>> On Sun, Jun 28, 2020 at 2:26 PM Dovid Bender 
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> We have a box up and we are starting to see a lot of "Exceptionally
>>>> long queue length queuing" in the logs. From all the research so far it
>>>> seems like this leads to their systems crashing and being unreachable. In
>>>> our case the box remains up and takes calls. We are running Asterisk
>>>> 16.6.1. We are using MusicOnHold to play online music streams via ffmpeg.
>>>> Any idea on how to troubleshoot this further to see why this is happening?
>>>>
>>>
>>> The message occurs when either a channel is deadlocked or the processing
>>> time to handle what a channel is doing is substantial, and things build up.
>>> Getting a backtrace[1] at the time it occurs will show what the system is
>>> actually doing and can provide insight into what is causing it.
>>>
>>> [1]
>>> https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace#GettingaBacktrace-Runningast_coredumperfordeadlocks,taskprocessorbackups,etc
>>> .
>>>
>>> --
>>>
>> I ended up re-writing my code to use less Local channels and most of the
>> errors went away. I also noticed that

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

Re: [asterisk-users] pjsip startup errors when using "with-ssl" configure option

2020-02-25 Thread Patrick Wakano
That makes sense Kevin!
Thanks for the explanation, I will create a ticket for this then!

Kinds regards,
Patrick Wakano

On Wed, 26 Feb 2020 at 09:33, Kevin Harwell  wrote:

> On Tue, Feb 25, 2020 at 4:02 PM Patrick Wakano  wrote:
>
>> Hi Kevin!
>> Thanks very much for your reply! Much appreciated!
>>
>
> You're welcome!
>
>
>> So I just have a remaining question from this, if the with-ssl is not
>> mandatory to have the encryption support, what is it actually used for?
>>
>
> In Asterisk is allows you to set a path to the openssl files. Typically
> used if your install of openssl is in a non-default alternative location.
> For example:
>
> --with-ssl=/path/to/ssl_files
>
> I'm not really sure how Asterisk accepts the parameter without a file path
> specified. My guess is it either uses the default path, or potentially sets
> some flag meaning ssl is required.
>
>
>> Maybe it is some old flag which is not needed anymore and so can be
>> ignored for now and possibly removed from the configure/makefile stuff for
>> future releases?
>>
>>
> See above. The flag is still needed in Asterisk. However, the setting
> appears to propagate in some way into the bundled pjproject configuration.
> This is in some way affecting the build of pjproject, then subsequently
> causing res_pjsip in Asterisk to not load at runtime. Further investigation
> is required as to why though.
>
> --
> Kevin Harwell
> Software Developer
> Sangoma Technologies
> Check us out at: https://sangoma.com & https://asterisk.org
> --
> _
> -- 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

Re: [asterisk-users] pjsip startup errors when using "with-ssl" configure option

2020-02-25 Thread Patrick Wakano
Hi Kevin!
Thanks very much for your reply! Much appreciated!
So I just have a remaining question from this, if the with-ssl is not
mandatory to have the encryption support, what is it actually used for?
Maybe it is some old flag which is not needed anymore and so can be ignored
for now and possibly removed from the configure/makefile stuff for future
releases?

Kind regards,
Patrick Wakano

On Wed, 26 Feb 2020 at 06:33, Kevin Harwell  wrote:

> On Thu, Feb 20, 2020 at 9:38 PM Patrick Wakano  wrote:
>
>> Hello list,
>> Hope you are all doing well!
>>
>> I am facing a problem when compiling Asterisk 16.8.0 in a CentOS 6 box
>> and I wonder if someone can put some light on it.
>> Log history short, install_prereq fails to install the packages (not sure
>> how important they actually are): speexdsp-devel, gmime-devel,
>> uriparser-devel, iksemel-devel, uw-imap-devel, hoard
>> Then, I am running the following commands to build Asterisk:
>> ./configure --with-crypto --with-srtp --with-ssl
>> make menuselect.makeopts
>> menuselect/menuselect --enable DONT_OPTIMIZE --enable BETTER_BACKTRACES
>> --enable MALLOC_DEBUG --disable BUILD_NATIVE --enable app_macro
>> menuselect.makeopt
>> make OPT=-fPIC
>> make install
>> make samples
>>
>> After this, when I start Asterisk, I get the following error with pjsip
>> modules:
>> ERROR[6253]: loader.c:2396 load_modules: Error loading module
>> 'chan_pjsip.so': /usr/lib/asterisk/modules/chan_pjsip.so: undefined symbol:
>> ast_sip_cli_traverse_objects
>> ERROR[6253]: loader.c:2396 load_modules: Error loading module
>> 'res_pjsip.so': /usr/lib/asterisk/modules/res_pjsip.so: undefined symbol:
>> pjsip_tls_transport_start2
>> ERROR[6253]: loader.c:2396 load_modules: Error loading module
>> 'res_pjsip_config_wizard.so':
>> /usr/lib/asterisk/modules/res_pjsip_config_wizard.so: undefined symbol:
>> ast_sip_get_sorcery
>>
>> After a lot of investigation I found this post (
>> https://asteriskfaqs.org/2018/09/25/asterisk-users/asterisk-1561-symbol-pjsip_tls_transport_start2-not-found.html)
>> which pointed me to the with-ssl parameter.
>> So if I run all previous commands, but remove the "--with-ssl" options
>> from the configure, then I don't have the pjsip errors when I start
>> Asterisk.
>>
>> My first question is, what will be the impact of removing the --with-ssl
>> option? Will TLS and WSS still be possible?
>>
>
> If Asterisk is able to autodetect, and find the appropriate encryption
> libraries then yes TLS and WSS should be available. I do not use those
> options when building and am able to still make secure calls.
>
>
>> I didn't have time to test these things, however I did compared the
>> configure and make outputs and the only difference are below, so looks like
>> nothing extra gets compiled when the with-ssl is used...
>> With --with-ssl:
>> [pjproject]  Configuring with *--enable-ssl *--prefix=/opt/pjproject
>> --disable-speex-codec --disable-speex-aec --disable-bcg729
>> --disable-gsm-codec --disable-ilbc-codec --disable-l16-codec
>> --disable-g722-codec --disable-g7221-codec --disable-opencore-amr
>> --disable-silk --disable-opus --disable-video --disable-v4l2
>> --disable-sound --disable-ext-sound --disable-sdl --disable-libyuv
>> --disable-ffmpeg --disable-openh264 --disable-ipp --disable-libwebrtc
>> --without-external-pa --without-external-srtp --disable-resample
>> --disable-g711-codec --enable-epoll
>> checking for mandatory modules:  PJPROJECT CRYPTO SRTP *OPENSSL*... ok
>> Without --with-ssl:
>> [pjproject]  Configuring with --prefix=/opt/pjproject
>> --disable-speex-codec --disable-speex-aec --disable-bcg729
>> --disable-gsm-codec --disable-ilbc-codec --disable-l16-codec
>> --disable-g722-codec --disable-g7221-codec --disable-opencore-amr
>> --disable-silk --disable-opus --disable-video --disable-v4l2
>> --disable-sound --disable-ext-sound --disable-sdl --disable-libyuv
>> --disable-ffmpeg --disable-openh264 --disable-ipp --disable-libwebrtc
>> --without-external-pa --without-external-srtp --disable-resample
>> --disable-g711-codec --enable-epoll
>> checking for mandatory modules:  PJPROJECT CRYPTO SRTP... ok
>>
>> Also, why am I having the pjsip startup errors when the --with-ssl is
>> used? I could not find a clear explanation for this problem and how to fix
>> it
>>
>
> There appears to be a bug here. I configured, built, and ran with the same
> options mentioned (--with-ssl, etc...) and received similar pjsip module
> load errors. Please file a bug report on the Asterisk issue

[asterisk-users] pjsip startup errors when using "with-ssl" configure option

2020-02-20 Thread Patrick Wakano
Hello list,
Hope you are all doing well!

I am facing a problem when compiling Asterisk 16.8.0 in a CentOS 6 box and
I wonder if someone can put some light on it.
Log history short, install_prereq fails to install the packages (not sure
how important they actually are): speexdsp-devel, gmime-devel,
uriparser-devel, iksemel-devel, uw-imap-devel, hoard
Then, I am running the following commands to build Asterisk:
./configure --with-crypto --with-srtp --with-ssl
make menuselect.makeopts
menuselect/menuselect --enable DONT_OPTIMIZE --enable BETTER_BACKTRACES
--enable MALLOC_DEBUG --disable BUILD_NATIVE --enable app_macro
menuselect.makeopt
make OPT=-fPIC
make install
make samples

After this, when I start Asterisk, I get the following error with pjsip
modules:
ERROR[6253]: loader.c:2396 load_modules: Error loading module
'chan_pjsip.so': /usr/lib/asterisk/modules/chan_pjsip.so: undefined symbol:
ast_sip_cli_traverse_objects
ERROR[6253]: loader.c:2396 load_modules: Error loading module
'res_pjsip.so': /usr/lib/asterisk/modules/res_pjsip.so: undefined symbol:
pjsip_tls_transport_start2
ERROR[6253]: loader.c:2396 load_modules: Error loading module
'res_pjsip_config_wizard.so':
/usr/lib/asterisk/modules/res_pjsip_config_wizard.so: undefined symbol:
ast_sip_get_sorcery

After a lot of investigation I found this post (
https://asteriskfaqs.org/2018/09/25/asterisk-users/asterisk-1561-symbol-pjsip_tls_transport_start2-not-found.html)
which pointed me to the with-ssl parameter.
So if I run all previous commands, but remove the "--with-ssl" options from
the configure, then I don't have the pjsip errors when I start Asterisk.

My first question is, what will be the impact of removing the --with-ssl
option? Will TLS and WSS still be possible? I didn't have time to test
these things, however I did compared the configure and make outputs and the
only difference are below, so looks like nothing extra gets compiled when
the with-ssl is used...
With --with-ssl:
[pjproject]  Configuring with *--enable-ssl *--prefix=/opt/pjproject
--disable-speex-codec --disable-speex-aec --disable-bcg729
--disable-gsm-codec --disable-ilbc-codec --disable-l16-codec
--disable-g722-codec --disable-g7221-codec --disable-opencore-amr
--disable-silk --disable-opus --disable-video --disable-v4l2
--disable-sound --disable-ext-sound --disable-sdl --disable-libyuv
--disable-ffmpeg --disable-openh264 --disable-ipp --disable-libwebrtc
--without-external-pa --without-external-srtp --disable-resample
--disable-g711-codec --enable-epoll
checking for mandatory modules:  PJPROJECT CRYPTO SRTP *OPENSSL*... ok
Without --with-ssl:
[pjproject]  Configuring with --prefix=/opt/pjproject --disable-speex-codec
--disable-speex-aec --disable-bcg729 --disable-gsm-codec
--disable-ilbc-codec --disable-l16-codec --disable-g722-codec
--disable-g7221-codec --disable-opencore-amr --disable-silk --disable-opus
--disable-video --disable-v4l2 --disable-sound --disable-ext-sound
--disable-sdl --disable-libyuv --disable-ffmpeg --disable-openh264
--disable-ipp --disable-libwebrtc --without-external-pa
--without-external-srtp --disable-resample --disable-g711-codec
--enable-epoll
checking for mandatory modules:  PJPROJECT CRYPTO SRTP... ok

Also, why am I having the pjsip startup errors when the --with-ssl is used?
I could not find a clear explanation for this problem and how to fix it

Any idea is much appreciated!
Thank you,
Kind regards,
Patrick Wakano
-- 
_
-- 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] Audit AMI actions commands

2018-11-22 Thread Patrick Wakano
Hello list,
Hope you all doing well!

I've been after a way to log every AMI action received by Asterisk. Does
anyone knows if Asterisk itself have this facility? I could not find
anything related. Or does someone have any idea on how I could achieve
that?
My Asterisk has some applications connected via AMI and I want it logging
all the actions (and the details of these actions) it was asked to do.
Any idea is much appreciated!

Thanks,
Kind regards,
Patrick Wakano
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] How best to run a SIPp test on a remote host

2018-10-22 Thread Patrick Wakano
I've never worked with fabric nor pysipp, but if you want to run sipp in
background so you can log out from your remote server and leave the test
running, I suggest you can use screen. It works well for me.
Patrick Wakano

On Sat, 20 Oct. 2018, 01:55 Olivier,  wrote:

> Hello,
>
> I'm curently setting a lab environment for load testing an Asterisk
> instance.
>
> This environment includes:
> - a management workstation where I would like to run scripts and  store
> test reports
> - a box hosting SIPp
> - the Asterisk box I'm load testing (System Under Test)
> - an other Asterisk box that simply anwers and echoes incoming media
>
> The SIPp commande I'm currently using looks like:
> sipp -bg -nostdin  -trace_screen -screen_file
> /home/foobar/reports.d/campaign_123456789_1_1.txt -sf
> /home/foobar/custom_with_10_minutes_audio.xml 3.4.49.3 -i 3.4.58.206 -s
> 123456789 -r 1 -m 1 -d 6
>
> Explainations:
> - Run in background mode (more on that later)
> - Last SIPp screen with successful/failed call counters saved in a file
> - SIPp reads a 10 minutes audio file and stops reading after 6 ms (see
> -d parameter)
> - Media comes from SIPs, pass though System Under Test and then comes back
>
> 1. How can you run such "sipp -bg ..." command from management workstation
> on remote SIPp box ?
> I tried using Fabric (I'm discovering) but it always fails with a 99 exit
> code, as if SIPp/Fabric required a different options set.
>
> 2. This project pysipp [1] seems interesting.
> Has anyone tried it ?
> How can you get started ?
>
> 3. Suggestions ?
>
> Best regards
>
> [1] https://github.com/SIPp/pysipp
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Astricon is coming up October 9-11!  Signup is available at:
> https://www.asterisk.org/community/astricon-user-conference
>
> 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 --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] AGI timeout option

2018-09-17 Thread Patrick Wakano
Thanks everyone for the answers!
I did explored some options at the PHP level and probably will do something
in this direction, but in fact what I was really looking was something in
the Asterisk side, not in the script side.
Because in my opinion regardless of the language or AGI type, Asterisk
itself should be able to timeout a long running script and return to the
dialplan. However looks like there is nothing of this sort.

Kind regards,
Patrick Wakano

On Sat, 15 Sep 2018 at 03:56, Eric Wieling  wrote:

> I don't know AGIspeedy, but I have some PHP scripts where I set a
> connect timeout using streams.
>
> Example using https, but should be easily adaptable to non-s http.:
>
> $pbxsh_bin = @file_get_contents("https://blah.blah.blah;, FALSE,
> @stream_context_create(array('https' => array('timeout' => 5,
> "verify_peer"=>false, "verify_peer_name"=>false;
>
> On 09/14/2018 01:40 PM, Carlos Chavez wrote:
> > On 9/13/2018 8:04 PM, Patrick Wakano wrote:
> >
> >> Hello list,
> >> Hope you all doing  well!
> >>
> >> Recently, I had an issue with a FastAGI PHP script, which under some
> >> specific situation would run into an infinity loop, consuming all CPU
> >> resources. This also was preventing Asterisk to terminated the call
> >> properly because it was waiting for the AGI to return... The
> >> application uses AGIspeedy to process the AGI calls, not sure if this
> >> can be affecting this situation somehow
> >> Due to this problem I started looking for some option to timeout the
> >> AGI call and return to the dialplan after XYZ seconds and so this
> >> would protect Asterisk preventing the dialplan to get stuck due to
> >> some external script problem that is actually outside of Asterisk
> >> control. Does Asterisk provide some control of this sort? I searched
> >> around and could not find any.
> >> Any idea is appreciated!
> >>
> >> Kind regards
> >> Patrick Wakano
> >>
> >
> > I think this is what you may be looking for:
> >
> > http://php.net/manual/en/function.set-time-limit.php
> >
>
> --
> http://help.nyigc.net/
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Astricon is coming up October 9-11!  Signup is available at:
> https://www.asterisk.org/community/astricon-user-conference
>
> 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 --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] AGI timeout option

2018-09-13 Thread Patrick Wakano
Hello list,
Hope you all doing  well!

Recently, I had an issue with a FastAGI PHP script, which under some
specific situation would run into an infinity loop, consuming all CPU
resources. This also was preventing Asterisk to terminated the call
properly because it was waiting for the AGI to return... The application
uses AGIspeedy to process the AGI calls, not sure if this can be affecting
this situation somehow
Due to this problem I started looking for some option to timeout the AGI
call and return to the dialplan after XYZ seconds and so this would protect
Asterisk preventing the dialplan to get stuck due to some external script
problem that is actually outside of Asterisk control. Does Asterisk provide
some control of this sort? I searched around and could not find any.
Any idea is appreciated!

Kind regards
Patrick Wakano
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] 400 reply to INVITE not properly treated

2018-08-01 Thread Patrick Wakano
Hello list,
Hope you all doing fine!!

I am using chan_sip of Asterisk 13.6.0 and eventually I have a carrier
which replies with 400 to some INVITES which happen to timeout
I know the SIP reply code is not correct, but anyway I want to understand
what is happening, because I think it is a bug
In this situation, Asterisk is not failing the Dial, but sends back an ACK.
Given the carrier has previously sent a 180, Asterisk just lets the user
ringing forever Because the Dial() doesn't fail in this case, the user
must hangup to terminate the call
So question is, is this a known behaviour? I could not find anything
related
In my opinion, Asterisk should at fail the Dial and proceed with whatever
was configured in the dialplan I tried some other 4XX SIP codes, but
the only one I found not behaving properly is the 400 one

Thanks,
Kind regards,
Patrick Wakano
-- 
_
-- 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] How to steal an answered call?

2018-07-09 Thread Patrick Wakano
By the way, bear in mind this is exactly what a blind transfer from B to C
would do, but with a lot of more work

On Mon, 9 Jul. 2018, 16:36 Patrick Wakano,  wrote:

> Not sure how elegant this is, but I think you can try to elaborate some
> logic that when phone C dials something, it would retrieve you the channel
> phone A is connected and use the Bridge application to force the connection
> of phone C to phone A. So you need first to save the channels you have
> connected in a call, later on read this info based on whatever the phone C
> has dialed in and just use this as parameter to the Bridge app. When this
> happens channel C gets connected to channel A and channel B should
> automatically get disconnected (or maybe continue your dialplan execution).
>
> On Mon, 9 Jul 2018 at 13:17, David Cunningham 
> wrote:
>
>> Hello,
>>
>> I'm familiar with Pickup/PickupChan for taking a ringing call, but does
>> anyone know how a phone can "steal" an already answered call from another
>> phone? Our users have decided that call parking is too long-winded and
>> don't want to use that.
>>
>> For example: phone A calls phone B, phone B answers the call, phone C
>> dials something to "steal" the call from B, and finally A and C are talking.
>>
>> Searching on voip-info.org shows a "BristuffSteal" command but it's very
>> out of date (Asterisk 1.2).
>>
>> Thanks in advance for any suggestions.
>>
>> Kind regards,
>>
>> --
>> 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
>
>
-- 
_
-- 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] How to steal an answered call?

2018-07-09 Thread Patrick Wakano
Not sure how elegant this is, but I think you can try to elaborate some
logic that when phone C dials something, it would retrieve you the channel
phone A is connected and use the Bridge application to force the connection
of phone C to phone A. So you need first to save the channels you have
connected in a call, later on read this info based on whatever the phone C
has dialed in and just use this as parameter to the Bridge app. When this
happens channel C gets connected to channel A and channel B should
automatically get disconnected (or maybe continue your dialplan execution).

On Mon, 9 Jul 2018 at 13:17, David Cunningham 
wrote:

> Hello,
>
> I'm familiar with Pickup/PickupChan for taking a ringing call, but does
> anyone know how a phone can "steal" an already answered call from another
> phone? Our users have decided that call parking is too long-winded and
> don't want to use that.
>
> For example: phone A calls phone B, phone B answers the call, phone C
> dials something to "steal" the call from B, and finally A and C are talking.
>
> Searching on voip-info.org shows a "BristuffSteal" command but it's very
> out of date (Asterisk 1.2).
>
> Thanks in advance for any suggestions.
>
> Kind regards,
>
> --
> 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
-- 
_
-- 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] MixMonitor multiple times to the same file

2018-07-08 Thread Patrick Wakano
Hello list,
Hope you are all doing fine!

While playing around with the MixMonitor, I've found out that it is
possible to start the MixMonitor multiple times to the same output file.
It is very easy to reproduce, via the CLI or via the dialplan. If the
MixMonitor is called twice from the same channel, to the same output file
and with option append. After that, with the "mixmonitor list" command we
can see two running instances, and also from Linux open files "lsof" we can
see two Asterisk process with the same file opened. Nevertheless, in this
case the file does not gets corrupted and the recording is completely fine.
However after observing such behavior I decided to call MixMonitor twice to
the same file but from different channels. The observed behavior is that
the output file has the contents of the first call until the second
MixMonitor command is called for the second call. After that only the
second call is recorded. If this is stopped, the first call is recorded
again.
I know we can consider an application/dialplan error to call MixMonitor
twice for the same output file like this, but I am just curious to know if
this situation is actually being handled by the Asterisk/MixMonitor code or
if it is completely undefined behavior, since the behavior I described  is
actually consistent.
Anyway, to avoid confusion and weird behavior, I think it would be probably
better if Asterisk just not allow creating a MixMonitor thread to a file
that is already opened by some other MixMonitor thread. Or is there any
reason/situation in which this is not desired?

Kind regards,
Cheers,
Patrick Wakano
-- 
_
-- 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] MixMonitor and ChanSpy whisper

2018-07-05 Thread Patrick Wakano
Thanks for the reply Joshua!
I did look the code, but it's too complicated for my old C knowledge :(
So I guess I am left with the Monitor app Also a ConfBridge would also
work instead of ChanSpy with whisper

Cheers,
Patrick Wakano

On 6 July 2018 at 08:51, Joshua Colp  wrote:

> On Thu, Jul 5, 2018, at 7:37 PM, Patrick Wakano wrote:
> > Hello Asterisk list,
> > Hope you are all doing well!
> >
> > We are using the MixMonitor application to record the calls and under
> some
> > situations the call can be spied using ChanSpy with whisper enabled.
> > Sometimes the spying channel is a person who can interact in the call,
> and
> > some other times it is a sound file playing a message. The problem is
> that
> > for some reason the MixMonitor does not record whatever is injected via
> > whisper in the call. It records only the call itself... I've done some
> > research and apparently the Monitor application would be able to record
> > everything (but I didn't verify it myself) Anyway why MixMonitor
> can't?
> > Also does anyone have an idea on how to record everything in the same
> file?
>
> The implementation was never written to allow this and no feature added to
> control it. Someone would need to go into the code, define what needs to
> happen and how it can be controlled, and implement it (in regards to
> MixMonitor and ChanSpy).
>
> --
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
>
> --
> _
> -- 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] MixMonitor and ChanSpy whisper

2018-07-05 Thread Patrick Wakano
Hello Asterisk list,
Hope you are all doing well!

We are using the MixMonitor application to record the calls and under some
situations the call can be spied using ChanSpy with whisper enabled.
Sometimes the spying channel is a person who can interact in the call, and
some other times it is a sound file playing a message. The problem is that
for some reason the MixMonitor does not record whatever is injected via
whisper in the call. It records only the call itself... I've done some
research and apparently the Monitor application would be able to record
everything (but I didn't verify it myself) Anyway why MixMonitor can't?
Also does anyone have an idea on how to record everything in the same file?

Thanks,
Kind regards,
Patrick Wakano
-- 
_
-- 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] MixMonitor recording when in the holding bridge

2018-06-11 Thread Patrick Wakano
Hello list,
Hope you all doing fine!

We are using the MixMonitor to record the call with the option 'b' so the
recording is done only when this call is bridged. Under some situations the
call is put on a wait state and the recording should not happen anymore
until the channel is bridged back. This used to be done with a loop using
the Wait application. Recently it was changed to use the BridgeWait, which
I believe is much more suitable for this purpose. However by using the
BridgeWait, the MixMonitor keeps recording the music on hold played to the
channel during the entire wait time... with the Wait application this
doesn't happen.
I think this happens actually because the channel is bridged to the holding
bridge, so the checks for "is bridged" passes. However, I think under a
holding bridge the recording should be avoided too. Is this something that
could be done? If not automatically maybe with some new flag

Thank you,
Kind regards,
Patrick Wakano
-- 
_
-- 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] DTMF tones in MixMonitor recording

2018-05-01 Thread Patrick Wakano
I agree! I have my SBC and asterisk servers all configured with rfc2833, so
it should be ok! No need for auto mode!
Thanks again!
Cheers
Patrick

On Tue, 1 May 2018, 20:07 Joshua Colp, <jc...@digium.com> wrote:

> On Tue, May 1, 2018, at 6:52 AM, Patrick Wakano wrote:
> > Thanks very much for the reply Joshua!
> > So I guess that setting dtmfmode=auto would be the safest choice in order
> > to strip out the DTMFs from the recording, right?
> > Cheers!
>
> It should work. Personally I prefer explicit configuring instead of having
> things just try to figure out what is in use.
>
> --
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
>
> --
> _
> -- 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

Re: [asterisk-users] DTMF tones in MixMonitor recording

2018-05-01 Thread Patrick Wakano
Thanks very much for the reply Joshua!
So I guess that setting dtmfmode=auto would be the safest choice in order
to strip out the DTMFs from the recording, right?
Cheers!
Patrick Wakano

On Tue, 1 May 2018, 19:36 Joshua Colp, <jc...@digium.com> wrote:

> On Mon, Apr 30, 2018, at 11:23 PM, Patrick Wakano wrote:
> > Hello list,
> > Hope you are all doing fine!
> >
> > I have stumbled over some piece of dialplan code in which apparently they
> > were trying to avoid recording the DTMF tones in the wav file. It is
> really
> > messy and I am not sure if this really works. So after a bit of research
> I
> > found this comment (
> > https://community.asterisk.org/t/asterisk-dtmf-record/65040) in which
> it is
> > said:
> >
> > *"Asterisk strips the DTMF from the audio stream when configured for
> > inband, so internal stuff can react to the DTMF and so the other side
> does
> > not hear the tone unless they are using inband (in which case it is
> > regenerated)"*
> > So my questions are, what are the cases in which Asterisk regenerates the
> > DTMFs? Does it cause the recording to have the tone as well, or is it
> only
> > transmitted to the other leg without being generated to the recording
> file?
> > Also, what if one or both legs are RFC2833? From my tests the RFC2833
> > events never show up in the recording, but I just want to confirm that
> this
> > is always true.
>
> If properly configured then Asterisk will always strip and regenerate the
> DTMF tone. You have to purposely misconfigure things to cause it to not get
> stripped. IE: DTMF is actually inband but you configure it for RFC2833.
> Since Asterisk wouldn't be listening to the audio stream, it would go right
> through and get recorded.
>
> --
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
>
> --
> _
> -- 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] DTMF tones in MixMonitor recording

2018-04-30 Thread Patrick Wakano
Hello list,
Hope you are all doing fine!

I have stumbled over some piece of dialplan code in which apparently they
were trying to avoid recording the DTMF tones in the wav file. It is really
messy and I am not sure if this really works. So after a bit of research I
found this comment (
https://community.asterisk.org/t/asterisk-dtmf-record/65040) in which it is
said:

*"Asterisk strips the DTMF from the audio stream when configured for
inband, so internal stuff can react to the DTMF and so the other side does
not hear the tone unless they are using inband (in which case it is
regenerated)"*
So my questions are, what are the cases in which Asterisk regenerates the
DTMFs? Does it cause the recording to have the tone as well, or is it only
transmitted to the other leg without being generated to the recording file?
Also, what if one or both legs are RFC2833? From my tests the RFC2833
events never show up in the recording, but I just want to confirm that this
is always true.

Thanks,
Kind regards,
Patrick Wakano


<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
_
-- 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] Alias for country in indications.conf

2018-04-24 Thread Patrick Wakano
Just did Tzafrir suggestion and it worked like a charm!
Thanks very much!
Cheers,
Patrick Wakano

<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On 23 April 2018 at 23:45, Patrick Wakano <pwak...@gmail.com> wrote:

> That's quite interesting Tzafrir!
> I will give it a try!
> Thank you very much for the idea!
> Cheers,
> Patrick Wakano
>
>
> On 23 April 2018 at 23:42, Tzafrir Cohen <tzafrir.co...@xorcom.com> wrote:
>
>> Also,
>>
>> On Mon, Apr 23, 2018 at 04:08:58PM +1000, Patrick Wakano wrote:
>> > Hello list,
>> > Hope you all doing fine!
>> > I've tried to use the 'alias' directive in the indications.conf file but
>> > apparently it doesn't work
>> > It looks like maybe this feature was removed, because old sample for the
>> > indications.conf file have example using the alias parameter, but newer
>> > samples don't have it anymore also I couldn't find any ticket saying
>> > this parameter was deprecated Anyway when trying to use it, it
>> doesn't
>> > work. Anyone aware of some change related to this?
>> > I am using Asterisk 13.6.0 and have this in indications.conf:
>> > [uk]
>> > *alias = gb*
>>
>> Given that aliases don't work, you can alternatively use:
>>
>> ;;;
>> [uk]
>> description=
>> ringcadence=
>> ...
>>
>> [gb](uk)
>> ;;;
>>
>> --
>>Tzafrir Cohen
>> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
>> http://www.xorcom.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

Re: [asterisk-users] Alias for country in indications.conf

2018-04-23 Thread Patrick Wakano
That's quite interesting Tzafrir!
I will give it a try!
Thank you very much for the idea!
Cheers,
Patrick Wakano


On 23 April 2018 at 23:42, Tzafrir Cohen <tzafrir.co...@xorcom.com> wrote:

> Also,
>
> On Mon, Apr 23, 2018 at 04:08:58PM +1000, Patrick Wakano wrote:
> > Hello list,
> > Hope you all doing fine!
> > I've tried to use the 'alias' directive in the indications.conf file but
> > apparently it doesn't work
> > It looks like maybe this feature was removed, because old sample for the
> > indications.conf file have example using the alias parameter, but newer
> > samples don't have it anymore also I couldn't find any ticket saying
> > this parameter was deprecated Anyway when trying to use it, it
> doesn't
> > work. Anyone aware of some change related to this?
> > I am using Asterisk 13.6.0 and have this in indications.conf:
> > [uk]
> > *alias = gb*
>
> Given that aliases don't work, you can alternatively use:
>
> ;;;
> [uk]
> description=
> ringcadence=
> ...
>
> [gb](uk)
> ;;;
>
> --
>Tzafrir Cohen
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.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

Re: [asterisk-users] Alias for country in indications.conf

2018-04-23 Thread Patrick Wakano
Hello Richard!
Thanks very much for your answer! It all makes sense.
I will just duplicated the tones config then!
Thanks again!
Cheers!
Patrick Wakano

On 23 April 2018 at 23:17, Richard Mudgett <rmudg...@digium.com> wrote:

> It looks like any support for "alias" as a tone zone alias feature was
> removed
> back in 2009 (in git commit 4ec301360cdd84be911b06cd0adda2459d66bc6e) as
> part of a code cleanup likely because alias was poorly conceived and didn't
> work.  What you have done by defining "alias" now is to define a tone event
> called alias with a tone cadence of "gb".
>
> Richard
>
> On Mon, Apr 23, 2018 at 1:08 AM, Patrick Wakano <pwak...@gmail.com> wrote:
>
>> Hello list,
>> Hope you all doing fine!
>> I've tried to use the 'alias' directive in the indications.conf file but
>> apparently it doesn't work
>> It looks like maybe this feature was removed, because old sample for the
>> indications.conf file have example using the alias parameter, but newer
>> samples don't have it anymore also I couldn't find any ticket saying
>> this parameter was deprecated Anyway when trying to use it, it doesn't
>> work. Anyone aware of some change related to this?
>> I am using Asterisk 13.6.0 and have this in indications.conf:
>> [uk]
>> *alias = gb*
>> description = United Kingdom
>> ringcadence = 400,200,400,2000
>> ; These are the official tones taken from BT SIN350. The actual tones
>> ; used by BT include some volume differences so sound slightly different
>> ; from Asterisk-generated ones.
>> dial = 350+440
>> ; Special dial is the intermittent dial tone heard when, for example,
>> ; you have a divert active on the line
>> specialdial = 350+440/750,440/750
>> ; Busy is also called "Engaged"
>> busy = 400/375,0/375
>> ; "Congestion" is the Beep-bip engaged tone
>> congestion = 400/400,0/350,400/225,0/525
>> ; "Special Congestion" is not used by BT very often if at all
>> specialcongestion = 400/200,1004/300
>> unobtainable = 400
>> ring = 400+450/400,0/200,400+450/400,0/2000
>> callwaiting = 400/100,0/4000
>> ; BT seem to use "Special Call Waiting" rather than just "Call Waiting"
>> tones
>> specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000
>> ; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT
>> claim it
>> ; is and I've not used a payphone for years)
>> creditexpired = 400/125,0/125
>> ; These two are used to confirm/reject service requests on exchanges that
>> ; don't do voice announcements.
>> confirm = 1400
>> switching = 400/200,0/400,400/2000,0/400
>> ; This is the three rising tones Doo-dah-dee "Special Information Tone",
>> ; usually followed by the BT woman saying an appropriate message.
>> info = 950/330,0/15,1400/330,0/15,1800/330,0/1000
>> ; Not listed in SIN350
>> record = 1400/500,0/6
>> stutter = 350+440/750,440/750
>>
>> The CLI shows Asterisk definitely understood the 'alias' parameter:
>> CLI> indication show uk
>> Country Indication  PlayList
>> =
>> uk 400,200,400,2000
>> *uk  alias   gb*
>> uk  dial350+440
>> uk  specialdial 350+440/750,440/750
>> uk  busy400/375,0/375
>> uk  congestion  400/400,0/350,400/225,0/525
>> uk  specialcongesti 400/200,1004/300
>> uk  unobtainable400
>> uk  ring400+450/400,0/200,400+450/400,0/2000
>> uk  callwaiting 400/100,0/4000
>> uk  specialcallwait 400/250,0/250,400/250,0/250,400/250,0/5000
>> uk  creditexpired   400/125,0/125
>> uk  confirm 1400
>> uk  switching   400/200,0/400,400/2000,0/400
>> uk  info950/330,0/15,1400/330,0/15,1800/330,0/1000
>> uk  record  1400/500,0/6
>> uk  stutter 350+440/750,440/750
>>
>> But the dialplan execution causes this:
>> ERROR[20778][C-0006]: func_channel.c:661 func_channel_write_real:
>> Unknown country code '*gb*' for tonezone. Check indications.conf for
>> available country codes.
>>
>> Any info is much appreciated!
>> Cheers,
>> Patrick Wakano
>>
>>
>> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Virus-free.
>> www.avg.com
>> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>

[asterisk-users] Alias for country in indications.conf

2018-04-23 Thread Patrick Wakano
Hello list,
Hope you all doing fine!
I've tried to use the 'alias' directive in the indications.conf file but
apparently it doesn't work
It looks like maybe this feature was removed, because old sample for the
indications.conf file have example using the alias parameter, but newer
samples don't have it anymore also I couldn't find any ticket saying
this parameter was deprecated Anyway when trying to use it, it doesn't
work. Anyone aware of some change related to this?
I am using Asterisk 13.6.0 and have this in indications.conf:
[uk]
*alias = gb*
description = United Kingdom
ringcadence = 400,200,400,2000
; These are the official tones taken from BT SIN350. The actual tones
; used by BT include some volume differences so sound slightly different
; from Asterisk-generated ones.
dial = 350+440
; Special dial is the intermittent dial tone heard when, for example,
; you have a divert active on the line
specialdial = 350+440/750,440/750
; Busy is also called "Engaged"
busy = 400/375,0/375
; "Congestion" is the Beep-bip engaged tone
congestion = 400/400,0/350,400/225,0/525
; "Special Congestion" is not used by BT very often if at all
specialcongestion = 400/200,1004/300
unobtainable = 400
ring = 400+450/400,0/200,400+450/400,0/2000
callwaiting = 400/100,0/4000
; BT seem to use "Special Call Waiting" rather than just "Call Waiting"
tones
specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000
; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim
it
; is and I've not used a payphone for years)
creditexpired = 400/125,0/125
; These two are used to confirm/reject service requests on exchanges that
; don't do voice announcements.
confirm = 1400
switching = 400/200,0/400,400/2000,0/400
; This is the three rising tones Doo-dah-dee "Special Information Tone",
; usually followed by the BT woman saying an appropriate message.
info = 950/330,0/15,1400/330,0/15,1800/330,0/1000
; Not listed in SIN350
record = 1400/500,0/6
stutter = 350+440/750,440/750

The CLI shows Asterisk definitely understood the 'alias' parameter:
CLI> indication show uk
Country Indication  PlayList
=
uk 400,200,400,2000
*uk  alias   gb*
uk  dial350+440
uk  specialdial 350+440/750,440/750
uk  busy400/375,0/375
uk  congestion  400/400,0/350,400/225,0/525
uk  specialcongesti 400/200,1004/300
uk  unobtainable400
uk  ring400+450/400,0/200,400+450/400,0/2000
uk  callwaiting 400/100,0/4000
uk  specialcallwait 400/250,0/250,400/250,0/250,400/250,0/5000
uk  creditexpired   400/125,0/125
uk  confirm 1400
uk  switching   400/200,0/400,400/2000,0/400
uk  info950/330,0/15,1400/330,0/15,1800/330,0/1000
uk  record  1400/500,0/6
uk  stutter 350+440/750,440/750

But the dialplan execution causes this:
ERROR[20778][C-0006]: func_channel.c:661 func_channel_write_real:
Unknown country code '*gb*' for tonezone. Check indications.conf for
available country codes.

Any info is much appreciated!
Cheers,
Patrick Wakano

<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
_
-- 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] DIALSTATUS vs HANGUPCAUSE

2018-03-15 Thread Patrick Wakano
That's really good info Tony!
Thanks very much for the response!
I will consider this to implement a better approach for the failed cases!

Cheers,
Patrick Wakano

On 14 March 2018 at 20:44, Tony Mountifield <t...@softins.co.uk> wrote:

> In article <CAPu3kNV8w+bYQT0W+QbnTSby0V5gfjLqZXq15c4i5enr_-
> t...@mail.gmail.com>,
> Patrick Wakano <pwak...@gmail.com> wrote:
> >
> > Thanks Dovid!
> > Indeed looks a bug but regardless of this, this problem made me think
> that
> > the HANGUPCAUSE could be used for this purpose with benefits.
> > I couldn't find an explanation about when DIALSTATUS would actually be
> > better.
> > The HANGUPCAUSE was reworked in version 11 (
> > https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't
> find
> > someone actually stating it is a better alternative or replacement to the
> > DIALSTATUS or something similar.
>
> I think you should always check DIALSTATUS, as that will be set regardless
> of
> the way in which a dial fails. I believe HANGUPCAUSE is set to the Q.931
> code
> received from PRI or SIP when a call is rejected or terminated. However,
> there
> could be other mechanisms for failure (such as failure to create a channel
> within Asterisk, or an attempt to send to an unreachable peer), that may
> set
> DIALSTATUS without setting HANGUPCAUSE.
>
> So HANGUPCAUSE should be considered as extra detail, rather than a
> replacement
> or alternative to DIALSTATUS.
>
> Cheers
> Tony
> --
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
>
> --
> _
> -- 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

Re: [asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-13 Thread Patrick Wakano
Thanks Dovid!
Indeed looks a bug but regardless of this, this problem made me think that
the HANGUPCAUSE could be used for this purpose with benefits.
I couldn't find an explanation about when DIALSTATUS would actually be
better.
The HANGUPCAUSE was reworked in version 11 (
https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't find
someone actually stating it is a better alternative or replacement to the
DIALSTATUS or something similar.

Cheers,
Patrick Wakano


On 14 March 2018 at 13:30, Dovid Bender <do...@telecurve.com> wrote:

> I would think that is a bug since the only time DIALSTATUS = BUSY is where
> you got a 486 or 600 (as per https://wiki.asterisk.org/
> wiki/display/AST/Hangup+Cause+Mappings).
>
> On Tue, Mar 13, 2018 at 10:11 PM, Patrick Wakano <pwak...@gmail.com>
> wrote:
>
>> Hello list,
>> Hope all doing well!
>>
>> I've been checking some cases when a Dial fails and dialplan execution
>> continues to handle this. I am finding it a little confusing how we should
>> handle the DIALSTATUS and the HANGUPCAUSE in this situation
>> More specifically, I am facing a case in version 13.6.0 where I am
>> getting a DIALSTATUS=BUSY and HANGUPCAUSE=19 after receiving a 480 SIP
>> error. Seems wrong to me, since 480 should be converted to HANGUPCAUSE=19
>> and DIALSTATUS = NOANSWER (https://wiki.asterisk.org/wik
>> i/display/AST/Hangup+Cause+Mappings). Anyway I am thinking about
>> actually not checking the DIALSTATUS anymore and just rely on the
>> HANGUPCAUSE, which seems more powerful.
>> Looks like for a pure SIP environment the HANGUPCAUSE would have a more
>> accurate information about the error. So question is can I always use this
>> info and completely ignore what the DIALSTATUS is?
>> Or does someone knows exactly where is more suitable to use one over the
>> other?
>>
>> Thanks,
>> Kind regards,
>> Patrick Wakano
>>
>> --
>> _
>> -- 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
>
-- 
_
-- 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] DIALSTATUS vs HANGUPCAUSE

2018-03-13 Thread Patrick Wakano
Hello list,
Hope all doing well!

I've been checking some cases when a Dial fails and dialplan execution
continues to handle this. I am finding it a little confusing how we should
handle the DIALSTATUS and the HANGUPCAUSE in this situation
More specifically, I am facing a case in version 13.6.0 where I am getting
a DIALSTATUS=BUSY and HANGUPCAUSE=19 after receiving a 480 SIP error. Seems
wrong to me, since 480 should be converted to HANGUPCAUSE=19 and DIALSTATUS
= NOANSWER (https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings).
Anyway I am thinking about actually not checking the DIALSTATUS anymore and
just rely on the HANGUPCAUSE, which seems more powerful.
Looks like for a pure SIP environment the HANGUPCAUSE would have a more
accurate information about the error. So question is can I always use this
info and completely ignore what the DIALSTATUS is?
Or does someone knows exactly where is more suitable to use one over the
other?

Thanks,
Kind regards,
Patrick Wakano
-- 
_
-- 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] Asterisk crash on core show channel

2018-02-21 Thread Patrick Wakano
Thanks for you answer Marcus,
So maybe this means some bug was fixed? Anyone aware of something related?
>From the release notes, I couldn't find any direct change that could fix
this

Thanks,
Kind regards,
Patrick Wakano

On 21 February 2018 at 20:29, Marcus Kvarsell <marcus.kvars...@fogwise.se>
wrote:

> Hello, i found upgrading to asterisk 15 helped.
>
>
>
> *Från:* asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
> boun...@lists.digium.com] *För *Patrick Wakano
> *Skickat:* den 21 februari 2018 04:29
> *Till:* Asterisk Users Mailing List - Non-Commercial Discussion <
> asterisk-users@lists.digium.com>
> *Ämne:* [asterisk-users] Asterisk crash on core show channel
>
>
>
> Hello Asterisk list,
>
> I am facing some Asterisk crashes which are consistently pointing to the
> same backtrace, which is the following (using DONT_OPTIMIZE,
> BETTER_BACKTRACES and MALLOC_DEBUG):
> Thread 1 (Thread 0x7f1f08be8700 (LWP 1767)):
> #0  0x7f1f9bed3395 in __strcasecmp_l_sse42 () from /lib64/libc.so.6
> #1  0x004a91ca in cdr_object_get_by_name_cb ()
> #2  0x00463c60 in internal_ao2_traverse ()
> #3  0x00463fc3 in __ao2_callback ()
> #4  0x004a9b7d in cdr_object_get_by_name ()
> #5  0x004a9d80 in ast_cdr_serialize_variables ()
> #6  0x004de411 in handle_showchan ()
> #7  0x004e15a5 in ast_cli_command_full ()
> #8  0x004e175b in ast_cli_command_multiple_full ()
> #9  0x00455246 in netconsole ()
> #10 0x0060f192 in dummy_start ()
> #11 0x7f1f9cd3b9d1 in start_thread () from /lib64/libpthread.so.0
> #12 0x7f1f9be908fd in clone () from /lib64/libc.so.6
>
> So this happens after issuing a "core show channel ". This
> command is being executed by one script that periodically checks the
> channels and some of its variables. Thing is that sometimes the channel has
> something which causes this crash (happens around 2 times per month). Does
> anyone have any idea of what may be happening/wrong?
> I am running Asterisk version 13.6.0 on CentOS 6.6 kernel
> 2.6.32-504.el6.x86_64 and on CentOS 6.9 kernel 2.6.32-696.el6.x86_64.
>
> Any idea is very appreciated!
>
> Best regards,
>
> Patrick Wakano
>
>
>
>
>
>
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>
> Virus-free. www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>
>
>
> --
> _
> -- 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] Asterisk crash on core show channel

2018-02-20 Thread Patrick Wakano
Hello Asterisk list,
I am facing some Asterisk crashes which are consistently pointing to the
same backtrace, which is the following (using DONT_OPTIMIZE,
BETTER_BACKTRACES and MALLOC_DEBUG):
Thread 1 (Thread 0x7f1f08be8700 (LWP 1767)):
#0  0x7f1f9bed3395 in __strcasecmp_l_sse42 () from /lib64/libc.so.6
#1  0x004a91ca in cdr_object_get_by_name_cb ()
#2  0x00463c60 in internal_ao2_traverse ()
#3  0x00463fc3 in __ao2_callback ()
#4  0x004a9b7d in cdr_object_get_by_name ()
#5  0x004a9d80 in ast_cdr_serialize_variables ()
#6  0x004de411 in handle_showchan ()
#7  0x004e15a5 in ast_cli_command_full ()
#8  0x004e175b in ast_cli_command_multiple_full ()
#9  0x00455246 in netconsole ()
#10 0x0060f192 in dummy_start ()
#11 0x7f1f9cd3b9d1 in start_thread () from /lib64/libpthread.so.0
#12 0x7f1f9be908fd in clone () from /lib64/libc.so.6

So this happens after issuing a "core show channel ". This command
is being executed by one script that periodically checks the channels and
some of its variables. Thing is that sometimes the channel has something
which causes this crash (happens around 2 times per month). Does anyone
have any idea of what may be happening/wrong?
I am running Asterisk version 13.6.0 on CentOS 6.6 kernel
2.6.32-504.el6.x86_64 and on CentOS 6.9 kernel 2.6.32-696.el6.x86_64.

Any idea is very appreciated!
Best regards,
Patrick Wakano


<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
_
-- 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] RTCP + Stasis causing high memory consumption

2017-11-15 Thread Patrick Wakano
Thank you very much for the response Matthew!
I'll try the stasis configuration change first.
I can't say if a malformed RTCP packet triggered the issue, but I did
actually checked a tcpdump while problem was happening and the amount of
RTCP packets and AMI events were reasonably normal Apparently it is an
internal only problem, not actually outputting abnormal traffic in the
network

Best regards!
Patrick Wakano

On 16 November 2017 at 02:34, Matthew Jordan <mjor...@digium.com> wrote:

>
>
> On Mon, Nov 13, 2017 at 11:42 PM, Patrick Wakano <pwak...@gmail.com>
> wrote:
>
>> Hello Asterisk list,
>>
>> I've facing a memory allocation issue that happens occasionally but on a
>> consistent basis.
>> The problem happens as follow, suddenly Asterisk starts consuming a lot
>> of memory, in a rate of more than 1GB per hour. Kernel will eventually kill
>> it via the OOM killer when memory is really exausted... This situation does
>> not generate backtrace because Asterisk is responsive during the whole time
>> and can be stopped/started.
>> After compiling Asterisk with the MALLOC_DEBUG flag, when the problem
>> happened we could see this output with the most consuming files, using
>> "memory show summary" command:
>> # cat memory_show_summary_201711101144.log | sort -nr | head
>> 3060904798 bytes allocated (431496 in caches) in 16185877 allocations
>> 1467180225 bytes in1647238 allocations in file stasis_channels.c
>> 1217035109 bytes in   10229320 allocations in file json.c
>>  240064732 bytes in1765287 allocations in file stasis_message.c
>>   56402000 bytes in1762250 allocations in file taskprocessor.c
>>   26125344 bytes in 203171 allocations in file rtp_engine.c
>>   17308827 bytes in 307848 allocations in file stasis_cache.c
>>9548128 bytes in  35482 allocations in file stasis_bridges.c
>>3923172 bytes in  92169 allocations in file res_rtp_asterisk.c
>>3099771 bytes in  29185 allocations in file strings.c
>>
>> Next minute it was already like this:
>> # cat memory_show_summary_201711101145.log | sort -nr | head
>> 3091009032 bytes allocated (375561 in caches) in 16345842 allocations
>> 1482476997 bytes in1663899 allocations in file stasis_channels.c
>> 1228978956 bytes in   10329516 allocations in file json.c
>>  242483220 bytes in1783070 allocations in file stasis_message.c
>>   57063120 bytes in1782910 allocations in file taskprocessor.c
>>   26354360 bytes in 205090 allocations in file rtp_engine.c
>>   17481272 bytes in 310935 allocations in file stasis_cache.c
>>9628576 bytes in  35782 allocations in file stasis_bridges.c
>>3828232 bytes in  93040 allocations in file res_rtp_asterisk.c
>>3125118 bytes in  29427 allocations in file strings.c
>>
>> So as we can see, total allocations increased 159965 or 30MB in one
>> minute..
>> A regular "memory show summary" during the day would be like this:
>> # cat memory_show_summary_201711140400.log | sort -nr | head
>> 30595537 bytes allocated (406915 in caches) in 77906 allocations
>> 11021007 bytes in   5081 allocations in file stasis_channels.c
>>  3825007 bytes in  12643 allocations in file cdr.c
>>  1855344 bytes in  15837 allocations in file pbx.c
>>  1766744 bytes in183 allocations in file translate.c
>>  1467681 bytes in   1451 allocations in file chan_sip.c
>>  140 bytes in280 allocations in file res_rtp_asterisk.c
>>   980474 bytes in   4740 allocations in file xmldoc.c
>>   895369 bytes in167 allocations in file file.c
>>   800900 bytes in   2397 allocations in file channel.c
>>   280728 bytes in613 allocations in file rtp_engine.c
>>   243147 bytes in   2556 allocations in file stasis.c
>>   130066 bytes in   1082 allocations in file stasis_cache.c
>>24928 bytes in 82 allocations in file stasis_bridges.c
>>51796 bytes in486 allocations in file stasis_message.c
>>
>> We also tried to get a "memory show allocations" when the problem was
>> happening. Unsurprisingly it halted Asterisk and after we cancelled it, it
>> had generated a 1GB file. Both memory logs hinted us to some problem in the
>> RTP module, specifically in the RTCP handling. After investigating the
>> code, looks like for some reason, the res_rtp_asterisk.c (line 4116) when
>> doing the ast_rtcp_read() ended up entering in a loop, causing lots of
>> allocations in the rtp_engine.c (line 2047 - ast_rtp_publish_rtcp_message).
>> Also apparently, another 

[asterisk-users] RTCP + Stasis causing high memory consumption

2017-11-13 Thread Patrick Wakano
Hello Asterisk list,

I've facing a memory allocation issue that happens occasionally but on a
consistent basis.
The problem happens as follow, suddenly Asterisk starts consuming a lot of
memory, in a rate of more than 1GB per hour. Kernel will eventually kill it
via the OOM killer when memory is really exausted... This situation does
not generate backtrace because Asterisk is responsive during the whole time
and can be stopped/started.
After compiling Asterisk with the MALLOC_DEBUG flag, when the problem
happened we could see this output with the most consuming files, using
"memory show summary" command:
# cat memory_show_summary_201711101144.log | sort -nr | head
3060904798 bytes allocated (431496 in caches) in 16185877 allocations
1467180225 bytes in1647238 allocations in file stasis_channels.c
1217035109 bytes in   10229320 allocations in file json.c
 240064732 bytes in1765287 allocations in file stasis_message.c
  56402000 bytes in1762250 allocations in file taskprocessor.c
  26125344 bytes in 203171 allocations in file rtp_engine.c
  17308827 bytes in 307848 allocations in file stasis_cache.c
   9548128 bytes in  35482 allocations in file stasis_bridges.c
   3923172 bytes in  92169 allocations in file res_rtp_asterisk.c
   3099771 bytes in  29185 allocations in file strings.c

Next minute it was already like this:
# cat memory_show_summary_201711101145.log | sort -nr | head
3091009032 bytes allocated (375561 in caches) in 16345842 allocations
1482476997 bytes in1663899 allocations in file stasis_channels.c
1228978956 bytes in   10329516 allocations in file json.c
 242483220 bytes in1783070 allocations in file stasis_message.c
  57063120 bytes in1782910 allocations in file taskprocessor.c
  26354360 bytes in 205090 allocations in file rtp_engine.c
  17481272 bytes in 310935 allocations in file stasis_cache.c
   9628576 bytes in  35782 allocations in file stasis_bridges.c
   3828232 bytes in  93040 allocations in file res_rtp_asterisk.c
   3125118 bytes in  29427 allocations in file strings.c

So as we can see, total allocations increased 159965 or 30MB in one
minute..
A regular "memory show summary" during the day would be like this:
# cat memory_show_summary_201711140400.log | sort -nr | head
30595537 bytes allocated (406915 in caches) in 77906 allocations
11021007 bytes in   5081 allocations in file stasis_channels.c
 3825007 bytes in  12643 allocations in file cdr.c
 1855344 bytes in  15837 allocations in file pbx.c
 1766744 bytes in183 allocations in file translate.c
 1467681 bytes in   1451 allocations in file chan_sip.c
 140 bytes in280 allocations in file res_rtp_asterisk.c
  980474 bytes in   4740 allocations in file xmldoc.c
  895369 bytes in167 allocations in file file.c
  800900 bytes in   2397 allocations in file channel.c
  280728 bytes in613 allocations in file rtp_engine.c
  243147 bytes in   2556 allocations in file stasis.c
  130066 bytes in   1082 allocations in file stasis_cache.c
   24928 bytes in 82 allocations in file stasis_bridges.c
   51796 bytes in486 allocations in file stasis_message.c

We also tried to get a "memory show allocations" when the problem was
happening. Unsurprisingly it halted Asterisk and after we cancelled it, it
had generated a 1GB file. Both memory logs hinted us to some problem in the
RTP module, specifically in the RTCP handling. After investigating the
code, looks like for some reason, the res_rtp_asterisk.c (line 4116) when
doing the ast_rtcp_read() ended up entering in a loop, causing lots of
allocations in the rtp_engine.c (line 2047 - ast_rtp_publish_rtcp_message).
Also apparently, another loop (or maybe the same, not sure...) happened
calling ast_channel_publish_blob() because we got lots of
create_channel_blob_message and ast_channel_snapshot_create allocations too.
Json, taskprocessor, stasis_message and stasis_cache allocations seems to
be side effect of so many stasis messages being created and published.
We could check memory logs 3 times for this problem and they are similar so
it seems that a bug exists somewhere leading to this problem.
So anyone has any idea of what could be happening or if it may be related
to some known bug?
We are running Asterisk 13.6.0 in CentOS 6.6.

Thanks very much!
Best regards,
Patrick Wakano
-- 
_
-- 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] Surrogate channels

2017-05-18 Thread Patrick Wakano
Thanks very much for the explanation Richard!!
Best Regards!
Patrick


Virus-free.
www.avg.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
_
-- 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] Surrogate channels

2017-05-15 Thread Patrick Wakano
Hello Asterisk list!

I've been facing some scenarios in my dialplan where I see the "h"
extension being executed for Surrogate channels.
For me, it is kind of a mystery what these Surrogate channels are... I
couldn't find good information about them... the source code is where I
could find the most detailed info:

/*! \brief Channel technology used to extract a channel from a running
application. The * channel created with this technology will be
immediately hung up - most external
 * applications won't ever want to see this.
 */

It mentions "*won't ever want to see this*", so I am unsure if they are
only internal to Asterisk core and I should not be seeing these channels
executing my dialplan, or if indeed I will see them in my dialplan, and
then I have to handle them somehow (even if I don't want them)

Anyway, does anyone know a good explanation about these surrogate channels,
and what is expected of them when it comes to dialplan execution?

Cheers!
Patrick


Virus-free.
www.avg.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
_
-- 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] Asterisk crash in ast_find_ourip

2017-03-14 Thread Patrick Wakano
Hello list,

We've got an Asterisk crash in one of our servers and the core dump showed
following call tree.
Is this anyhow helpful to someone? Seems like a regular RTP / RTCP handling
that lead to a malloc crash

Grateful for any help!
Cheers,
Patrick

Thread 1 (Thread 0x7f8d6b023700 (LWP 14915)):
#0  0x7f8ead2d9252 in _int_malloc () from /lib64/libc.so.6
#1  0x7f8ead2da6b1 in malloc () from /lib64/libc.so.6
#2  0x7f8ead36f902 in make_request () from /lib64/libc.so.6
#3  0x7f8ead36fa5a in __check_pf () from /lib64/libc.so.6
#4  0x7f8ead332d17 in getaddrinfo () from /lib64/libc.so.6
#5  0x005435f5 in ast_sockaddr_resolve (addrs=0x7f8d6b01fee8,
str=0x7f8d6b01ffb0 "**", flags=768, family=0) at
netsock2.c:304
#6  0x0043484d in resolve_first (addr=0x7f8d6b022250,
name=0x7f8d6b01ffb0 "**", family=,
flag=768) at acl.c:792
#7  0x00434ce6 in ast_find_ourip (ourip=0x7f8d6b022250,
bindaddr=, family=0) at acl.c:970
#8  0x7f8e504f4d37 in ast_rtcp_read (instance=0x7f8e293df0f8) at
res_rtp_asterisk.c:4077
#9  0x7f8e504f5a45 in ast_rtp_read (instance=0x7f8e293df0f8,
rtcp=) at res_rtp_asterisk.c:4233
#10 0x7f8dfecdc7e1 in sip_rtp_read (ast=0x7f8e290f57c8) at
chan_sip.c:8298
#11 sip_read (ast=0x7f8e290f57c8) at chan_sip.c:8401
#12 0x004b44c5 in __ast_read (chan=0x7f8e290f57c8, dropaudio=0) at
channel.c:3874
#13 0x00476655 in bridge_handle_trip
(bridge_channel=0x7f8e28d669f8) at bridge_channel.c:2272
#14 bridge_channel_wait (bridge_channel=0x7f8e28d669f8) at
bridge_channel.c:2442
#15 0x00477658 in bridge_channel_internal_join
(bridge_channel=0x7f8e28d669f8) at bridge_channel.c:2587
#16 0x00468610 in bridge_channel_ind_thread (data=0x7f8e28d669f8)
at bridge.c:1690
#17 0x005bdbbb in dummy_start (data=) at
utils.c:1232
#18 0x7f8eae18d9d1 in start_thread () from /lib64/libpthread.so.0
#19 0x7f8ead3488fd in clone () from /lib64/libc.so.6



Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f8ead2d9252 in _int_malloc () from /lib64/libc.so.6
#0  0x7f8ead2d9252 in _int_malloc () from /lib64/libc.so.6
No symbol table info available.
#1  0x7f8ead2da6b1 in malloc () from /lib64/libc.so.6
No symbol table info available.
#2  0x7f8ead36f902 in make_request () from /lib64/libc.so.6
No symbol table info available.
#3  0x7f8ead36fa5a in __check_pf () from /lib64/libc.so.6
No symbol table info available.
#4  0x7f8ead332d17 in getaddrinfo () from /lib64/libc.so.6
No symbol table info available.
#5  0x005435f5 in ast_sockaddr_resolve (addrs=0x7f8d6b01fee8,
str=0x7f8d6b01ffb0 "**", flags=768, family=0) at
netsock2.c:304
hints = {ai_flags = 0, ai_family = 0, ai_socktype = 2, ai_protocol
= 0, ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0}
res = 
ai = 
s = 0x7f8d6b01fe00 "**"
host = 0x7f8d6b01fe00 "**"
port = 0x0
e = 
i = 
res_cnt = 
__PRETTY_FUNCTION__ = "ast_sockaddr_resolve"
#6  0x0043484d in resolve_first (addr=0x7f8d6b022250,
name=0x7f8d6b01ffb0 "**", family=,
flag=768) at acl.c:792
addrs = 
addrs_cnt = 
#7  0x00434ce6 in ast_find_ourip (ourip=0x7f8d6b022250,
bindaddr=, family=0) at acl.c:970
ourhost = "**", '\000' 
root = {ss = {ss_family = 1384, __ss_align = 56, __ss_padding =
"\320\302\000\000\000\000\000\000\060M\177)\000\000\000\000\n\000\000\000\000\000\000\000\002",
'\000' "\300, ", '\000' ,
"\n\000\000\000\062\000\000\000[\000\000\00
0|\000\000\000w\000\000\000n", '\000' ,
"8\000\000\000\000\000\000"}, len = 49872}
res = 1795293104
port = 0
__PRETTY_FUNCTION__ = "ast_find_ourip"
#8  0x7f8e504f4d37 in ast_rtcp_read (instance=0x7f8e293df0f8) at
res_rtp_asterisk.c:4077
i = 
pt = 
length = 
rc = 
message_blob = 
rtcp_report = 0x7f8e2812c198
rtp = 0x7f8e285da140
addr = {ss = {ss_family = 2, __ss_align = 0, __ss_padding =
"0\000\000\000\060\000\000\000\220)\002k\215\177\000\000\320(\002k\215\177\000\000\340\323[\000\000\000\000\000H\360p(\216\177\000\000\021\260Q\000\000\000\000\000\245\006\000\000\216\177\000\000\356O0\255\216\177\000\000\020]\022)\216\177\000\000\000\000\000\000\000\000\000\000\245$\002k\215\177\000\000\000\000\000\000\216\177\000\000H\360p(\216\177\000\000\001\000\000\000\000\000\000"},
len = 16}
rtcpdata = '\000' , "\001", '\000' "\323,
[\000\000\000\000\000\201\310\000\fMm\216\347\334lf\256͑g\205Ms_\205\000\000\003\253\000\002J\340b{\370\363\000\000\000\000\000\000\225\310\000\000\000\017\000\000\000\000\000\000\000\000\201\312\000\aMm\216\347\001\023\065\065\063\067\

Re: [asterisk-users] Execution of pre-bridge handlers

2017-02-14 Thread Patrick Wakano
What an excellent response Richard!!! Thank you very much for that!!

Best regards!
Patrick

On Wed, Feb 15, 2017 at 5:23 AM, Richard Mudgett <rmudg...@digium.com>
wrote:

>
>
> On Tue, Feb 14, 2017 at 6:24 AM, Patrick Wakano <pwak...@gmail.com> wrote:
>
>> Hello Asterisk Users,
>>
>> Hope you all doing fine!
>> I am working with a quite complex dialplan, and I've come to some
>> situations where it makes some nasty use of pre-bridge handlers.
>> The pre-bridge handlers wiki (https://wiki.asterisk.org/wik
>> i/display/AST/Pre-Bridge+Handlers) doesn't have the big warning the
>> pre-dial one has indicating it must return and must not put the
>> caller/callee in other applications (https://wiki.asterisk.org/wik
>> i/display/AST/Pre-Dial+Handlers). So apparently, looks like they
>> wouldn't have this restriction... However I had the feeling this was not
>> true, so after some research I found this issue
>> https://issues.asterisk.org/jira/browse/ASTERISK-25690, that says "*Connected
>> line subroutines are meant** to be fast and as a result there is an
>> expectation that applications invoked will not consume frames*". I am
>> assuming that connected lines subroutines are just different words for
>> pre-bridge handlers, right?
>> Anyway my question is, what happens if I do not return straight away from
>> the pre-bridge handler? Or even worst, if I execute a Dial application for
>> example? Will I fall in some "undefined behaviour"?
>>
>> Anyone has experienced something like this?
>>
>
> There are several handler routines available and each handles situations
> for the
> different states of a call.  It makes no sense to use the Hangup()
> application in
> any of them and you must return from all of them.  Most of the handlers
> operate
> from within the Dial application.
>
> Pre-dial handlers
>   The purpose of these routines is to setup a channel to place a call.
> The pre-dial
>   routines can be run on the calling and called channels.  See the Dial
> application
>   documentation.
>
>   For the calling channel, you can do most anything to the calling channel
> except
>   hangup because you are still within the Dial application's control.  The
> reason
>   for the ability to execute a pre-dial routine on the calling channel
> instead of doing
>   all the setup before executing Dial is to eliminate a window of
> opportunity when using
>   the Lock/Unlock applications with Dial.
>
>   For the called channel, you can only setup the channel.  At this point,
> the channel
>   exists but is not connected to anything nor has the call been placed.
> Do your
>   channel setup and return.
>
> Redirecting interception handlers
>   This routine normally executes on the calling channel because the called
> channel
>   has indicated that the call is being diverted/forwarded/redirected to
> somewhere
>   else.  The purpose of this routine is to get the REDIRECTING party
> information
>   setup as you want and then return.  You do not have control of the media
> nor should
>   you hangup.  You also should be quick about it.
>
> Pre-bridge handlers
>   At this point the called channel has answered and all other called
> channels that were
>   dialed have been hung up.  The called channel is about to be bridged
> with the calling
>   channel.
>
>   The purpose of this routine is to give the called person an opportunity
> to decide if
>   he even wants to talk to the caller.  You have control of the media
> stream to the called
>   party.  You cannot hangup the channel in the routine because you must
> return.  If you
>   want to abort bridging the call with the channel you must set a return
> value as
>   documented by the Dial application.  You need to remember that the
> caller is
>   waiting to be connected the entire time you are in this routine.
>
> Connected-line interception handlers
>   At this point the channels are bridged together and may have been
> talking for awhile.
>
>   The purpose of this routine is to get the CONNECTEDLINE party
> information setup
>   as you want and then return.  The bridged peer has changed identity
> likely because
>   of a transfer.  You do not have control of the media nor should you
> hangup.  You also
>   need be quick about it or you risk causing a noticeable interruption to
> the media.
>
> Hangup handlers
>   At this point the channel is hungup and you should be gathering
> information about
>   the call for further processing later.  You should not be doing
> extensive post call
>   analysis at this time because you are delaying the channel technology
>

[asterisk-users] Execution of pre-bridge handlers

2017-02-14 Thread Patrick Wakano
Hello Asterisk Users,

Hope you all doing fine!
I am working with a quite complex dialplan, and I've come to some
situations where it makes some nasty use of pre-bridge handlers.
The pre-bridge handlers wiki (https://wiki.asterisk.org/
wiki/display/AST/Pre-Bridge+Handlers) doesn't have the big warning the
pre-dial one has indicating it must return and must not put the
caller/callee in other applications (https://wiki.asterisk.org/
wiki/display/AST/Pre-Dial+Handlers). So apparently, looks like they
wouldn't have this restriction... However I had the feeling this was not
true, so after some research I found this issue https://issues.asterisk.org/
jira/browse/ASTERISK-25690, that says "*Connected line subroutines are
meant** to be fast and as a result there is an expectation that
applications invoked will not consume frames*". I am assuming that
connected lines subroutines are just different words for pre-bridge
handlers, right?
Anyway my question is, what happens if I do not return straight away from
the pre-bridge handler? Or even worst, if I execute a Dial application for
example? Will I fall in some "undefined behaviour"?

Anyone has experienced something like this?

Many thanks,
Cheers,
Patrick
-- 
_
-- 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