Asterisk: WebRTC no audio - audio

I'm having what is probably a simple configuration issue. Calls between two SIP clients (zoiper) are successful.
When I start a call between a WebRTC client (sipml5) and a SIP client (Zoiper) is the connection active, but there is no audio in both directions available.
So, I have latest Asterisk 16, latest Chrome (with Firefox & Chrome Beta the same problem), sipml5 and a local network - no nat or firewall.
Any ideas on what we may be doing wrong? Thank you in advance for any help!
/etc/asterisk/sip.conf
[general]
realm=192.168.11.31;
udpbindaddr=192.168.11.31;
transport=udp
[1060] ; This will be WebRTC client
type=friend
username=1060
host=dynamic
secret=password
encryption=yes
avpf=yes
icesupport=yes
context=default
directmedia=no
transport=udp,ws,wss;
force_avp=yes
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/cert/asterisk.pem
dtlssetup=actpass
rtcp_mux=yes
[6002] ; This will be the legacy SIP client
type=friend
username=6002
host=dynamic
secret=password
context=default
[6001]
type=friend
username=6001
host=dynamic
secret=password
context=default
/etc/asterisk/extensions.conf
[default]
exten => 1060,1,Dial(SIP/1060)
exten => 6002,1,Dial(SIP/6002)
exten => 6001,1,Dial(SIP/6001)

SOLVED: The problem was an AD-Block Plugin.

Related

Using com2tcp-rfc2217.bat on Windows and uploading to COM5 via WSL2 (ESP8266) and platform.io not working

Setup on Windows
ESP8266 connected to COM5 port
.\com2tcp-rfc2217.bat COM5 4444
D:\Downloads\hub4com-2.1.0.0-386>"hub4com" --create-filter=escparse,com,parse --create-filter=purge,com,purge --create-filter=pinmap,com,pinmap:"--rts=cts --dtr=dsr --break=break" --create-filter=linectl,com,lc:"--br=remote --lc=remote" --add-filters=0:com --create-filter=telnet,tcp,telnet:" --comport=server --suppress-echo=yes" --create-filter=lsrmap,tcp,lsrmap --create-filter=pinmap,tcp,pinmap:"--cts=cts --dsr=dsr --dcd=dcd --ring=ring" --create-filter=linectl,tcp,lc:"--br=local --lc=local" --add-filters=1:tcp --baud=115200 --octs=off "COM5" --use-driver=tcp "*4444"
COM5 Open("COM5", baud=115200, data=8, parity=no, stop=1, octs=off, odsr=off, ox=off, ix=off, idsr=off, ito=0) - OK
Route data TCP(1) --> COM5(0)
Route data COM5(0) --> TCP(1)
Route flow control TCP(1) --> COM5(0)
Route flow control COM5(0) --> TCP(1)
Filters:
_______
\->{telnet.IN}-------------------------------------------->
TCP(1) | /
_______/<-----{telnet.OUT}<-{lsrmap.OUT}<-{pinmap.OUT}<-{lc.OUT}<-
________
\->{parse.IN}------------------------------>
COM5(0) | /
________/<-----{purge.OUT}<-{pinmap.OUT}<-{lc.OUT}<-
Started COM5(0)
Socket(0.0.0.0:4444) = 204
Listen(204) - OK
Started TCP(1)
Setup on WSL2
VSCode Remote for WSL installed and running fine
platform.io extension in VSCode installed and running
platformio.ini
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
platform_packages =
framework-arduinoespressif8266 # https://github.com/esp8266/Arduino.git
lib_deps = ESP Async WebServer
build_unflags = -std=gnu++17 -std=c17
build_flags = -std=gnu99 -std=c++11
monitor_port=socket://192.168.1.100:4444
monitor_speed=115200
upload_speed=115200
upload_port=socket://192.168.1.100:4444
Problem
I cannot upload anything to the ESP8266
Connecting........_____
When using upload_port=rfc2217://192.168.1.100:4444 the error is:
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
When using upload_port=socket://192.168.1.100:4444the error is:
A fatal error occurred: Failed to connect to ESP8266: Invalid head of packet (0x6F)
What works
I can open up the serial monitor and view the serial output of the ESP8266 just fine. So the ports and the baud-rates seem fine to me.
What am I missing here?
I managed to solve it.
For some reason, the ESP8266 is not automatically switching to flash-mode while uploading via rfc2217. I had to put it in flash-mode manually by holding flash-button and pressing reset button while the Connecting...___ shows up.

