asterisk sip.conf tls encryption - encryption

I am stuck in sometime with asterisk encryption.
sip.conf reload without any problem, as dial-plan, registering sip clients - no problem at all
When I call form one zoiper sip account to another wireshark capture tcp eth traffic shows following lines:
192.168.13.252 192.168.13.253 RTP 224 PT=ITU-T G.711 PCMU, SSRC=0x4C8C7A63, Seq=2259, Time=3154311440
192.168.13.253 192.168.13.252 SKYPE 224 Audio Unk: 5
192.168.13.253 192.168.13.252 SKYPE 224 Audio Unk: 5
192.168.13.253 192.168.13.252 SKYPE 224 Audio Unk: 5
192.168.13.252 192.168.13.253 RTP 224 PT=ITU-T G.711 PCMU, SSRC=0x4C8C7A63, Seq=2260, Time=3154311600
192.168.13.252 192.168.13.253 RTP 224 PT=ITU-T G.711 PCMU, SSRC=0x4C8C7A63, Seq=2261, Time=3154311760
192.168.13.253 192.168.13.252 SKYPE 224 Audio Unk: 5 ...
192.168.13.253 - asterisk server
192.168.13.252 - android phone (zoiper)
The problem is no sound on both phones during phone calls. Both phones send packages but not receiving any.
That is the SKYPE protocol involved in it? It suppose to be all line of RTP protocol.

If you are registering through SIP but receiving no audio, then for some reason your higher ports used for RTP are not receiving the data, most likely. Usually these ports are 10000-20000. Make sure both IPs can talk to each other through ports 5060-5061 and the higher ports. Can you display your asterisk CLI output while trying to make a call?
asterisk -vvvvvvvvvvvr

