Re: [asterisk-users] Logging different verbosity levels

2022-05-23 Thread Kevin Harwell
So this turned out more complicated than I originally thought!

My expectation:

Verbosity gets logged using an "at least" check against the current
system's verbose level, which if passed subsequently gets checked against
the logging channel's verbose level. Thus only verbose messages with a
level less than or equal to the system's level AND the channel's level
would be logged to that channel. For example given a system verbose level
of 3, and your setup then the following should occur:

same => n,Verbose(0,Test message verbosity 0) ; gets logged to
logtest.verbose.3, logtest.verbose.2, logtest.verbose.1, and
logtest.verbose.0
same => n,Verbose(1,Test message verbosity 1) ; gets logged to
logtest.verbose.3, logtest.verbose.2, and logtest.verbose.1
same => n,Verbose(2,Test message verbosity 2) ; gets logged to
logtest.verbose.3 and logtest.verbose.2
same => n,Verbose(3,Test message verbosity 3) ; gets logged to
logtest.verbose.3
same => n,Verbose(4,Test message verbosity 4) ; nothing logged
same => n,Verbose(5,Test message verbosity 5) ; nothing logged
same => n,Verbose(6,Test message verbosity 6) ; nothing logged
same => n,Verbose(7,Test message verbosity 7) ; nothing logged
same => n,Verbose(8,Test message verbosity 8) ; nothing logged
same => n,Verbose(9,Test message verbosity 9) ; nothing logged

Reality:

What you saw in your output. As to why? Well it's a bit of a mess and it's
been that way for a while it seems. To start the app_verbose application
gets capped at verbose level 4. Meaning the following:

same => n,Verbose(7,Test message verbosity 7)

Essentially gets changed to:

same => n,Verbose(4,Test message verbosity 7)

Next, Asterisk sets the global verbose logging level according to the
following order with each level potentially overriding if greater than the
preceding:

1) core verbose level (set in asterisk.conf)
2) console level (set via system CLI, or asterisk CLI)
3) channel log level (set in logger.conf, e.g. verbose(9))

This means in asterisk.conf if you set verbose=2, and then on the CLI set
it to 3, and then for any channel in logger.conf specify verbose(9) then
the final level will be 9! The levels too are tracked via different
variables so given the preceding example the following will be output:

*CLI> core show settings
...
Root console verbosity:  2
...

Despite the actual level being 9.

Lastly, when the logger goes to output the actual log message to a channel
it does indeed first check if the channel's verbosity level is greater than
some "level" variable. But guess what? This variable is always equal to 0.
Thus as long as a channel's level is > 0 it always passes and the message
is output.

So you can see in your setup the final system level is indeed 9, and all
app_verbose messages being output are forced to 4 or less. Since the system
level is 9, and the channel's verbosity level is greater than zero then all
messages are output to all files.

Hope that makes sense!

Given all that, in my opinion there seems to be at least one or more bugs
with regards to verbose logging. Please file an issue at
https://issues.asterisk.org/. Feel free to copy/paste what's here as part
of the issue description.


On Mon, May 23, 2022 at 3:29 AM Antony Stone <
antony.st...@asterisk.open.source.it> wrote:

