Hello there!
I’m experiencing an issue where SIP signaling works, but RTP media is not flowing in calls between two MicroSIP softphones connected to an Asterisk instance running in a Docker container on Windows.
Setup Details:
-
Asterisk version: 17.6.0
-
Deployment: Docker container (bridge network) on Windows
-
Softphones: MicroSIP running on two separate PCs in the same LAN
-
Network details:
- Asterisk container IP (Docker network):
172.18.0.3/16
- Asterisk host machine IP (LAN):
192.168.1.18
- Softphone 1001 (on Asterisk host PC): SIP domain
127.0.0.1
- Softphone 2001 (on separate PC, with IP 192.168.1.20): SIP domain
192.168.1.18
- Asterisk container IP (Docker network):
-
Ports:
- SIP UDP: 5060 (open and reachable)
- RTP UDP: 10000-10050 (confirmed open via
nmap
)
-
Firewall: Disabled on Windows
-
Docker compose configuration: exposing all the required ports and building the asterisk service in a network with
driver: bridge
, withIP 172.18.0.3
-
PJSIP configuration (
pjsip.conf
):
[global]
external_media_address=192.168.1.18
external_signaling_address=192.168.1.18
local_net=192.168.1.0/24
local_net=172.18.0.0/16
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
external_signaling_address=192.168.1.18
external_media_address=192.168.1.18
local_net=192.168.1.0/24
local_net=172.18.0.0/16
[1001]
type=endpoint
context=default
disallow=all
allow=opus,ulaw
auth=1001
aors=1001
direct_media=no
force_rport=yes
rewrite_contact=yes
rtp_symmetric=yes
transport=transport-udp
[1001]
type=auth
auth_type=userpass
password=1001
username=1001
[1001]
type=aor
max_contacts=1
remove_existing=yes
qualify_frequency=120
[2001]
type=endpoint
context=default
allow_transfer=yes
disallow=all
allow=opus,ulaw
auth=2001
aors=2001
direct_media=no
force_rport=yes
rewrite_contact=yes
rtp_symmetric=yes
transport=transport-udp
[2001]
type=auth
auth_type=userpass
password=2001
username=2001
[2001]
type=aor
max_contacts=1
remove_existing=yes
qualify_frequency=120
- RTP configuration (
rtp.conf
):
[general]
rtpstart=10000
rtpend=10050
bindaddr=0.0.0.0
Problem Description:
- SIP signaling works fine, and calls are established successfully.
- However, RTP packets are not seen on the network when monitoring with Wireshark.
- Wireshark shows SIP packets but no RTP packets.
- RTP debugging in Asterisk (
rtp set debug on
) does not show any RTP traffic. - Both SIP endpoints use
rtp_symmetric=yes
,rewrite_contact=yes
, andforce_rport=yes
. - An INVITE example shows:
<--- Transmitting SIP response (904 bytes) to UDP:172.18.0.1:34522 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.18:64436;rport=34522;received=172.18.0.1;branch=z9hG4bKPj91ccdd3670fd4d1a882968c0efe2131e
Call-ID: 1375892ce8d7482a95fa6043d3035d90
From: "1001" <sip:1001@192.168.1.18>;tag=56b4d44c10f542ee980166b2df0aef3d
To: <sip:2001@192.168.1.18>;tag=c561ebd3-336c-45af-9b0a-5e8d69bc9315
CSeq: 20930 INVITE
Server: Asterisk PBX 17.6.0
Contact: <sip:172.18.0.3:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
Content-Type: application/sdp
Content-Length: 233
v=0
o=- 3947750454 3947750456 IN IP4 172.18.0.3
s=Asterisk
c=IN IP4 172.18.0.3
t=0 0
m=audio 10042 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
Where c=IN IP4 172.18.0.3 refers to the Docker Network IP. Am I missing something?
Any help will be appreciated