Great let's get some details.
rtp.conf
[general]
rtpstart=10000
rtpend=20000
No errors reloading sip.
This is interesting:
####CLI ### asterisk -vvvvvvvvvvvr #### shows
== Using SIP RTP CoS mark 5
> 0x7fb264004c00 -- Strict RTP learning after remote address set to: 192.168.13.104:58136
-- Executing [200#phones:1] Dial("SIP/201-0000000b", "SIP/200") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/200
-- SIP/200-0000000c is ringing
> 0x7fb2440062f0 -- Strict RTP learning after remote address set to: 192.168.13.106:62856
-- SIP/200-0000000c answered SIP/201-0000000b
-- Channel SIP/200-0000000c joined 'simple_bridge' basic-bridge <9726e2bc-f161-452c-b489-c1829af2ed70>
-- Channel SIP/201-0000000b joined 'simple_bridge' basic-bridge <9726e2bc-f161-452c-b489-c1829af2ed70>
> 0x7fb264004c00 -- Strict RTP switching to RTP target address 192.168.13.104:58136 as source
> 0x7fb2440062f0 -- Strict RTP switching to RTP target address 192.168.13.106:62856 as source
> 0x7fb264004c00 -- Strict RTP learning complete - Locking on source address 192.168.13.104:58136
> 0x7fb2440062f0 -- Strict RTP learning complete - Locking on source address 192.168.13.106:62856
-- Channel SIP/201-0000000b left 'simple_bridge' basic-bridge <9726e2bc-f161-452c-b489-c1829af2ed70>
-- Channel SIP/200-0000000c left 'simple_bridge' basic-bridge <9726e2bc-f161-452c-b489-c1829af2ed70>
== Spawn extension (phones, 200, 1) exited non-zero on 'SIP/201-0000000b'
####
According to the CLI console information everything is in order. Asterisk runs on local IP, no firewall.

Related

RTP audio stream works only in one direction in a SIP call

I'm developing software feature for a Session Boarder Controller(SBC).
I'm trying to establish a SIP call using two SIP clients and a Session Boarder Controller(SBC). Asterisk is used as the soft-switch.
When I call, the SIP signalling is working fine. But I am getting audio only in one direction. I captured rtp packets on all interfaces using wireshark. I observed that rtp packets in one direction is being dropped by asterisk.
Note: There is no send only attribute in any of the SIP/SDP messages.
I would like to know if there is any settings in asterisk that may cause this issue?
One more thing that I would like to know is that, from where a SIP client gets the RTP connection information. The port information is present in the media attribute
m=audio 16388 RTP/AVP 8 0 101
From where does the client get the transport IP address? is it from the "o=" field or "c=" field in the SDP or any other fields in the SDP or SIP?
You should troubleshoot the problem by capturing the complete call with Wireshark. Then look carefully at:
Client A initial INVITE: which port is it expecting media on (m= line) which address is it expecting media on (c= line)
SBC for Client A initial INVITE: If the SBC is anchoring the media (I assume so) check m / c lines
SBC for Client B initial INVITE: Which port / ip (m/c lines) is SBC for Client A expecting media on
Client B initial INVITE: Which port / ip (m/c lines) is SBC for Client B expecting media on
Are all nodes in this direction sending media on to the correct ports / ips (look at the RTP streams in wireshark)?
Then check the other direction (based on the SDP in the 183 or 200 (depending on your signaling flow)).
Note: In wireshark there is a nice feature which helps alot: Telephony --> VoIP Calls, which shows you the call flow more graphically

AsteriskNOW IP PBX behind NAT, clients cannot connect from outside Network

This is my first time working with asterisk (basically i know nothing, so bear with me)
i am running Asterisk 11.6 in a virtualbox with 512/kbps internet connection, which is behind NAT.
have two extension 1001 and 1002, these are the situations that is happening to me.
Number 1: call within local using softphone works. "no problem".
Number 2: call from outside (softphone) to local works. "no problem".
Number 3: call from local to outside, just hangs up quickly. "PROBLEM".
Number 4:call from outside to outside, never works. I can hear dial tone but no response from the receiver. "PROBLEM".
I tried forwarding port 5060 both tcp and udp nothing changes...
i also read in somewhere that i have NAT loopback error, at this point it doesnt concerns me.
My problem is i want to connect these two extensions from outside networks...
(1001)Network1--->(server)Network2--->(1002)Network3
likewise backwards... am i missing anything?
here is my sip configuration.
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-AsteriskNOW-12.0.76(11.16.0)
SDP Session Name: Asterisk PBX 11.16.0
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Call Events: On
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Disabled
Externhost: <none>
Externaddr: (null)
Externrefresh: 10
Localnet: 192.168.2.0/255.255.255.0
Global Signalling Settings:
---------------------------
Codecs: (gsm|ulaw|alaw|g726)
Codec Order: ulaw:20,alaw:20,gsm:20,g726:20
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: Never
Language:
Tone zone: <Not set>
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97
----
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
1001/1001 1.39.63.239 D Yes Yes A 28594 UNREACHABLE
1002/1002 106.200.190.71 D Yes Yes A 47695 OK (216 ms)
This is is from my last session.
Here user 1001 is "UNREACHABLE" why? i think that is where my problem is.
help me guys...
Also i am looking for methods to connect with PSTN and GSM.
(If you guys are from India and can help me i can actually pay you, please answer with solution for above problem then i will contact for other methods)
You have to add externip=your_public_ip in [general] section of sip.conf.
Also you have to forward RTP ports range. Usually it's 10000-20000 UDP. You can see/change this range in rtp.conf.
SIP will always cause problem when server is Behind Nat.
If your devices Support IAX which is Inter-Asterisk eXchange, works perfect for your situations then utilize it.
Still you are looking to solve SIP problems read this tutorial

No audio in WebRTC and Asterisk

I have a strange issue with Asterisk (in this case 13.2 version) and WebRTC.
So, I have latest Asterisk 13.2, latest Crome (with Firefox - same problem) and sip.js (also tried with sipml5) and local network - no nat or firewall.
The problem: if call is answered immediately - everything works fine. But if there are some delay in answer (say, 10 seconds) - no audio in both directions.
In RTP debug I saw that if there is some delay - destination ip address is incorrect. After removing ice servers from client config - both addresses is correct, but still no audio.
Below is debug for call with audio:
rtp http://pastebin.com/EzfByCG5
sip http://pastebin.com/1Y08yF5s
and no audio call (answered after 10 seconds delay):
rtp http://pastebin.com/TNnFkz6M
sip http://pastebin.com/zG7pjcZD
Also in FreeSwitch everything works fine, no matter when call is answered.
Starting with Asterisk 12 you need to have pjproject libraries installed, otherwise you most likely won't have audio in your WebRTC calls and no warning whatsoever!
First question: have you ensured all firewall configs permit RTP streams from the chosen STUN / ICE server unconditionally?
My own experience is that audio issues with WebRTC are almost always related to STUN / ICE & Firewall.
Did you follow a tutorial for your set up? If so, which one?
Check the log...
Peer audio RTP is at port 192.168.88.187:50026
sip_route_dump: route/path hop: sip:889#df7jal23ls0d.invalid;transport=ws
[Feb 13 06:15:59] ERROR[1055][C-00000031]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("df7jal23ls0d.invalid", "(null)", ...): Name or service not known
[Feb 13 06:15:59] WARNING[1055][C-00000031]: chan_sip.c:16158 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'df7jal23ls0d.invalid'
I would use Freeswitch, no doubt :-)