> Hi.
>
> Does no-one else know either?  I thought this was a simple question, and
> it
> was just me being unable to find the appropriate documentation to explain
> how
> these logging levels work.
>
> Please, can anyone help?
>
> On Friday 20 May 2022 at 15:33:45, Antony Stone wrote:
>
> > Hi.
> >
> > I'm trying to use different logging verbosity levels to get dialplan
> output
> > into different log files, and there's clearly something I haven't
> > understood about how Asterisk does this...
> >
> >
> > I have the following in /etc/asterisk/logger.conf:
> >
> > [logfiles]
> > logtest.verbose.0 => verbose(0)
> > logtest.verbose.1 => verbose(1)
> > logtest.verbose.2 => verbose(2)
> > logtest.verbose.3 => verbose(3)
> > logtest.verbose.4 => verbose(4)
> > logtest.verbose.5 => verbose(5)
> > logtest.verbose.6 => verbose(6)
> > logtest.verbose.7 => verbose(7)
> > logtest.verbose.8 => verbose(8)
> > logtest.verbose.9 => verbose(9)
> >
> > I then put the following at a particular point in my dialplan:
> >
> > same => n,Verbose(0,Test message verbosity 0)
> > same => n,Verbose(1,Test message verbosity 1)
> > same => n,Verbose(2,Test message verbosity 2)
> > same => n,Verbose(3,Test message verbosity 3)
> > same => n,Verbose(4,Test message verbosity 4)
> > same => n,Verbose(5,Test message verbosity 5)
> > same => n,Verbose(6,Test message verbosity 6)
> > same => n,Verbose(7,Test message verbosity 7)
> > same => n,Verbose(8,Test message verbosity 8)
> > same => n,Verbose(9,Test message verbosity 9)
> >
> > I was expecting to get each message output into the respective filename,
> > but instead I got 10 files with the expected filenames, and all
> containing
> > every test message, no matter 

Re: [asterisk-users] Setting up sipml5

2021-09-10 Thread Kevin Harwell
On Fri, Sep 10, 2021 at 12:44 PM Jerry Geis  wrote:

> HI All,
>
> I am trying to get SIPml5 working with 18.6.0.
> My http.conf file:
> enabled=yes
> bindaddr=myip
> bindport=8088
> serverName=MyName
> tlsenabled=true
> tlsbindaddr=myip
> tlscertfile=/etc/letsencrypt/live/mpname/fullchain.pem
>
> The SIPMl log just says:
> WebSocket connection to 'wss://myIP:8088/' failed:
>
> Is there something easy I'm missing to allow websockets on Asterisk ?
> Thanks
>
>
Check out the following wiki pages (if you haven't already), and ensure all
your settings are correct:

https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients
https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
-- 
_
-- 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 Getting Crashed

2020-06-25 Thread Kevin Harwell
On Thu, Jun 25, 2020 at 4:12 PM Ahmed Chohan 
wrote:

> Hi,
>
> Currently I'm experiencing crashes on Asterisk more recently, see messages
> below (crashed reason: segfault signal 6).
>
> abrt-hook-ccpp[19864]: Process 7082 (asterisk) of user 0 killed by SIGABRT
> - dumping core
>
> asterisk: ERROR[15373][C-0004e304]: astobj2.c:131 in INTERNAL_OBJ: FRACK!,
> Failed assertion bad magic number 0x0 for object 0x7fbd2c
>
> 00d170 (0)
>
> After running the backtrace for the coredump, I'm unable to pinpoint the
> root cause of it (see partial messages for the backtrace below).
> Furthermore, I've checked in the forums and advised the "utils.so" module
> issue but I don't think it might be causing this crash.
>
> [root@alpha01 ccpp-2020-06-25-10-46-01-7082]# gdb /usr/sbin/asterisk
> coredump
>
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
>
> Copyright (C) 2013 Free Software Foundation, Inc.
>
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
>
> This is free software: you are free to change and redistribute it.
>
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>
> and "show warranty" for details.
>
> This GDB was configured as "x86_64-redhat-linux-gnu".
>
> For bug reporting instructions, please see:
>
> <http://www.gnu.org/software/gdb/bugs/>...
>
> Reading symbols from /usr/sbin/asterisk...done.
>
> [New LWP 15373]
>
> [New LWP 15800]
>
> [New LWP 16125]
>
> [New LWP 15829]
>
> [New LWP 16486]
>
> ..
>
> Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.
>
> Program terminated with signal 6, Aborted.
>
> #0  0x7fbe7a65f337 in ?? ()
>
> (gdb) bt full
>
> #0  0x7fbe7a65f337 in ?? ()
>
> No symbol table info available.
>
> #1  0x7fbe7a660a28 in ?? ()
>
> No symbol table info available.
>
> #2  0x0020 in ?? ()
>
> No symbol table info available.
>
> #3  0x in ?? ()
>
> No symbol table info available.
>
>
> OS I'm running is CentOs 7.7.1908 and the Asterisk version is 13.21-cert3.
> Please advise.
>
>
Unfortunately debug symbols were not enabled on your system so the
backtrace doesn't have any extractable information. Please see the wiki [3]
on how to get a useful backtrace.

Before that though I recommend upgrading to the latest version of Asterisk
[1]. Or if you're set on using a certified version [3]. The version you are
on is quite old, and there is a decent chance the problem you are
experiencing has been fixed.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace
[2] https://downloads.asterisk.org/pub/telephony/asterisk/
[3] https://downloads.asterisk.org/pub/telephony/certified-asterisk/

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

Re: [asterisk-users] error compiling current git

2020-02-27 Thread Kevin Harwell
On Thu, Feb 27, 2020 at 8:51 AM hw  wrote:

> Hi,
>
> compiling the current git version on Centos 7 gives me:
>
>
>[CC] res_statsd.c -> res_statsd.o
> res_rtp_asterisk.c:2669:2: error: unknown field ‘on_valid_pair’ specified
> in initializer
>   .on_valid_pair = ast_rtp_on_valid_pair,
>   ^
> res_rtp_asterisk.c:2669:2: warning: initialization from incompatible
> pointer type [enabled by default]
> res_rtp_asterisk.c:2669:2: warning: (near initialization for
> ‘ast_rtp_ice_sess_cb.on_ice_complete’) [enabled by default]
>[CC] res_format_attr_g729.c -> res_format_attr_g729.o
>
>
> Is this to be expected or should I make a bug report?
>
>
When you pulled the lasted code this change would have forced a
re-configure. If you haven't already try doing a full clean and rebuild,
and see if you still have the error:

$ make distclean
$ ./configure [your options]
$ make

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

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

2020-02-25 Thread Kevin Harwell
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

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

2020-02-25 Thread Kevin Harwell
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 tracker [1].

[1] https://issues.asterisk.org/

Thanks!

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

Re: [asterisk-users] [asterisk-app-dev] ARI Get Channel Variable

2020-01-22 Thread Kevin Harwell
On Wed, Jan 22, 2020 at 5:32 PM Phil Mickelson  wrote:

> I'm trying to get the Call-ID from the SIP HEADER using getChannelVar.
> When I pass SIP_HEADER() and anything as the variable I get Unable to read
> provided function.  If use Call-ID I get Provided variable was not found.
>
> This is a connected call.  Is it not possible to get SIP HEADER
> information once it's connected?  Or, am I missing something?
>

Are you using chan_sip or chan_pjsip? If chan_pjsip then you need to use
the PJSIP_HEADER function [1] instead. For instance the following returned
the call-id for me:

PJSIP_HEADER(read,Call-ID)

How are you attempting to use the channel function [2]? For instance the
following returned the call-id for me as well:

CHANNEL(pjsip,call-id)

[1]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_PJSIP_HEADER
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_CHANNEL

-- 
Kevin Harwell
Senior Software Developer
Sangoma Technologies
Check us out at: https://sangoma.com & https://asterisk.org
___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
-- 
_
-- 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 Setup Outbound SIP Trunk

2019-10-16 Thread Kevin Harwell
On Mon, Oct 14, 2019 at 11:56 AM Ahmed Chohan 
wrote:

> Hi,
>
> I've currently migrating from chan_sip to chan_pjsip, for now I'm able to
> setup and configured extensions in PJSIP and incoming trunks but unable to
> configure outbound trunk as getting unauth/unregistered trunk endpoint
> message error message when making outbound calls. However, for inbound
> calls I'm not facing any issues.
>
> I would like to know how can I configured outbound sip trunk bypassing
> registration and auth?
>

Where are the messages coming from? Is Asterisk sending an outbound
registration, but getting rejected? If so make sure your username/password
credentials are correct.


>
> See below current configuration;
>
> [trunk_proxy]
> type=endpoint
> transport=transport-udp
> context=fromsip
> disallow=all
> allow=ulaw
> aors=trunk_proxy
> force_rport=no
> direct_media=yes
> ice_support=no
> trust_id_inbound=yes
> outbound_auth=trunk_proxy
>
> [trunk_proxy]
> type=aor
> contact=sip:10.3.120.208:5060
>
> [trunk_proxy]
> type=identify
> endpoint=trunk_proxy
> match=10.3.120.208
>
> [trunk_proxy]
> type=auth
> auth_type=userpass
> password=
> username=sip_proxy
>
> [trunk_proxy]
> type=registration
> outbound_auth=trunk_proxy
> server_uri=sip:10.3.120.208:5060
> client_uri=sip:10.3.120.208:5060
> auth_rejection_permanent=no
>
> --
> Regards,
>
> Ahmed Munir Chohan
>
> --
> _
> -- 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



-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.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

Re: [asterisk-users] Experiencing what I think are issues with the confbridge 'video_mode = follow_talker' and also the talk detection

2019-03-15 Thread Kevin Harwell
 CONFBRIDGE(user,template)
>
> Value: 4
>
>
>
> Action: SetVar
>
> ActionID: C176
>
> Channel: PJSIP/webrtc_client1-000e
>
> Variable: CONFBRIDGE(bridge,template)
>
> Value: 2
>
>
>
> Action: SetVar
>
> ActionID: C177
>
> Channel: PJSIP/webrtc_client1-000e
>
> Variable: CONFBRIDGE(user,template)
>
> Value: 4
>
>
>
> [2]
>
> type = bridge
>
> language = en
>
> internal_sample_rate = 0
>
> mixing_interval = 20
>
> record_file_append = no
>
> max_members = 10
>
> video_mode = follow_talker
>
>
>
> [4]
>
> type = user
>
> admin = no
>
> marked = no
>
> startmuted = no
>
> music_on_hold_when_empty = no
>
> quiet = yes
>
> wait_marked = no
>
> end_marked = no
>
> dsp_drop_silence = yes
>
> dsp_silence_threshold = 2500
>
> dsp_talking_threshold = 160
>
> denoise = no
>
> jitterbuffer = yes
>
> talk_detection_events = yes
>
> dtmf_passthrough = no
>
> announce_user_count = no
>
> announce_join_leave = no
>
> announce_user_count_all = no
>
> announce_only_user = no
>
> send_events = no
>
> echo_events = no
>
> announce_join_leave_review = no
> --
>
>

[1] https://issues.asterisk.org/
[2] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Thanks!

-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.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

Re: [asterisk-users] Does anyone know if there is a problem with the Chrome browser and asterisk cmp2k video

2019-03-14 Thread Kevin Harwell
On Wed, Mar 13, 2019 at 10:15 AM Dan Cropp  wrote:

> Using asterisk 16.1.1.
>
>
>
> I’m setting up a test using the cmp2k (Cyber Mega Phone 2K Ultimate
> Dynamic Edition).
>
>
>
> I have noticed Chrome 72 had some issues with video streams.  I just
> upgraded to Chrome 73 and see they still have some issues.  If I have 2
> calls in a confbridge with video set to none.  I then set the video source
> to a Chrome browser and the Remote Video shown to both calls from Firefox
> and Chrome do not update.  However, if I set the video source to the
> Firefox browser, my Remote Video is accurate in both Firefox and Chrome.
>
> I confirmed that asterisk is indicating the video source changed by
> looking at the AMI BridgeVideoSourceUpdate event.
>
>
>
> When I use the Firefox (65.0.2) browser I can set either call to be the
> video source and the Remote Video updates accordingly.
>
>
>
> Is this caused by Chrome’s video sent to asterisk being some format which
> asterisk can’t use in the confbridge?
>

The way I understand it is that video stream has changed, so the browser
needs some way to know that. Otherwise the decoder thinks it's invalid data
and drops it. In these cases either Asterisk needs to issue a renegotiation
(currently not supported), or the codec needs to contain video stream
information in their payload. I spoke with Joshua Colp about this some as
he's had some dealings with this and he had the following to say:

"Some codecs (such as VP8/V9) embed information about the video stream
within their payload. Asterisk does not currently rewrite this information,
so when a stream change occurs in Asterisk using the selective source
functionality this can cause the receiving side (the browser) to drop the
payload as it sees it as not being part of the existing stream. Different
browsers can behave differently, such as resetting the video decoder to handle
the new stream. Rewriting this information in the video payload is not
currently supported."

So you are probably seeing it work or not in Chrome vs Firefox due to
browser, and codec support of such occurrences.

     


-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.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

Re: [asterisk-users] Question on WebRTC configuration

2018-12-07 Thread Kevin Harwell
On Fri, Dec 7, 2018 at 9:11 AM Dan Cropp  wrote:

> In the asterisk wiki instructions for Configuring Asterisk for WebRTC
> clients…
>
>
>
>
> https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients
>
>
>
> “To communicate with websocket clients, Asterisk uses its built-in HTTP
> daemon.  Configure */etc/asterisk/http.conf* as follows:
>
>
>
> [general]
>
> enabled=yes
>
> bindaddr=0.0.0.0
>
> bindport=8088
>
> tlsenable=yes
>
> tlsbindaddr=0.0.0.0:8089
>
> tlscertfile=
>
> tlsprivatekey=
>
> tlscafile=”
>
>
>
> What is the tlscafile setting?
>
>
>
> When I look at the http.conf samples it doesn’t mention the tlscafile
> setting.
>
> I see there is a tlscafile setting in sip.conf, but I don’t find this
> anywhere else.
>
>
>
> Is the wiki web page mistaken or is this an actual http.conf setting that
> is undocumented?
>

The page is mistaken. It should not be there. the 'tlscafile' option is not
supported by the Asterisk http server. I've removed it from the wiki.
Thanks for catching that!


>
>
> Have a great day!
>

You too!


> Dan
> --
>

-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.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

Re: [asterisk-users] SIPp scenario file for testing UAC Authentication with Asterisk ?

2018-10-25 Thread Kevin Harwell
On Thu, Oct 25, 2018 at 4:32 AM Olivier  wrote:

> Hello,
>
> I'm testing an Asterisk instance.
> At the moment, I'm focusing on its capability to receive and challenge
> incoming SIP Registrations.
>
>
If all you want to do is test inbound registrations you can find an example
SIPp scenario in the Asterisk testsuite[1]. You'll want to remove the
 section from the 200 response and the variable reference. Then
you'll want to execute the scenario with something like the following
(replacing with your values of course):

sipp  -m 1 -sf register-auth.xml -s  -ap 

Another example can be found here[2]. Both the README and register.xml file
have instructions on how to execute the test. Currently the test is setup
to test a few thousand endpoints though. However you can adjust that number
by modifying the register.csv (injection file) or by not using the
injection file and modifying the register.xml scenario itself.

[1]
https://github.com/asterisk/testsuite/blob/master/tests/channels/pjsip/registration/inbound/nominal/single_contact/authed/sipp/register-auth.xml
[2]
http://blogs.asterisk.org/wp-content/uploads/2018/09/performance_inbound_registration.tar.gz



> For various reasons, I would prefer to use SIPp instead of Asterisk to act
> as SIP Client.
>
> Has someone successfully done this ?
> If negative, what explains this ?
> If positive, can you give an example of a successful SIPp scenario file ?
> I've played with both embeded branchc and [1] but met no success yet
>
> Best regards
>
> [1] https://github.com/rkday/sipp-samples/blob/master/uac-auth.xml
>
>

-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.com & https://asterisk.org
-- 
_
-- 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] Crashes in jitterbuffer with framedata->timer_interval > 1000