I cannot find the cause of this WARN (logstash): "Invalid version of beats protocol"

Dear Stackoverflow commmunity,
I would like to know why I'm staked at this problem with logstash:
2021-01-20T01:02:33,444][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2021-01-20T01:02:41,603][INFO ][org.logstash.beats.BeatsHandler][synlite_suricata][input_beats] [local: 10.0.100.12:5044, remote: 10.0.100.1:39666] Handling exception: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 22
[2021-01-20T01:02:41,614][WARN ][io.netty.channel.DefaultChannelPipeline][synlite_suricata][input_beats] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 22
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 22
at org.logstash.beats.Protocol.version(Protocol.java:22) ~[logstash-input-beats-6.0.9.jar:?]
at org.logstash.beats.BeatsParser.decode(BeatsParser.java:62) ~[logstash-input-beats-6.0.9.jar:?]
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
... 8 more
[2021-01-20T01:02:41,637][INFO ][org.logstash.beats.BeatsHandler][synlite_suricata][input_beats] [local: 10.0.100.12:5044, remote: 10.0.100.1:39666] Handling exception: org.logstash.beats.InvalidFrameProtocolException: Invalid version of beats protocol: 3
[2021-01-20T01:02:41,639][WARN ][io.netty.channel.DefaultChannelPipeline][synlite_suricata][input_beats] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
I found similar topics, but I cannot find a clear explaination...
Logstash beats input "invalid version of beats protocol"
Mock an ELK Beat output to Logstash with Postman
I can share my config:
pipelines.yml:
- pipeline.id: synlite_suricata
path.config: "/etc/logstash/synlite_suricata/conf.d/*.conf"
- pipeline.id: fallback
path.config: "/etc/logstash/fallback/conf.d/*.conf"
synlite_suricata input:
input {
# Beats
beats {
id => "input_beats"
host => "${SYNLITE_SURICATA_BEATS_HOST}"
port => "${SYNLITE_SURICATA_BEATS_PORT}"
client_inactivity_timeout => 180
ssl => false
ssl_certificate_authorities => "${SYNLITE_SURICATA_CACERT}"
ssl_certificate => "${SYNLITE_SURICATA_BEATS_CERT}"
ssl_key => "${SYNLITE_SURICATA_BEATS_KEY}"
ssl_verify_mode => "peer"
ssl_peer_metadata => true
tls_min_version => 1.2
cipher_suites => [ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" ]
}
}
and the systemd variables in /etc/systemd/system/logstash.service.d/synlite_suricata.conf:
[Service]
# Synesis Lite for Suricata global configuration
Environment="SYNLITE_SURICATA_DICT_PATH=/etc/logstash/synlite_suricata/dictionaries"
Environment="SYNLITE_SURICATA_TEMPLATE_PATH=/etc/logstash/synlite_suricata/templates"
Environment="SYNLITE_SURICATA_GEOIP_DB_PATH=/etc/logstash/synlite_suricata/geoipdbs"
Environment="SYNLITE_SURICATA_GEOIP_CACHE_SIZE=8192"
Environment="SYNLITE_SURICATA_GEOIP_LOOKUP=true"
Environment="SYNLITE_SURICATA_ASN_LOOKUP=true"
Environment="SYNLITE_SURICATA_CLEANUP_SIGS=false"
# Name resolution option
Environment="SYNLITE_SURICATA_RESOLVE_IP2HOST=false"
Environment="SYNLITE_SURICATA_NAMESERVER=127.0.0.1"
Environment="SYNLITE_SURICATA_DNS_HIT_CACHE_SIZE=25000"
Environment="SYNLITE_SURICATA_DNS_HIT_CACHE_TTL=900"
Environment="SYNLITE_SURICATA_DNS_FAILED_CACHE_SIZE=75000"
Environment="SYNLITE_SURICATA_DNS_FAILED_CACHE_TTL=3600"
# Elasticsearch connection settings
Environment="SYNLITE_SURICATA_ES_HOST=10.0.100.11"
Environment="SYNLITE_SURICATA_ES_USER=logstash"
Environment="SYNLITE_SURICATA_ES_PASSWD=password"
# Beats input
Environment="SYNLITE_SURICATA_BEATS_HOST=10.0.100.12"
Environment="SYNLITE_SURICATA_BEATS_PORT=5044"
# Certs config
Environment="SYNLITE_SURICATA_CACERT=/etc/logstash/tls/root-ca.crt"
Environment="SYNLITE_SURICATA_BEATS_CERT=/etc/logstash/tls/logstash-input-server.crt"
Environment="SYNLITE_SURICATA_BEATS_KEY=/etc/logstash/tls/logstash-input-server.pk8"
Environment="SYNLITE_SURICATA_ES_KEYSTORE=/etc/logstash/tls/logstash-elasticsearch-output-client.p12"
Environment="SYNLITE_SURICATA_ES_KEYSTORE_PASSWORD=password"
I don't know how to find and information related with "beat version"... Logstash-oss 7.8.0
Thanks, waiting for your attention
Typically this is caused by something connecting to the beats input that is not talking the beats (lumberjack) protocol. The input is basically saying that a byte in certain position in the byte stream has a value it cannot understand. There can be many reasons for this.
To identify the cause you will need to find the program that has
remote: 10.0.100.1:39666
open and examine what it is sending you. tcpdump might help. Possible causes include (but are certainly not limited to):
A beat being configured to use SSL but the input is not
The beat input is expecting SSL but filebeat does not have it
configured
If you are on a corporate network the corporate security folks may be
running port scans against every internal IP address and trying to
connect to every TCP port (possibly hundreds of millions of ports
each week) and checking if it responds to HTTP or a number of other
protocols that might be security weaknesses if not properly secured.
If that address is on the internet (unlikely, since it is a private
address, but you might have obfuscated the message) then I can
guarantee that Shodan and many others are port scanning you.
Another possibility is commenting out the elasticsearch hosts: entry in filebeat.yml (but not the elasticsearch: entry) and then uncommenting the logstash hosts: entry (but not the logstash: entry). This results in the beat trying to talk HTTP to the beats input, which will throw this exception.
Very helpful, thanks!
I will explore with tcpdump. I am under a private network using Wireguard tunel.

gstreamer rtsp client connection refused error

I have installed Gstreamer on my i.MX6 board. I want to stream the camera connected using RTSP.
The following command displays the camera content on the LVDS screen:
gst-launch tvsrc ! Imxv4vl2sink
Instead of displaying it on the screen, I want to send the content over network RTSP and display it on other device's display
I used the following command to start streaming which works without throwing any error
gst-launch-0.10 -vv imxv4l2src ! video/x-raw-yuv, framerate=30/1, width=1024
, height=768 ! vpuenc codec=avc ! rtph264pay ! udpsink host=127.0.0.1 port=5004
sync=false
On the other device, I executed the following command:
gst-launch rtspsrc location=rtsp://<ip Address>:5004 name=source ! queue ! rtph264depay !
vpudec low-latency=true ! imxv4l2sink
It fails with the following error:
gstrtspsrc.c(5685): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:source:
Failed to connect. (System error: Connection refused)
I can ping from the other device to the streaming device.
What can be the issue?
You are sending RTP over UDP, but do not provide any RTSP protocol. So your receiver which tries to connect via RTSP will fail. You either need to use the GstRTSPServer class and implement some logic as an application on the sender side or receive your data via udpsrc. For the latter you still need a way to transmit SDP data (which usually is one thing an RTSP server does).

Not able to connect to Hipchat with errbot ? getting permission denied for socket .

While connect error bot with self hosted . Getting this error while doing it -
10:40:34 DEBUG sleekxmpp.xmlstream.xmlst RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
10:40:34 DEBUG sleekxmpp.features.featur Starting TLS
10:40:34 INFO sleekxmpp.xmlstream.xmlst Negotiating TLS
10:40:34 INFO sleekxmpp.xmlstream.xmlst Using SSL version: TLSv1
10:40:34 DEBUG sleekxmpp.xmlstream.xmlst Event triggered: socket_error
10:40:34 ERROR sleekxmpp.xmlstream.xmlst **Socket Error #13: Permission denied**
10:40:34 DEBUG sleekxmpp.xmlstream.xmlst reconnecting...
This is config which i am using for same .
BACKEND = 'Hipchat' # Errbot will start in text mode (console only mode) and will answer commands from there.
BOT_DATA_DIR = r'/Users/XXX/errbot/errbot/data'
BOT_EXTRA_PLUGIN_DIR = '/Users/XXXX/errbot/errbot/plugins'
BOT_LOG_FILE = r'/Users/XXXX/errbot/errbot/errbot.log'
BOT_LOG_LEVEL = logging.DEBUG
BOT_ADMINS = ('#XXXXX', ) # !! Don't leave that to "CHANGE ME" if you connect your errbot to a chat system !!
# The identity, or credentials, used to connect to a server
BOT_IDENTITY = {
'username': 'XXXX', # The JID of the user you have created for the bot
'password': 'XXXXX', # The corresponding password for this user
'token': 'XXXXXX',
'endpoint' : 'https://xxxx.xxxx.com',
}
Can someone please let me know what i am doing wrong in above config ?
Or please also suggest any other bot (in python) that works with self hosted Hipchat .
Hipchat Server removed external access to the XMPP ports on the 2.0.7 release, in favor of supporting only communication over port 443 (using XMPP's BOSH protocol).
Depending on your server version, you might be able to enable them back by running hipchat network --enable-xmpp-ports.
https://confluence.atlassian.com/hipchatkb/external-xmpp-ports-5222-5223-disabled-by-default-in-hipchat-server-2-0-7-859442760.html has more information on this topic.

WiFi P2P with Android using wpa_cli in linux

I am trying to establish connection between my laptop and Android device using wpa_cli.
I tried differen combinations of wpa_cli commands to connect but coud not do so.
The commands I am running on my laptop are as follows:
First combination:
p2p_find 10
Output:P2P-DEVICE-FOUND -------
p2p_peers
Output: Android device addr -------
p2p_prov_disc pbc
Output: My laptop is visible on android peer devices list -------
p2p_group_add
Output: AP-ENABLED -------
wps_pbc
Output: WPS-PBC-ACTIVE -------
After running these commands, I am getting following error:
*"P2P-DEVICE-LOST p2p_dev_addr=-----
WPS-TIMEOUT"*
Second combination:
p2p_find 10
Output:P2P-DEVICE-FOUND -------
p2p_prov_disc pbc auto
Output: My laptop is visible on android peer devices list -------
p2p_connect pbc go_intent=15
Output: On Android device the connection state changes to INVITED -------
I am not sure, if I am missing something.
Any help ??
Thanks.
I just fixed the same issue. wpa_supplicant by default doesn't not enable wifi-p2p when compiled.
After re-compile and run wpa_supplicant with these lines 28-37:
https://android.googlesource.com/platform/external/wpa_supplicant_8/+/ics-plus-aosp/wpa_supplicant/README-P2P#28
then it was solved for me.
Hope it will help someone!

Resources