webrtc2sip + sipml5 + asterisk no audio issue

I am having a trouble in having a sipml5 to call other sipml5 via webrtc2sip and asterisk.
I have installed configured asterisk(version 11.10.0) + webrtc2sip(latest) + sipml5(chrome version 30.0.1599.66) to call from one box to other over websocket.
I can make a SIP call through and answer from other side but seems like there is no audio/voice packets gets exchanged as is evident by rtp and sip debug log and tcpdump.
asterisk and users are on separate servers and they do establish sip call but it's just a audio packet that does not appear.
I've created 2 users(1060 and 1061) and when I make a call I get these asterisk response.
rtp set debug on
RTP Debugging Enabled
*CLI> == Spawn extension (default, 1060, 1) exited non-zero on 'SIP/1061-00000000'
== Using SIP RTP CoS mark 5
-- Executing [1060#default:1] Dial("SIP/1061-00000002", "SIP/1060") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/1060
-- SIP/1060-00000003 is ringing
-- SIP/1060-00000003 answered SIP/1061-00000002
Asterisk settings are..
sip.conf
[general]
port=5060
bindaddr=0.0.0.0
context=default
transport=ws,wss,udp
srvlookup=yes
users.conf
[1060]
type=peer
username=1060
host=dynamic
secret=1234
context=default
disallow=all
allow=ulaw
transport=udp,ws,wss
encryption=yes
avpf=yes
icesupport=yes
nat=yes,force_rport
[1061]
type=peer
username=1061
host=dynamic
secret=1234
context=default
encryption=yes
avpf=yes
icesupport=yes
nat=yes
disallow=all
allow=ulaw
transport=udp,ws,wss
extensions.conf
[general]
static=yes
writeprotect=no
[default]
exten=>1060,1,Dial(SIP/1060)
exten=>1061,1,Dial(SIP/1061)
rtp.conf
[general]
icesupport=yes
stunaddr=stun.l.google.com:19302
strictrtp=no
rtcpinterval=6000
rtpchecksums=no
I can hear dialling sound on one end and ringing on the other end but as soon as the call is connected, can't hear anything.
Could anyone kindly help please.. I am very very desperate..
Thanks in advance!
You set rtp debug on but there's no rtp flow output, so call setup has gone wrong, you should check inside the dump of sip packets the sdp data they tried to share.
But you also have a better option: latest versions of Asterisk work with WebSocket and WebRTC like a charm without any external layer or component, so configuration will be much easier.
In addition you could use apache (at least 2.4) as websocket tunnel reverse proxy to the asterisk server, so you can do all the things (but rtp) with a single connection and a single ssl certificate use (another common problem is that the same selfsigned certificate is required to be explicitly accepted by user even if for the same server but on different port...and browser don't ask users to do that but just silently refuse to connect to websocket)
remove avpf option, it is not needed when using webrtc2sip.
If still no voice - check sipml5 log (firefox or chrome debug console ) while SIP registration and while the call.

Asterisk Multicast (SIP)

How can I setup asterisk to dialog with sip devices using
the Multicast transmission protocol ?
Basically I have an asterisk box conected to a VSAT network.
On the other end I have a SIP box in a network receiving
the signal from the other VSAT.
The return from the SIP box to asterisk is unicast.
Is it possible to make it work ?
Asterisk SIP currently not support multicast.
Multicast rtp supported.
http://www.voip-info.org/wiki/view/Asterisk+MulticastRTP+channels

Resources