2017-04-18 Thread Kevin Harwell
On Tue, Apr 18, 2017 at 1:59 PM, Richard Kenner  wrote:

> I had three crashes this morning on a divide-by-zero, for example at
> abstract_jb.c:1008 in 14.3.0.
>
>
This is quite odd. I took a quick look at the code at that line number and
it appears the divider should never be zero, but somehow it got set to or
initialized to that maybe.


> Does this ring any bell to anybody?
>
>
This does not sound familiar. Please create an issue on the Asterisk issue
tracker [1] and attach a backtrace [2]. Debug logs around the time of the
crash may be helpful too if you have those. Which channel type (chan_sip,
local channel, chan_pjsip) is involved, and how you are enabling the jitter
buffer (dialplan function vs configuration) would be good to know as well.

[1] https://issues.asterisk.org
[2] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

Thanks!
-- 

Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://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

Re: [asterisk-users] PJSIP missing objects

2016-12-02 Thread Kevin Harwell
On Fri, Dec 2, 2016 at 1:50 PM, Saint Michael  wrote:

> In version 13.13.0
>  there is no
> res_pjsip_keepalive.so
> res_pjsip_multihomed.so
>
> Is this normal?
>

In this case yes. res_pjsip_keepalive was renamed
to res_pjsip_transport_management and res_pjsip_multihomed was removed as
the bulk of its code was moved into the res_pjsip core.

