Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
2739 views
Asterisk v13 on Kali Linux: No RTP engine was found. Do you have one loaded?
I installed Asterisk and tried to make a call with zoiper but I get an error [call failure 401 forbidden] and Asterisk return this message : Connected to Asterisk UNKNOWN__and_probably_unsupported currently running on kali (pid = 14877) [Jan 22 17:57:00] ERROR[14937][C-00000007]: rtp_engine.c:401 as...
I installed Asterisk and tried to make a call with zoiper but I get an error [call failure 401 forbidden] and Asterisk return this message : Connected to Asterisk UNKNOWN__and_probably_unsupported currently running on kali (pid = 14877) [Jan 22 17:57:00] ERROR[C-00000007]: rtp_engine.c:401 ast_rtp_instance_new: No RTP engine was found. Do you have one loaded? [Jan 22 17:57:00] NOTICE[C-00000007]: chan_sip.c:25550 handle_request_invite: Failed to authenticate device ;tag=9a473a54 I opened the menuselect and selected res_rtp_asterisk. When I try to reinstall (recompile!) Asterisk, I do ./configure This says it's ok! But when I put make or make install, I get this error: CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts make: Entering directory `/etc/asterisk/asterisk/menuselect' make: `makeopts' is up to date. make: Leaving directory `/etc/asterisk/asterisk/menuselect' [CC] res_rtp_asterisk.c -> res_rtp_asterisk.o res_rtp_asterisk.c: In function ‘ice_create’: res_rtp_asterisk.c:2421:4: error: too many arguments to function ‘pj_ice_sess_create’ In file included from /usr/include/pjnath.h:23:0, from res_rtp_asterisk.c:53: /usr/include/pjnath/ice_session.h:736:22: note: declared here make: *** [res_rtp_asterisk.o] Error 1 make: *** [res] Error
Y. Dabbous (67 rep)
Jan 23, 2016, 12:55 PM • Last activity: May 13, 2025, 01:07 PM
1 votes
2 answers
4027 views
No module named 'PyQt4.sip'
So, I have a .py file: from PyQt4.QtGui import * from PyQt4.QtCore import * When I'm executing it - I have this error message: Traceback (most recent call last): File "kek.py", line 1, in from PyQt4.QtGui import * ModuleNotFoundError: No module named 'PyQt4.sip' I've tried to install **sip** itself,...
So, I have a .py file: from PyQt4.QtGui import * from PyQt4.QtCore import * When I'm executing it - I have this error message: Traceback (most recent call last): File "kek.py", line 1, in from PyQt4.QtGui import * ModuleNotFoundError: No module named 'PyQt4.sip' I've tried to install **sip** itself, I've installed **Qt4**, **PyQt4** and it doesn't works. Help me, guys
Curlindus (13 rep)
Dec 21, 2019, 09:05 AM • Last activity: Sep 7, 2023, 12:51 PM
0 votes
2 answers
1537 views
Iptables (port forwarding from vps openvpn server to vpn client)
I install openvpn server in Centos VPS. I can connect from my pfsense router. I forwrad rdp a port to my local pc, but can not forward rtp port. iptables -t nat -A PREROUTING -p tcp -m tcp --dport 3389 -j DNAT --to-destination 10.8.0.19 iptables -t nat -A PREROUTING -p udp --dport 10000:20000 -j DNA...
I install openvpn server in Centos VPS. I can connect from my pfsense router. I forwrad rdp a port to my local pc, but can not forward rtp port. iptables -t nat -A PREROUTING -p tcp -m tcp --dport 3389 -j DNAT --to-destination 10.8.0.19 iptables -t nat -A PREROUTING -p udp --dport 10000:20000 -j DNAT --to 10.8.0.19 iptables -t filter -A FORWARD -p udp -d 10.8.0.19 --dport 10000:20000 -j ACCEPT
Khandaker Shahriar Amin (11 rep)
Apr 7, 2018, 03:34 PM • Last activity: Jan 1, 2023, 08:07 AM
1 votes
0 answers
620 views
NodeJS child_process.spawn() behaving different when run as systemd service on Debian 10
I am working on a NodeJS application, that runs expressJS and uses twinkle to dial a telephonenumber. Given the following function: export const call = (telNr: string, res: Response|undefined = undefined) => { const endOfLine = require("os").EOL; const process = spawn("/usr/bin/twinkle", ["-c"], {sh...
I am working on a NodeJS application, that runs expressJS and uses twinkle to dial a telephonenumber. Given the following function: export const call = (telNr: string, res: Response|undefined = undefined) => { const endOfLine = require("os").EOL; const process = spawn("/usr/bin/twinkle", ["-c"], {shell: true}); let registered = false; process.stdout.on("data", (data) => { if (/registration succeeded/.test(data.toString())) { if (!registered) { registered = true; process.stdin.write("call " + telNr + endOfLine); setTimeout(() => { try { process.stdin.write("bye" + endOfLine); process.stdin.write("exit" + endOfLine); } catch { // War schon zu } }, 10000); } // Else -> Scheint das zweite mal ausgegeben zu werden. } if (/486 Busy here/.test(data.toString())) { // Belegt process.stdin.write("exit" + endOfLine); } }); process.on("exit", (exit) => { if (res !== undefined) { res.json({code: exit}); } }); }; The function is for debugging purposes called via an url (that's why there's the optional res-parameter. ***now to the problem*** When I start the app as root with node index.js, and open the given URL the wanted SIP-Phone rings for 10 seconds. When the app is started as service via systemd, the childprocess is immediately closed with exitcode 134. systemd-unit: [Unit] Description=Besuchermanagement Server After=network.target [Service] Type=simple ExecStart=/usr/bin/node /srv/node/besuchermanagement/dist/index.js Restart=on-failure [Install] WantedBy=multi-user.target I hope this isn't offtopic, since I am not sure if this problem is related to my code, or a misconfiguration of my service in systemd. Thanks in advance!
Marcel Kohlmeyer (51 rep)
Jan 27, 2020, 09:24 AM • Last activity: Aug 2, 2022, 07:56 AM
0 votes
0 answers
667 views
Openwrt and sipproxy why I am unable to perform a call via a softphone?
I have setup in my router openwrt and I try to perform a call using my provider's VOIP settings that I retrieved for its router that provided. My network settings are the following: ``` config interface 'loopback' option device 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255...
I have setup in my router openwrt and I try to perform a call using my provider's VOIP settings that I retrieved for its router that provided. My network settings are the following:
config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdd2:a40d:d919::/48'


config device 'wan_dsl0_dev'
	option name 'dsl0'
	option macaddr XX:XX:XX:XX:XX:XX

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'b'
	option ds_snr_offset '0'
        option line_mode 'vdsl'
        option tone 'auto'        
        option firmware '/lib/firmware/vr9-B-dsl.bin' 

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
    option device 'dsl0.835'
	option proto 'pppoe'
	option username 'username'
	option password 'password'
    option ipv6 'none'
    option keepalive '10'
    option mtu '1492'
	list dns '1.1.1.1'
    option peerdns '0'

config interface voip
	option device 'dsl0.837'
	option proto 'dhcp'

config interface 'wan6'
	option device '@wan'
	option proto 'dhcpv6'
As you can see, voip uses the vlan dsl0.837. Also, I have configured the siproxy like that as well:
config siproxd general
	# Custom options allow using OpenWRT network names, and defaults should
	# work out-of-the-box. If your SIP devices do not REGISTER externally,
	# you may also need to open firewall ports: tcp/udp 5060, udp 7070-7089.

	option interface_inbound lan
#	option interface_outbound dsl0.837

# All other documented siproxd configuration directives are supported. Use
# a UCI 'option' for single-instance directives, and UCI 'list' entries for
# directives that allow multiple instances, per the examples below.

	# Define low-level network devices, overriding interface_in/outbound:
#	option if_inbound eth0
	option if_outbound dsl0.837


	# Enable DEBUG logging for configuration messages:
#	option debug_level 0x00000100
#	option silence_log 0

	# Load two plugins: one that logs SIP call details to syslog, and one
	# that strips out G.729, GSM codecs:
#	list load_plugin 'plugin_logcall.so'
#	list load_plugin 'plugin_codecfilter.so'
#	list plugin_codecfilter_blacklist G729
#	list plugin_codecfilter_blacklist GSM

daemonize 1
masked_host=ngn.hol.net
outbound_proxy_host = ngn.hol.net
outbound_proxy_port = 5060
Then In my computer connected via ethernet to the LAN has ekiga configured like that: Ekiga settings But despite successfully connecting to voip, I am unable to perform a call to my cellphone (my provider offers landline call via SIP/VOIP). My provider is Vodafone in Greece. I attempted ta call sip:^my_cellphone_number^@192.168.1.1 (router's ip) but I am unable to do so. So do you know why? My firewall settings are the following as well:
config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108 
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-VOIP
	option src		lan
	option proto		udp	
	option src_port		5060
	option family           ipv4            
        option target           ACCEPT

config rule                            
        option name             Allow-VOIP  
        option src              lan       
        option proto            udp               
        option src_port         7070-7080            
        option family           ipv4      
        option target           ACCEPT     

# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381 
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option src_ip		fc00::/6
	option dest_ip		fc00::/6
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
	option name		Support-UDP-Traceroute
	option src		wan
	option dest_port	33434:33689
	option proto		udp
	option family		ipv4
	option target		REJECT
	option enabled		false
Do I also need to open extra ports as well?
Dimitrios Desyllas (1301 rep)
Aug 16, 2021, 09:39 PM • Last activity: Aug 17, 2021, 12:26 AM
1 votes
2 answers
14416 views
Installing pyqt5 on linux failed due to SIP dependency
I am trying to install `pyqt5` on linux; $ cat /proc/version Linux version 4.11.4-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Jun 7 12:18:44 EDT 2017 I got by the `python3` and `pip3` installation (with lots of difficulties), and when I...
I am trying to install pyqt5 on linux; $ cat /proc/version Linux version 4.11.4-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Jun 7 12:18:44 EDT 2017 I got by the python3 and pip3 installation (with lots of difficulties), and when I finally got to do: sudo pip3 install pyqt5, I get: Collecting pyqt5 Using cached PyQt5-5.8-5.8.0-cp34.cp35.cp36.cp37-abi3-manylinux1_x86_64.whl Collecting sip>=4.19.1 (from pyqt5) Could not find a version that satisfies the requirement sip>=4.19.1 (from pyqt5) (from versions: ) No matching distribution found for sip>=4.19.1 (from pyqt5) I understand that sip 4.19.1 is a dependency (why can't pip3 install it automatically?), so I tried installing it with sudo yum install sip, hoping to get the latest sip, but instead I got: Package sip-4.14.6-4.el7.x86_64 already installed and latest version but 4.14.6 is not the latest, and doing sudo yum update sip did not help: No packages marked for update I found the latest installation of sip online: http://pyqt.sourceforge.net/Docs/sip4/installation.html But I'd rather installing it through command line by simply issuing sudo yum install $WHATEVER (because later I want to have the entire pyqt5 installation packed into a simple script). What should I update in order for yum to find and install the latest sip (4.19.7)? **EDIT** Per @Norrius request in the comments, this is what I get: $ sudo pip3 install SIP Collecting SIP Could not find a version that satisfies the requirement SIP (from versions: ) No matching distribution found for SIP $ python3 --version Python 3.4.5
so.very.tired (227 rep)
Jan 27, 2018, 10:08 AM • Last activity: Jun 17, 2021, 11:56 AM
1 votes
1 answers
654 views
IPTables to limit high "Call-Per-Second" and redirect to another program (same machine)
I'm looking for a way to "control" high volume of SIP VoIP INVITEs (UDP) per second (Call Per Seconds) at iptables level in my VoIP server reaching port 5060. What i need to do is limit amount of INVITE's per second to a certain rate (for example 20 cps), if i receive a high volume of CPS to the ser...

I'm looking for a way to "control" high volume of SIP VoIP INVITEs (UDP) per second (Call Per Seconds) at iptables level in my VoIP server reaching port 5060.
What i need to do is limit amount of INVITE's per second to a certain rate (for example 20 cps), if i receive a high volume of CPS to the server, i need to redirect them to another port (for example UDP/5090) in the same machine where another program is runnig, to answer them with SIP message "603 Decline". Is this possible?
So far i'm a little bit lost with a lot of answers to similar questions... do i need to use --limit?, connlimit?, hitcount??...
Along with this, is possible to do this by source ip address?
Conceptually I was thinking something like this... if is possible:
INPUT iptables --append INPUT --match conntrack --ctstate NEW --jump RATE-LIMIT RATE-LIMIT iptables --append RATE-LIMIT --match limit --limit 20/sec --limit-burst 20 --jump ACCEPT iptables --append RATE-LIMIT --jump DECLINE-INVITE DECLINE-INVITE iptables --append DECLINE-INVITE [how to redirect to port udp 5090] Thanks! Ricardo
Ricardo (11 rep)
May 3, 2021, 08:02 PM • Last activity: May 3, 2021, 10:26 PM
1 votes
1 answers
1632 views
FreePBX No connection to Asterisk
I am new to asterisk and freePBX. I set up a server years ago but it was very basic and used for less than a month. I’m now launching a new company and found myself in need of a VOIP system so I’m back to asterisk. I installed asterisk on my debian VPS, then installed free PBX. At first i was having...
I am new to asterisk and freePBX. I set up a server years ago but it was very basic and used for less than a month. I’m now launching a new company and found myself in need of a VOIP system so I’m back to asterisk. I installed asterisk on my debian VPS, then installed free PBX. At first i was having issues with getting the freePBX installer to find my asterisk server. After creating an aserisk user on debian and changing the run user-group in /etc/default/asterisk the installer worked. After the FreePBX installation, localhost/ was redirecting to localhost/admin/config.php but was only showing a blank screen. After running fwconsole ma installall the page started working. Despite that, connection to asterisk cannot be established. Running fwconsole start works just fine, but when running fwconsole restart I get get UCP Node Server is not running. When running fwconsole restart again I get Core FastAGI Server is not running & UCP Node Server is not running. **After checking logs for freepbx I found this:**
[2020-Nov-23 14:42:32] [freepbx.INFO]: Connection attmempt to AMI failed [] []
**The UCP error log in asterisk yielded this:**
2020-11-23 13:40 +00:00: { [Error: Can’t connect to MySQL server on ‘::1’ (111 “Connection refused”)] code: 2003 }

2020-11-23 13:40 +00:00: There was an error with MySQL Connection
**ucp_out.log in asterisk displays this:**
2020-11-23 13:40 +00:00: Starting FreePBX…
2020-11-23 13:40 +00:00: { AMPDBUSER: ‘freepbxuser’,
2020-11-23 13:40 +00:00: AMPDBPASS: ‘****’,
2020-11-23 13:40 +00:00: AMPDBHOST: ‘localhost’,
2020-11-23 13:40 +00:00: AMPDBNAME: ‘asterisk’,
2020-11-23 13:40 +00:00: AMPDBENGINE: ‘mysql’,
2020-11-23 13:40 +00:00: datasource: ‘’ }
I am using mariadb, is there a way maybe this user or database does not exist? Thank you for your help! --- Forgot to mention that when accessing Advanced Setting in FreePBX I get a blank page. enter image description here
dnld (21 rep)
Nov 23, 2020, 01:52 PM • Last activity: Dec 6, 2020, 03:09 PM
1 votes
1 answers
1667 views
NAT configuration for EIP (Elastic IP) in Asterisk
When running Asterisk on Amazon EC2 with an EIP, what are the NAT configurations for Asterisk? [general] nat=yes externip=xxx.yyy.zzz.vvv localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation local...
When running Asterisk on Amazon EC2 with an EIP, what are the NAT configurations for Asterisk? [general] nat=yes externip=xxx.yyy.zzz.vvv localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation localnet=169.254.0.0/255.255.0.0 ; Zero conf local network Apparently, EIC uses NAT : > If your EC2 instance is in a private subnet in your VPC, then it can > use your NAT to make outbound connections. The outside world would see > it's IP address as your NAT's IP address, but the NAT's IP address > would never "be" the Public IP address of the instance. Overview of how EIP works : > Before going into an example, let's review how the Elastic IPs work: ... > Remember that each instance has an internal IP address and an > external (public) one, which is translated to the internal one. If two > external IPs were translated to the same internal IP then inbound > packets would arrive fine, but sorting out outgoing packets (i.e. > determining which external IP address to assign to outgoing packets) > would be very difficult. Hence, the limitation of a single external IP > address per instance at any given point in time. wikipedia (for my reference): > Elastic IP addresses Amazon Elastic IP > > Amazon's elastic IP address feature is similar to static IP address in > traditional data centers, with one key difference. A user can > programmatically map an elastic IP address to any virtual machine > instance without a network administrator's help and without having to > wait for DNS to propagate the binding. In this sense an Elastic IP > Address belongs to the account and not to a virtual machine instance. > It exists until it is explicitly removed, and remains associated with > the account even while it is associated with no instance. > > Getting down to nuts and bolts, in the context of SIP and Asterisk : > > 1.3. Different types of NATs and firewalls. > > There are several ways UDP might be handled by a specific NAT or > firewall implementations, these are categorized into: > > 1.3.1 Full Cone NAT > > A full cone NAT is one where all requests from the same internal IP > address and port are mapped to the same external IP address and port. > Furthermore, any external host can send a packet to the internal host, > by sending a packet to the mapped external address. > > > > 1.3.2 Restricted Cone: > > A restricted cone NAT is one where all requests from the same internal > IP address and port are mapped to the same external IP address and > port. Unlike a full cone NAT, an external host (with IP address X) can > send a packet to the internal host only if the internal host had > previously sent a packet to IP address X. > > > > 1.3.3 Port Restricted Cone: > > A port restricted cone NAT is like a restricted cone NAT, but the > restriction includes port numbers. > > Specifically, an external host can send a packet, with source IP > address X and source port P, to the internal host only if the internal > host had previously sent a packet to IP address X and port P. > > > > 1.3.4 Symmetric Nat: > > A symmetric NAT is one where all requests from the same internal IP > address and port, to a specific destination IP address and port, are > mapped to the same external IP address and port. If the same host > sends a packet with the same source address and port, but to a > different destination, a different mapping is used. Furthermore, only > the external host that receives a packet can send a UDP packet back to > the internal host. It sounds like EIC uses "full cone" NAT. What would be the Asterisk settings for NAT, then?
Thufir (1970 rep)
Jan 5, 2017, 01:00 PM • Last activity: Apr 25, 2020, 12:59 AM
0 votes
1 answers
502 views
Dual Network Gateway on CentOS 6.7
I have dual NIC machine running CentOS 6.7 and asterisk. First NIC is for LAN & Internet connectivity and second is for trunk provider's connectivity. Both of these have gateways configured. I don't seem to be able to access the Internet as the traffic is routed thru the Second NIC's gateway, also t...
I have dual NIC machine running CentOS 6.7 and asterisk. First NIC is for LAN & Internet connectivity and second is for trunk provider's connectivity. Both of these have gateways configured. I don't seem to be able to access the Internet as the traffic is routed thru the Second NIC's gateway, also the second NIC is taken as default route by the kernel. I do not understand how default gateway is assigned in this case and what correction should I do. Eth0 Config: DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.0.1 NETMASK=255.255.255.0 GATEWAY=192.168.0.100 DNS1=8.8.8.8 DNS2=8.8.4.4 Eth1 Config: DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=static IPADDR=10.165.11.139 NETMASK=255.255.255.248 GATEWAY=10.165.11.137 Ping Internet ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. From 10.165.11.137 icmp_seq=1 Destination Net Unreachable Ping SIP Trunk ping 10.232.130.170 PING 10.232.130.170 (10.232.130.170) 56(84) bytes of data. 64 bytes from 10.232.130.170 (10.232.130.170): icmp_seq=1 ttl=253 time=3.14 ms Routing Table Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.165.11.136 * 255.255.255.248 U 0 0 0 eth1 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth0 link-local * 255.255.0.0 U 1003 0 0 eth1 default 10.165.11.137 0.0.0.0 UG 0 0 0 eth1
user1263746 (516 rep)
Jan 1, 2019, 06:29 PM • Last activity: Apr 17, 2019, 07:48 AM
2 votes
1 answers
1121 views
Configure network interfaces for sip trunk
I have a Debian 9.5 server that I'm trying to use as a PBX server with a sip trunk, this machine has two network interfaces, one pointing to LAN another one pointing to my sip provider. This is the configuration: iface LAN inet static address 192.168.1.247/24 gateway 192.168.1.254 # dns-* options ar...
I have a Debian 9.5 server that I'm trying to use as a PBX server with a sip trunk, this machine has two network interfaces, one pointing to LAN another one pointing to my sip provider. This is the configuration: iface LAN inet static address 192.168.1.247/24 gateway 192.168.1.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.1.254 allow-hotplug SIP iface SIP inet static address 172.xxx.xxx.xxx netmask 255.255.255.252 And a SIP server with IP: 172.xxx.xxx.xxx What I want to do is route all incoming trafic from my LAN that targets to my SIP server to it. I was trying adding this to SIP interface post-up ip route add [MySipServerIP] dev SIP src 192.168.1.0/24 table mgmt Another try: post-up ip route add [SIP ip] dev SIP src 192.168.1.0/24 table mgmt What is the right way to set this route?
Juan Pablo Gomez (131 rep)
Feb 12, 2019, 01:50 PM • Last activity: Feb 16, 2019, 02:46 PM
0 votes
1 answers
577 views
Logging of failed SIP calls (sipcmd) on a Linux box (Debian)
I have set up a little Raspberry Pi (with Debian 8) behind a router (Fritz!Box), which does check/analyse the connectivity or rather quality of service of a certain phone line per SIP calls. My phone line on the other side has an answering machine. Basically, I need to know, at which times the phone...
I have set up a little Raspberry Pi (with Debian 8) behind a router (Fritz!Box), which does check/analyse the connectivity or rather quality of service of a certain phone line per SIP calls. My phone line on the other side has an answering machine. Basically, I need to know, at which times the phone line is not reachable. In detail, the Raspberry calls said number three times a day, using the programme Sipcmd (https://github.com/tmakkonen/sipcmd) - see code below. Cronjob: 0 8,14,20 * * * /usr/bin/sipcmd -P sip -u abc -c cba -w 192.168.8.10 -x "c010101010101;ws45000;h" Now the calls work fine, but I need something like a logging into a text file, **when a call did not work or** rather, **when the phone number was not reachable**, so that it works like an alert system showing me only the failures. Anyone has got a solution for this?
vega (25 rep)
Oct 25, 2018, 09:47 AM • Last activity: Nov 6, 2018, 10:29 AM
2 votes
1 answers
6641 views
nf_conntrack_sip does not work SOMETIMES, restarting iptables USUALLY fixes it
I'm trying to use nf_conntrack_sip on box that is running Asterisk, that is, not routing traffic for another VoIP box. Setup works until I reboot. After reboot nf_conntrack_sip ALMOST always stops working and media traffic is dropped. conntrack --dump | grep -E 'sip|helper' # No output matching 'sip...
I'm trying to use nf_conntrack_sip on box that is running Asterisk, that is, not routing traffic for another VoIP box. Setup works until I reboot. After reboot nf_conntrack_sip ALMOST always stops working and media traffic is dropped. conntrack --dump | grep -E 'sip|helper' # No output matching 'sip' nor 'helper' while a call is in progress (albeit no audio) The iptables rules are loaded correctly confirmed by iptables-save. Then I do systemctl restart iptables and 9/10 times that fixes it. If it does not then I restart repeat the iptables restart. conntrack --dump | grep -E 'sip|helper' conntrack v1.4.4 (conntrack-tools): 9 flow entries have been shown. udp 17 3597 src=10.7.0.38 dst=10.47.1.11 sport=5063 dport=5060 src=10.47.1.11 dst=10.7.0.38 sport=5060 dport=5063 [ASSURED] mark=0 secctx=system_u:object_r:unlabeled_t:s0 helper=sip use=2 Simply reloading the rules with iptables-restore < /etc/sysconfig/iptables does not help. I suspect unloading/loading conntrack or some modules does the trick. Occasionally it does work at boot, but very rare. Asterisk start quickly. Giving it more time to "finish starting something" does not help. Update: restarting iptables while nf_conntrack_sip is working as expected, can, rarely, break it. **The setup:** Update: Initially the problem was described as occurring on a VM, but since then I reinstalled onto real hardware (i5-6500 CPU @ 3.20GHz with 8Gb RAM) with exactly the same problem still occurring. All identical packages (same provision script) as the initial VM. The OS is CentOS-7.4 Minimal + updates, kernel 3.10.0-693.21.1.el7.x86_64. It is all installed from RPMs, no custom kernels nor modules. Update: I also did yum update to latest stable packages and kernel available from CentOS at 2018-08-10. The problem persists. I did yum autoremove firewalld and yum install iptables-services. Diffs to /etc/sysconfig/iptables-config (other values are defaults by RPM) -IPTABLES_MODULES="" +IPTABLES_MODULES="nf_conntrack_sip" Added file /etc/modprobe.d/nf_conntrack.conf: options nf_conntrack nf_conntrack_helper=0 The entire /etc/sysconfig/iptables is very simple: *raw -A PREROUTING -p udp --dport 5060 -j CT --helper sip COMMIT *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -p udp -m state --state NEW -m udp --dport 5060 -j ACCEPT -A INPUT -j LOG --log-level 7 --log-prefix "REJECT in filter.INPUT:" -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT Update: Setting module options options nf_conntrack nf_conntrack_helper=1 and NOT using the iptables rule ... -j CT --helper sip does NOT fix it and the behavior remains non-deterministic. Not relevant to the problem, only to confirm that packets are dropped, as opposed to having NAT issues, /etc/rsyslog.d/kern-debug.conf kern.=debug /var/log/kernel-debug Testing with a Cisco SPA504G phone that dials into the PBX and gets hold music. Not trying to do anything complicated with media. SIP signalling and Media are exchanged with same IPv4 address. The test call is only between the phone and the PBX. No other parties involved. **My attempt to diagnose it:** I've made short script that tries to capture the state of various things before and after the fix by restarting iptables, to compare by diff. The script: for f in $( find /proc/sys/net/netfilter -type f ); do echo f=${f} cat "${f}" done echo cat /sys/module/nf_conntrack/parameters/* cat /sys/module/nf_conntrack/parameters/* echo ls /sys/module/nf_conntrack/holders/ ls /sys/module/nf_conntrack/holders/ echo cat /sys/module/nf_conntrack_sip/parameters/* cat /sys/module/nf_conntrack_sip/parameters/* echo ls /sys/module/nf_conntrack_sip/holders/ ls /sys/module/nf_conntrack_sip/holders/ echo ls /sys/module/ip*/holders/ ls /sys/module/{ip,nf_}*/holders/ echo sysctl -a sysctl -a echo lsmod lsmod echo iptables-save iptables-save The only thing I notice is that OFTEN module nf_conntrack_netlink IS listed as loaded after the boot, while there is a problem. Sometimes it is NOT listed by lsmod AFTER the boot but there is still the problem. After restarting iptables it is, to the best of my knowledge, never listed as loaded. I suspect it is unrelated because there is no direct link between it being loaded and the problem manifesting.
AnyDev (759 rep)
Aug 8, 2018, 04:34 PM • Last activity: Aug 23, 2018, 03:16 PM
2 votes
1 answers
152 views
Unable to register SIP via WiFi
We run a FreePBX server on our LAN and softphones can register using the local SIP server IP. I need these softphones to be able to register over the internet too so we have configured the firewall and created a dns entry for sip.ourdomain.com. When the softphones are configured to use sip.ourdomain...
We run a FreePBX server on our LAN and softphones can register using the local SIP server IP. I need these softphones to be able to register over the internet too so we have configured the firewall and created a dns entry for sip.ourdomain.com. When the softphones are configured to use sip.ourdomain.com then can register over the internet fine however when they are in the office and are connected to the wifi they are unable to register. I suspect this is because when in the office they are trying to register to sip.ourdomain.com which resolves to the public IP that redirects to the sip server on the local LAN. How can this be resolved? **Edit1** LAN is 192.168.1.X/24 & SIP Server is 192.168.1.8
Dercni (195 rep)
May 9, 2018, 10:52 PM • Last activity: May 10, 2018, 07:27 AM
8 votes
7 answers
3821 views
Secure FOSS alternative to Skype on Linux & OpenBSD?
Criteria: - Makes audio/video calls - Encrypts the whole traffic (using good encryption) - Is cross-platform (including Windows 7, etc.) - Runs on modern Linux distributions (Fedora, Ubuntu, etc.) - Runs on OpenBSD Does anybody know a good Free and Open-Source alternative to Skype?
Criteria: - Makes audio/video calls - Encrypts the whole traffic (using good encryption) - Is cross-platform (including Windows 7, etc.) - Runs on modern Linux distributions (Fedora, Ubuntu, etc.) - Runs on OpenBSD Does anybody know a good Free and Open-Source alternative to Skype?
LanceBaynes (41465 rep)
Mar 20, 2011, 12:39 PM • Last activity: Mar 5, 2018, 08:46 AM
1 votes
0 answers
222 views
Debian configure OpenSIPS for Websocket and UDP
I'm trying to configure OpenSIPS with OverSIP so that I could make a SIP call between a webrowser and a sip client app like Yate or Linphone. The call between two client apps (Yate/Linphone) works perfecly and between two browser clients (sipml5) also works perfectly. But when I try to make a call f...
I'm trying to configure OpenSIPS with OverSIP so that I could make a SIP call between a webrowser and a sip client app like Yate or Linphone. The call between two client apps (Yate/Linphone) works perfecly and between two browser clients (sipml5) also works perfectly. But when I try to make a call from sipml5 to Yate/Linphone than it fails and when I call from Yate/Linphone to sipml5 than it rings but terminates the call when I allow the browser to use my audio/video devices or I try to answer the call. I might be wrong but I think its a missconfiguration in opensips or oversip. What can I do to make this work?
Laci K (111 rep)
Feb 22, 2018, 12:32 PM
4 votes
2 answers
1184 views
How to turn off RTP buffering for SIP calls in FreeSWITCH pbx software?
I want to turn off buffering of SIP calls in freeswitch pbx software. Freeswitch holds RTP data from clients in buffer and sends it every 20ms. I want to freeswitch pass throught packets without holding. How to configure it? ----- EDIT (additional info) ----- I have two SIP clients and FreeSwitch PB...
I want to turn off buffering of SIP calls in freeswitch pbx software. Freeswitch holds RTP data from clients in buffer and sends it every 20ms. I want to freeswitch pass throught packets without holding. How to configure it? ----- EDIT (additional info) ----- I have two SIP clients and FreeSwitch PBX. Voice 8 kHz sample rate, A-Law coding (8 bytes per sample, no compression) When I call directly from one client to another the tcpdump output on one client is: 00:00:00.000475 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031599 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.032012 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.000315 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031775 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.000384 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031499 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031986 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.000475 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031578 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031936 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.000419 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 00:00:00.031573 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172 But when I connect from one client to another using pbx as middle point I got: 00:00:00.020013 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.019969 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.020017 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.019984 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.020078 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.020016 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.019850 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.020045 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.020012 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.019974 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.020054 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.019996 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 00:00:00.019972 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172 The average time in both cases is aproximate 20ms (slighter less in direct case), but non regular data portions seems better for client because there is no gaps in heard voice (in speaker or headphones). I suppose that regular period portions of data cause problems due to clock drift problem. **So I want to turn off this feature in FreeSwitch, so the data will come in original timestamps.**
sibislaw (157 rep)
Aug 9, 2017, 12:29 PM • Last activity: Aug 21, 2017, 12:48 PM
1 votes
0 answers
321 views
Asterisk: SIP and IAX registration failed on remote connection
I set up two asterisk servers (on Fedora) in different networks. My goal is to make a call from softphone (on windows lite with ip: 192.168.20.3) to the asterisk server 2 which is in the other network (ip:192.168.10.2). Actually the softphone on windows can register with asterisk 2 which is in the s...
I set up two asterisk servers (on Fedora) in different networks. My goal is to make a call from softphone (on windows lite with ip: 192.168.20.3) to the asterisk server 2 which is in the other network (ip:192.168.10.2). Actually the softphone on windows can register with asterisk 2 which is in the same network (ip:192.168.20.2). But the problem is in registration between the two asterisk servers.

> Architecture: enter image description here > IAX.conf in Asterisk server 1: [general] autokill=yes register => zone1:welcome@192.168.20.2 [zone2] type=friend host=dynamic trunk=yes secret=welcome context=incoming_zone2 deny=0.0.0.0/0.0.0.0 permit=192.168.20.2/255.255.255.0 > IAX.conf in Asterisk server 2: [general] autokill=yes register => zone1:welcome@192.168.10.2 [zone1] type=friend host=dynamic trunk=yes secret=welcome context=incoming_zone1 deny=0.0.0.0/0.0.0.0 permit=192.168.10.2/255.255.255.0 > extensions.conf in Asterisk server 1 [general] autofallthrough=yes [phones] include => internal include => remote [internal] exten => _5XXX,1,NoOp() exten => _5XXX,n,Playback(hello-world) exten => _5XXX,n,Dial(SIP/${EXTEN}) exten => _5XXX,n,Hangup() [remote] exten => _6XXX,1,NoOp() exten => _6XXX,n,Playback(hello-world) exten => _6XXX,n,Dial(IAX2/zone2/${EXTEN}) exten => _6XXX,n,Hangup() [incoming_zone2] include => internal > extensions.conf in Asterisk server 2 [general] autofallthrough=yes [phones] include => internal include => remote [internal] exten => _6XXX,1,NoOp() exten => _6XXX,n,Playback(hello-world) exten => _6XXX,n,Dial(SIP/${EXTEN}) exten => _6XXX,n,Hangup() [remote] exten => _5XXX,1,NoOp() exten => _5XXX,n,Playback(hello-world) exten => _5XXX,n,Dial(IAX2/zone1/${EXTEN}) exten => _5XXX,n,Hangup() [incoming_zone1] include => internal > Registration problem : Timeout enter image description here **NOTES:** - PING between the two networks is ok - There is no NAT - Firewall on servers was turned off - On routers, I create an ACL with 'PERMIT ANY' for each interface
Y. Dabbous (67 rep)
Apr 5, 2017, 12:44 AM
3 votes
0 answers
336 views
VoIP dialer for SIP
I have some Java, so am biased in that direction, but not overly so. None of the Java suggestions: * https://stackoverflow.com/questions/16471795/sip-client-for-java * https://stackoverflow.com/questions/498043/what-is-the-currently-popular-java-sip-library jump out as fantastic solution. What's "th...
I have some Java, so am biased in that direction, but not overly so. None of the Java suggestions: * https://stackoverflow.com/questions/16471795/sip-client-for-java * https://stackoverflow.com/questions/498043/what-is-the-currently-popular-java-sip-library jump out as fantastic solution. What's "the" best FOSS dialer? By "best" I mean simplest to deploy. The requirement is preview dialing: > Preview dialing enables agents to first view the available information > about the customer and decide when to place the call. In addition to > the information about the customer, agents may also view all the > history of the customer with the contact center. After viewing the > information about the customer, the agent requests the system to make > the call. http://en.wikipedia.org/wiki/Dialer#Preview Currently, hard phones connect with SIP to a hosted Asterisk PBX. The goal is to replace the hard phones with soft phones, such as zoiper , **and** speed up the dialing process. ViciBox looks very interesting, but would, apparently, create a bottleneck with the hosted PBX and is overkill. If I could deploy just the dialer and interface, but use the hosted Asterisk PBX, that would be good. However, it would probably be a bit complex to install. I'm looking for a quick and dirty solution. Down the road, it will probably be ViciBox, but the easiest and quickest to install and configure would be best. Of all the FOSS dialers, which one can be installed stand-alone easiest, and has a strong community? I suppose it's technically possible to checkout the code for ViciDial , but that's more involved than I would like. Optimally, I would like a FOSS dialer, with a queue, which pops a record from the database, sends it to an agent, the agent dials, edits the file, and updates the record. That's exactly what ViciBox does, except, in this case, Asterisk isn't required.
Thufir (1970 rep)
Jun 23, 2014, 02:45 AM • Last activity: Sep 28, 2016, 10:07 PM
5 votes
1 answers
646 views
Easy voice talk between 2 computers in 2 countries?
My plan is to enable 2 sets of unsophisticated users (children and their grandparents) in 2 different countries to talk easily. In practice I see it as: 1. A quiet Linux computer is on all the time in both places. 2. The user at one computer should be able to switch to an already running application...
My plan is to enable 2 sets of unsophisticated users (children and their grandparents) in 2 different countries to talk easily. In practice I see it as: 1. A quiet Linux computer is on all the time in both places. 2. The user at one computer should be able to switch to an already running application and call the other party in the other country. 3. The computer in the other country should ring. 4. The person in the other country hearing the ring, should be able to answer the call. Again - nothing more complicated than pressing a button in an application. 5. Video option is a bonus but not a must. I unfortunately have little experience with VoIP. But I could do a fair job setting up firewalls as it might be necessary in such scenario. I am also used to various Linux distros. The question really is what applications could fit my purpose and if I must run a server (voip?) in one of the countries. As for users - less choice is better, if I could I would use this just for communication between these 2 "computer stations". Maybe even with telephone headsets :) Many thanks for your suggestions.
r0berts (740 rep)
Aug 16, 2014, 08:24 PM • Last activity: Sep 28, 2016, 01:23 AM
Showing page 1 of 20 total questions