sktanmoy
(Tanmoy Sadhu)
March 27, 2016, 4:24am
1
I’ve enabled SRTP in my Asterisk 13 based server.
Detail specification is here:
CentOS: 7 64bit
FreePBX: 13.0.97
Asterisk: 13.7.2
pjsip.transport.conf
[0.0.0.0-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
external_media_address=52.*.*.*
external_signaling_address=52.*.*.*
ca_list_file=/etc/asterisk/keys/integration/ca-bundle.crt
cert_file=/etc/asterisk/keys/integration/webserver.crt
priv_key_file=/etc/asterisk/keys/integration/webserver.key
local_net=172.31.30.109/255.255.240.0
local_net=172.31.30.109
method=tlsv1
Under Extension > 12345 -> Advanced -> Media Encryption -> SRTP via in SDP
SIP client is being registered successfully using TLS transport type & Encryption Enabled. RPRT for signaling and media was enabled.
I’m getting busy signal when trying to make call. And not a single output in asterisk console with debug mode on.
I tried same thing in several servers, all are working fine. Not sure if any changes made in recent version of asterisk or freepbx.
I need your help.
Thanks
dicko
(dicko)
March 27, 2016, 4:49am
2
Check you local net
In the Internet addressing architecture, a private network is a network that uses private IP address space, following the standards set by RFC 1918 for Internet Protocol Version 4 (IPv4), and RFC 4193 for Internet Protocol Version 6 (IPv6). These addresses are commonly used for home, office, and enterprise local area networks (LANs). Private IP address spaces were originally defined in an effort to delay IPv4 address exhaustion, but they are also a feature of IPv6 where exhaustion is not an issue...
specificalley
172.16.0.0/12 (255.240.0.0)
Yes you can subnet but you need to do it properly, you are using a class B network.
sktanmoy
(Tanmoy Sadhu)
March 27, 2016, 5:49am
3
I’m using AWS and provide me all IP configs.
Subnet is 172.31.16.0/20.
Classless IP is better to avoid wasting IP address you know.
dicko
(dicko)
March 27, 2016, 10:55pm
4
I’m pretty sure that neither of
are legitimate “networks” only 172.31.30.109/32 network would fit, pretty sure your network ends with a 0 with a netmask of 255.255.240.0.
Probably 172.31.30.109 is a host within your network.
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 5:01am
5
I’ve changed code to
[0.0.0.0-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
external_media_address=52.*.*.*
external_signaling_address=52.*.*.*
ca_list_file=/etc/asterisk/keys/integration/ca-bundle.crt
cert_file=/etc/asterisk/keys/integration/webserver.crt
priv_key_file=/etc/asterisk/keys/integration/webserver.key
local_net=172.31.30.109
method=tlsv1
tried changing
local_net=172.31.30.109/32
but no luck. The issue is somewhere else for sure.
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 5:04am
6
And I should include I’m able to make call and do everything else if selecting transport as UDP.
dicko
(dicko)
March 28, 2016, 5:24am
7
again
local_net=172.31.30.109
is NOT a valid network, it is a host, if you don’t have any lan/local users you probably shouldn’t be mangling the sip headers at all your users would be registering to 52.x.x.x.
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 5:32am
8
Here is the output of ifconfig
inet addr:172.31.30.109 Bcast:172.31.31.255 Mask:255.255.240.0
I tried 172.31.30.109 , 172.31.30.109/32 , 172.31.30.109/255.255.240.0 and 172.31.16.0/20 (Auto fill by FreePBX) without any luck.
dicko
(dicko)
March 28, 2016, 5:37am
9
Where network wise is your extension
12345
?
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 5:44am
10
I’ve extensions 12345, 12346, 12347 etc.
dicko
(dicko)
March 28, 2016, 5:47am
11
Then more generally
Where network wise are your extensions
12345, 12346, 12347 etc.
? Particularly what is the ip address of these extensions.
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 6:06am
12
No, SIP server is hosted in Amazon AWS and we’re trying to connecting using different network.
dicko
(dicko)
March 28, 2016, 6:25am
13
Then sjrely your local_net is completly spurious you don’t have one. Just use your public ip
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 6:37am
14
So I removed and config was
[0.0.0.0-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
external_media_address=52.*.*.*
external_signaling_address=52.*.*.*
ca_list_file=/etc/asterisk/keys/integration/ca-bundle.crt
cert_file=/etc/asterisk/keys/integration/webserver.crt
priv_key_file=/etc/asterisk/keys/integration/webserver.key
And problem wasn’t solved. As I’ve told I have configured several servers with SRTP. Not sure why this one isn’t working. Previously I used Asterisk 13. Not sure about this one.
Thanks
sktanmoy
(Tanmoy Sadhu)
March 28, 2016, 2:41pm
15
Not sure what happened but I’ve reinstalled and same settings are working fine now.