-- 

Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://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

Re: [asterisk-users] Statsd Dialplan Application

2016-01-19 Thread Kevin Harwell
On Tue, Jan 19, 2016 at 8:46 AM, Annus Fictus  wrote:

> Hello,
>
> I'd like to do some tests with the StatsD dialplan application but on the
> last version of Asterisk 13 (13.7.0) I can't find this application.
>
> New Features made in this release:
> ---
>  * ASTERISK-25419 - Dialplan Application for Integration of StatsD
>   (Reported by Ashley Sanders)
>
> res_statsd module are correctly compiled y loaded.
>
> Any hint?
>
> Regards
>
>
>

Unfortunately these changes did not go out with the latest release of
13.7.0. Actually the new StatsD Dialplan application currently resides in
master only. A small change to the res_statsd api was made and got tagged
with that issue number for some reason, thus making it look as if the
StatsD application feature was added to 13.


-- 

Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] res_pjsip endpoint config object's 'identify_by' option needs new value "uri".

2015-03-06 Thread Kevin Harwell
On Fri, Mar 6, 2015 at 3:46 PM, Dmitriy Serov  wrote:

>  07.03.2015 0:24, Kevin Harwell пишет:
>
>  On Fri, Mar 6, 2015 at 2:06 PM, Dmitriy Serov 
> wrote:
>
>>  Hello.
>>
>> Asterisk 13.2.
>> I transfer configs from chan_sip to res_pjsip.
>> In chan_sip i have "match_auth_username=yes" and have nothing in pjsip.
>>
>> I have a lot of endpoints and registrations on same SIP server. And it's
>> problem in pjsip now. Is not it?
>>
>> I requesting to add new value for endpoint option identify_by. The value
>> 'uri'.
>> Simple config (cutted):
>>
>> [siptrunk]
>> type=registration
>> transport=udp-transport
>> outbound_auth=siptrunk
>> server_uri=sip:sip.example.comclient_uri=sip:1234567...@sip.example.com
>> retry_interval=60
>> contact_user=siptrunk-in
>>
>> [siptrunk-in]
>> type=endpoint
>> transport=udp-transport
>> context=from-trunk
>> disallow=all
>> allow=ulaw
>> outbound_auth=siptrunk
>> aors=siptrunk
>> identify_by=uri
>>
>>
>> Registration section has option "contact_user". Incoming call from this
>> registration will be INVITE sip:siptrunk-in@
>> I offer to change res_pjsip_endpoint_identifier_user to realize endpoint
>> identification by sip uri.
>>
>> I think it will be usefull.
>>
>> P.S. i hope issues will be rejected:
>> https://issues.asterisk.org/jira/browse/ASTERISK-22306 and SWP-6069
>>
>>
>> Dmitriy Serov
>>
>> -
>>
>
>  I believe what you are looking for is already available. See the
> "identify" type (type=identify) section that is in the pjsip.conf file and
> the "identify" option for endpoints. These allow you to identify and
> endpoint by IP address.
>
> For more information see the pjsip.conf.sample file.  Also take a look at
> configuring Asterisk for res_pjsip [1] specifically the part about
> configuring endpoint identification by IP address [2]. If you run into
> problems more information can also be found in the res_pjsip
> troubleshooting guide [3], specifically the section on "identify by IP
> address"
>
> [1] https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
> [2]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip_endpoint_identifier_ip
> [3]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+PJSIP+Troubleshooting+Guide
>
>  Hope that helps,
>
>
> Thank you for answer. But...
> ones again: I have a lot of endpoints and registrations on same SIP
> server. And it's problem in pjsip now. Is not it?
>
> Simple Example. I have two trunks with their own credentials (and did) to
> the same sip server:
> - for home
> - for bussiness
>
> [home-example.com-endpoint]
>
> [bussiness-example.com-endpoint]
>
> [home-example.com-registration]
> contact_user=home-example.com-endpoint
>
> [bussiness-example.com-registration]
> contact_user=bussiness-example.com-endpoint
>
> ;and ok... i wrote identify by IP section
> [example.com-identify]
> type=identify
> match=example.com
> endpoint= ???
>
> It is very! important for me to know what trunk passes through the
> incoming call: home or bussiness.
> 1. Identify by IP. Do you have answer?
> 2. Identify by username. What? I can't make endpoints to all of my
> contacts.
>
> Ok. I can use contact_user in registraction and route incoming call by
> INVITE uri.
> Can i?
>
> Dmitriy Serov
>
>
>
I don't think I fully understand the scenario, but if you have different
named endpoints originating from the same address (or even different
addresses) then these can be identified by the username portion of the sip
uri. However, if you have endpoints for instance with the same name, but
different addresses then these can be distinguished by using the identity
type.

