I’m doing some playing around with Asterisk behind a cloud load balancer. One scenario I tested was using a SIP IPv4 UDP transport and RTP IPv6 media.
The issue I’ve encountered is that when setting the external_media_address
to an IPv6 address the SDP produced by asterisk is incorrectly setting the address type to IP4
instead of IP6
which causes the Bria softphone I’m testing with to immediately cancel the call.
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.7:5060;rport=5060;received=10.0.0.7;branch=z9hG4bK69f82835b01b41dda80c35660620cad3
Call-ID: 5c110aafcf0d48159788b4aaae010f02
From: <sip:thisis@anonymous.invalid>;tag=TOZYHKHNKF
To: <sip:100@10.0.0.5>;tag=daedda6e-f501-4156-9edd-3c289741a960
CSeq: 1 INVITE
Server: Asterisk PBX 18.1.1
Contact: <sip:10.0.0.5:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 248
v=0
o=- 2380356783 3 IN IP4 [2603:1020:203:3::18b]
s=Asterisk
c=IN IP4 [2603:1020:203:3::18b]
t=0 0
m=audio 10192 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
pjsip.conf:
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
;external_media_address=20.73.112.13
external_media_address=[2603:1020:203:3::18b]
;external_signaling_address=23.97.150.126
[sipvms]
type=identify
endpoint=6001
match=10.0.0.0/24
[6001]
type=endpoint
context=from-internal
disallow=all
allow=ulaw
aors=6001
rtp_symmetric=yes
rtp_ipv6=yes