Your scenario looks like the first option. The endpoint names are
different, but the address is the same, so identification based on the
username should be sufficient.

However, if you have a mix of both types on your system, for instance
multiple endpoints on two different systems (IP addresses) with the same
names, then I am unsure how you would select the correct endpoint even
while attempting to "identify_by" uri.

-- 

Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] res_pjsip endpoint config object's 'identify_by' option needs new value "uri".

2015-03-06 Thread Kevin Harwell
On Fri, Mar 6, 2015 at 2:06 PM, Dmitriy Serov  wrote:

>  Hello.
>
> Asterisk 13.2.
> I transfer configs from chan_sip to res_pjsip.
> In chan_sip i have "match_auth_username=yes" and have nothing in pjsip.
>
> I have a lot of endpoints and registrations on same SIP server. And it's
> problem in pjsip now. Is not it?
>
> I requesting to add new value for endpoint option identify_by. The value
> 'uri'.
> Simple config (cutted):
>
> [siptrunk]
> type=registration
> transport=udp-transport
> outbound_auth=siptrunk
> server_uri=sip:sip.example.comclient_uri=sip:1234567...@sip.example.com
> retry_interval=60
> contact_user=siptrunk-in
>
> [siptrunk-in]
> type=endpoint
> transport=udp-transport
> context=from-trunk
> disallow=all
> allow=ulaw
> outbound_auth=siptrunk
> aors=siptrunk
> identify_by=uri
>
>
> Registration section has option "contact_user". Incoming call from this
> registration will be INVITE sip:siptrunk-in@
> I offer to change res_pjsip_endpoint_identifier_user to realize endpoint
> identification by sip uri.
>
> I think it will be usefull.
>
> P.S. i hope issues will be rejected:
> https://issues.asterisk.org/jira/browse/ASTERISK-22306 and SWP-6069
>
>
> Dmitriy Serov
>
> -
>

I believe what you are looking for is already available. See the "identify"
type (type=identify) section that is in the pjsip.conf file and the
"identify" option for endpoints. These allow you to identify and endpoint
by IP address.

For more information see the pjsip.conf.sample file.  Also take a look at
configuring Asterisk for res_pjsip [1] specifically the part about
configuring endpoint identification by IP address [2]. If you run into
problems more information can also be found in the res_pjsip
troubleshooting guide [3], specifically the section on "identify by IP
address"

[1] https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
[2]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_pjsip_endpoint_identifier_ip
[3]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+PJSIP+Troubleshooting+Guide

Hope that helps,

-- 

Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] sip.conf to pjsip.conf conversion script

2014-10-28 Thread Kevin Harwell
On Mon, Oct 27, 2014 at 6:35 PM, John Kiniston 
wrote:

> Howdy,
>
> I'm trying to get my feet wet with pjsip using the conversion script
> mentioned on the Wiki on this page:
>
>
> https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
>
> I'm using the copy of the script that's included with Asterisk 13
>
> /usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip
>
> I assume I run it from /etc/asterisk with the input and output file as
> arguments however there's no instructions and I don't Grok python.
>
> Unfortunately it's not working, Despite what the below error states I do
> have a udpbindaddr set to 0.0.0.0  in my configuration.
>
> root@kiniston01:/etc/asterisk#
> /usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
> sip.conf pjsip.conf
> Traceback (most recent call last):
>   File
> "/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py",
> line 1158, in 
> pjsip, non_mappings = convert(sip, pjsip_filename, dict(), False)
>   File
> "/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py",
> line 1090, in convert
> map_transports(sip, pjsip, nmapped)
>   File
> "/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py",
> line 817, in map_transports
> create_udp(sip, pjsip, nmapped)
>   File
> "/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py",
> line 590, in create_udp
> bind = sip.multi_get('general', ['udpbindaddr', 'bindaddr'])[0]
>   File
> "/usr/src/asterisk-13.0.0/contrib/scripts/sip_to_pjsip/astconfigparser.py",
> line 407, in multi_get
> (key_list, section))
> LookupError: keys ['udpbindaddr', 'bindaddr'] not found for section
> 'general'
>

Based on the error I am guessing that you don't have the option
'udpbindaddr' or 'bindaddr' specified in the 'general' section of your
sip.conf.  If you add one of those options to the 'general' configuration
section in your sip.conf it should hopefully work around the issue.

However, the script shouldn't error out in such a manner, so please file an
issue [1] to the bug tracker and be sure to mention the documentation too
since that should be updated as well.  Asterisk issue guidelines can be
found at the following [2].

[1] https://issues.asterisk.org/jira
[2]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-Submittingthebugreport



>
> I've not turned up anything useful with Google so the mailing list is my
> next step.
>
> I can provide my configuration if needed however it is just the stock
> sip.conf with a phone and two trunks added at the bottom.
>
> Thanks!
> --
> A human being should be able to change a diaper, plan an invasion, butcher
> a hog, conn a ship, design a building, write a sonnet, balance accounts,
> build a wall, set a bone, comfort the dying, take orders, give orders,
> cooperate, act alone, solve equations, analyze a new problem, pitch manure,
> program a computer, cook a tasty meal, fight efficiently, die gallantly.
> Specialization is for insects.
> ---Heinlein
>
> --
> _________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>


Thanks,
-- 

Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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