# Asterisk RTP with WebRTC

**URL:** <https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978>\
**Category:** Asterisk WebRTC\
**Created:** [February 16, 2025, 10:13am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978 "2025-02-16T10:13:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![henryhkust](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/henryhkust/32/8824_2.png) [@henryhkust](https://community.asterisk.org/u/henryhkust)\
**Post date:** [February 16, 2025, 10:13am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/1 "2025-02-16T10:13:53Z")

</div>

Hi, I am building a website to make outbound calls with Asterisk as a gateway. I used JsSIP+Websocket secure for frontend WebRTC setting and configured pjsip.conf, extensions.conf, http.conf. I have three SIP accounts in pjsip.conf: a WebRTC account, a local SIP account and a SIP account from SIP2SIP.info:  
[webrtc\_client]  
type=endpoint  
aors=webrtc\_client  
auth=webrtc\_client  
dtls\_auto\_generate\_cert=yes  
webrtc=yes  
context=from-internal  
disallow=all  
allow=ulaw  
force\_rport=yes  
rewrite\_contact=yes  
transport=transport-udp

[webrtc\_client]  
type=aor  
max\_contacts=5  
remove\_existing=yes

[webrtc\_client]  
type=auth  
auth\_type=userpass  
username=webrtc\_client  
password=\*\*\*\*\*\* ;

[6002]  
type=endpoint  
context=from-internal  
disallow=all  
allow=ulaw  
auth=6002-auth  
aors=6002  
direct\_media=yes  
transport=transport-udp

[6002-auth]  
type=auth  
auth\_type=userpass  
username=6002  
password=\*\*\*\*\*\*

[6002]  
type=aor  
max\_contacts=2

[sip2sip\_provider]  
type = endpoint  
context = outbound  
disallow = all  
allow = ulaw  
outbound\_auth = sip2sip\_provider\_auth  
aors = sip2sip\_provider\_aor  
rtp\_symmetric=yes  
force\_rport=yes  
direct\_media=no  
rtcp\_mux=yes  
ice\_support=yes  
transport=transport-tcp  
from\_user=\*\*\*\*\*\*  
from\_domain=sip2sip.info

[sip2sip\_provider\_auth]  
type = auth  
auth\_type = userpass  
username = sip2sip\_account  
password = \*\*\*\*\*\*

[sip2sip\_provider\_aor]  
type = aor  
contact = sip:sip2sip.info

[sip2sip\_provider\_registration]  
type = registration  
outbound\_auth = sip2sip\_provider\_auth  
server\_uri = sip:sip2sip.info  
client\_uri = sip:\*\*\*\*\*\*@sip2sip.info  
retry\_interval = 60

[sip2sip\_identify]  
type=identify  
endpoint=sip2sip\_provider  
match=sip2sip.info

I made a call between webrtc\_client (browser) and 6002 (logged on Zoiper) with normal audio. However, when I call from webrtc\_client (via sip2sip\_account) to another SIP2SIP account on Zoiper, the SIP invitation is fine but when I accept the call, there is no media at all.

I checked pjsip registrations and endpoints, with no problem. I also added NAT-related configuration in rtp.conf:  
[general]  
[stunaddr:3478=stun.voip.blackberry.com](http://stunaddr:3478=stun.voip.blackberry.com)  
rtpstart=10000  
rtpend=20000

and pjsip.conf:  
[general]  
[stunaddr:3478=stun.voip.blackberry.com](http://stunaddr:3478=stun.voip.blackberry.com)  
rtpstart=10000  
rtpend=20000  
externip=\*\*\*\*\*\*  
localnet=172. **.**.\*\*/255.255.255.0  
nat=force\_rport,comedia  
codec\_translate=yes  
tls\_server=yes  
tls\_cert\_file=/etc/asterisk/keys/asterisk.pem  
tls\_private\_key=/etc/asterisk/keys/asterisk.key

[transport-udp]  
type=transport  
protocol=udp  
bind=0.0.0.0  
local\_net=172. **.**.**/24  
local\_net=127.0.0.1/32  
external\_media\_address=**\*\*\*\*  
external\_signaling\_address=\*\*\*\*\*\*

[transport-tcp]  
type=transport  
protocol=tcp  
bind=0.0.0.0  
local\_net=172. **.**.**/24  
external\_media\_address=**\*\*\*\*  
external\_signaling\_address=\*\*\*\*\*\*

I used rtp set debug on and see that when I established the call to the SIP2SIP account, there is no rtp channel built. I wonder what makes my outbound call (to SIP2SIP.info) with no audio but the local call is fine? Is it because I used a self-signed certificate or the NAT configuration is not properly set? Thanks!

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [February 16, 2025, 11:26am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/2 "2025-02-16T11:26:03Z")

</div>

Please provide “pjsip set logger on” type logs.

I don’t think the certificate is an issue. Certificate problems generally result in the receiving end not seeing any signalling. Also “self signed” is misused in the Asterisk world. Typically the certificates are signed by a corporate signing certificate, which might be a root certficate, and therefore, like all root certificates, sel signed, but is not th e certificate actually.

Although not relevant to the issue, context=outbound is confusing. context relates to incoming requests and when used in relation to a provider, it will apply to calls that are incoming to your site.

I’m not sure that chan\_pjsip has a general section, at all, but it certainly doesn’t have a parameter called nat.

I don’t think WebRTC supports TLS connections being created in the to browser direction, so I don’t think rewrite\_contact serves any purpose.

Given those, I’d suggest you check all the settings against the documentation, and make sure they are valid and relevant.

---

<div class="post-metadata">

**Author:** ![henryhkust](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/henryhkust/32/8824_2.png) [@henryhkust](https://community.asterisk.org/u/henryhkust)\
**Post date:** [February 17, 2025, 2:45am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/3 "2025-02-17T02:45:44Z")

</div>

Thanks for you help!

The pjsip set logger on is partly as below:

 ![asterisk3-imageonline.co-merged](https://global.discourse-cdn.com/asterisk/original/2X/f/f955c96dff4e627cc0ab4dc84972fb70cf563733.jpeg)

I compared it with the normal internal call and found they are almost the same. However, with “rtp set debug on”, the internal call will immediately show a lot:  
Got RTP packet from 172.16._._:49685 (type 00, seq 037118, ts 1795590354, len 000160)  
Sent RTP packet to 172.16._._:46864 (via ICE) (type 00, seq 011646, ts 1795590352, len 000170)  
right after the two accounts joined ‘simple\_bridge’ basic-bridge. There is no rtp packet for the outbound call.

For context=outbound, I mean the dial plan in the extensions.conf:  
[outbound]  
exten =\> \_[a-z].,1,Dial(PJSIP/${EXTEN}@sip2sip\_provider,30)  
exten =\> \_X.,n,Hangup()

I will check those settings like nat, and rewrite\_contact from the documentation. Thx!

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [February 17, 2025, 8:57am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/4 "2025-02-17T08:57:02Z")

</div>

Please use plain text, not images, for logs.

The log of the outbound call is incomplete, and missing an important part. However, you need to explain why the OK comes from a different address from the media address, in its SDP.

---

<div class="post-metadata">

**Author:** ![henryhkust](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/henryhkust/32/8824_2.png) [@henryhkust](https://community.asterisk.org/u/henryhkust)\
**Post date:** [February 17, 2025, 10:15am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/5 "2025-02-17T10:15:28Z")

</div>

I tried to copy the plain text but the community does not allow more than two links published by a new account. The different address do you mean the contact: sip: another\_account@36.7._._? This address is the external IP while 172.16._._ is the internal IP behind NAT.

The complete log is shown below:

Executing [another\_account@from-internal:1] Dial(“PJSIP/webrtc\_client-00000004”, “PJSIP/another\_account@sip2sip\_provider,30”) in new stack  
– Called PJSIP/another\_account@sip2sip\_provider  
\<— Transmitting SIP request (1269 bytes) to TCP:212.95.45.179:5060 —\>  
INVITE sip:another\_account@sip2sip.info SIP/2.0  
Via: SIP/2.0/TCP 36.7._._:5060;rport;branch=z9hG4bKPjf178dde7-80e0-424e-b708-c47f91e4d73d;alias  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
To: sip:another\_account@sip2sip.info  
Contact: sip:sip2sip\_account@36.7.:5060\*.\*;transport=TCP  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27154 INVITE  
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER  
Supported: 100rel, timer, replaces, norefersub, histinfo  
Session-Expires: 1800  
Min-SE: 90  
Max-Forwards: 70  
User-Agent: Asterisk PBX 22.1.1  
Content-Type: application/sdp  
Content-Length: 580

v=0  
o=- 420294206 420294206 IN IP4 36.7._._  
s=Asterisk  
c=IN IP4 36.7._._  
t=0 0  
m=audio 13112 RTP/AVP 0 101  
a=ice-ufrag:5b13cc4e08a228cc58eeab973509d39c  
a=ice-pwd:54ec330c1e811d4033059d0c09e46760  
a=candidate:Hac100935 1 UDP 2130706431 172.16._._ 13112 typ host  
a=candidate:H4742a809 1 UDP 2130706431 fe80::1f08:33aa:e8f:c545 13112 typ host  
a=candidate:S24079f4e 1 UDP 1694498815 36.7._._ 15326 typ srflx raddr 172.16._._ rport 13112  
a=rtpmap:0 PCMU/8000  
a=rtpmap:101 telephone-event/8000  
a=fmtp:101 0-16  
a=ptime:20  
a=maxptime:140  
a=sendrecv  
a=rtcp-mux

\<— Received SIP response (389 bytes) from TCP:212.95.45.179:5060 —\>  
SIP/2.0 100 Giving it a try  
Via: SIP/2.0/TCP 36.7._._:5060;received=36.7._._;rport=38534;branch=z9hG4bKPjf178dde7-80e0-424e-b708-c47f91e4d73d;alias  
To: sip:another\_account@sip2sip.info  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27154 INVITE  
Server: SIP Thor on OpenSIPS XS 3.2  
Content-Length: 0

\<— Received SIP response (569 bytes) from TCP:212.95.45.179:5060 —\>  
SIP/2.0 407 Proxy Authentication Required  
Via: SIP/2.0/TCP 36.7._._:5060;received=36.7._._;rport=38534;branch=z9hG4bKPjf178dde7-80e0-424e-b708-c47f91e4d73d;alias  
To: sip:another\_account@sip2sip.info;tag=424d.4e7b475c2e0ef26b35bf812286b0ec69  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27154 INVITE  
Proxy-Authenticate: Digest realm=“sip2sip.info”, nonce=“kR2SvyBkIbok1PlvcWcT7PTdRQ85R20YaeZVzHIYXdkA”, qop=“auth,auth-int”  
Server: SIP Thor on OpenSIPS XS 3.2  
Content-Length: 0

\<— Transmitting SIP request (423 bytes) to TCP:212.95.45.179:5060 —\>  
ACK sip:another\_account@sip2sip.info SIP/2.0  
Via: SIP/2.0/TCP 36.7._._:5060;rport;branch=z9hG4bKPjf178dde7-80e0-424e-b708-c47f91e4d73d;alias  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
To: sip:another\_account@sip2sip.info;tag=424d.4e7b475c2e0ef26b35bf812286b0ec69  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27154 ACK  
Max-Forwards: 70  
User-Agent: Asterisk PBX 22.1.1  
Content-Length: 0

\<— Transmitting SIP request (1537 bytes) to TCP:212.95.45.179:5060 —\>  
INVITE sip:another\_account@sip2sip.info SIP/2.0  
Via: SIP/2.0/TCP 36.7._._:5060;rport;branch=z9hG4bKPj6cfd673b-6745-44b1-982e-97c8efcb37d8;alias  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
To: sip:another\_account@sip2sip.info  
Contact: sip:sip2sip\_account@36.7.:5060\*.\*;transport=TCP  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 INVITE  
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER  
Supported: 100rel, timer, replaces, norefersub, histinfo  
Session-Expires: 1800  
Min-SE: 90  
Max-Forwards: 70  
User-Agent: Asterisk PBX 22.1.1  
Proxy-Authorization: Digest username=“sip2sip\_account”, realm=“sip2sip.info”, nonce=“kR2SvyBkIbok1PlvcWcT7PTdRQ85R20YaeZVzHIYXdkA”, uri=“sip:another\_account@sip2sip.info”, response=“b93a43667e48ea4a76171d9662f651b9”, cnonce=“7d04b044e3884276afc66d97769bd1a3”, qop=auth, nc=00000001  
Content-Type: application/sdp  
Content-Length: 580

v=0  
o=- 420294206 420294206 IN IP4 36.7._._  
s=Asterisk  
c=IN IP4 36.7._._  
t=0 0  
m=audio 13112 RTP/AVP 0 101  
a=ice-ufrag:5b13cc4e08a228cc58eeab973509d39c  
a=ice-pwd:54ec330c1e811d4033059d0c09e46760  
a=candidate:Hac100935 1 UDP 2130706431 172.16._._ 13112 typ host  
a=candidate:H4742a809 1 UDP 2130706431 fe80::1f08:33aa:e8f:c545 13112 typ host  
a=candidate:S24079f4e 1 UDP 1694498815 36.7._._ 15326 typ srflx raddr 172.16._._ rport 13112  
a=rtpmap:0 PCMU/8000  
a=rtpmap:101 telephone-event/8000  
a=fmtp:101 0-16  
a=ptime:20  
a=maxptime:140  
a=sendrecv  
a=rtcp-mux

\<— Received SIP response (389 bytes) from TCP:212.95.45.179:5060 —\>  
SIP/2.0 100 Giving it a try  
Via: SIP/2.0/TCP 36.7._._:5060;received=36.7._._;rport=38534;branch=z9hG4bKPj6cfd673b-6745-44b1-982e-97c8efcb37d8;alias  
To: sip:another\_account@sip2sip.info  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 INVITE  
Server: SIP Thor on OpenSIPS XS 3.2  
Content-Length: 0

\<— Received SIP response (1210 bytes) from TCP:212.95.45.179:5060 —\>  
SIP/2.0 180 Ringing  
Via: SIP/2.0/TCP 36.7._._:5060;received=36.7._._;rport=38534;branch=z9hG4bKPj6cfd673b-6745-44b1-982e-97c8efcb37d8;alias  
Record-Route: sip:212.95.45.179;transport=tcp;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Record-Route: sip:212.95.45.179;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Record-Route: sip:174.142.205.46;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.7e99d37  
Record-Route: sip:212.95.45.179;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Record-Route: sip:212.95.45.179;transport=tcp;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Contact: sip:another\_account@36.7.:27555\*.\*;transport=TCP  
To: sip:another\_account@sip2sip.info;tag=10c0877a  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 INVITE  
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE  
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri  
User-Agent: Z 5.6.6 v2.10.20.5  
Allow-Events: presence, kpml, talk, as-feature-event  
Content-Length: 0

```
-- PJSIP/sip2sip_provider-00000005 is ringing

```

\<— Transmitting SIP response (490 bytes) to WSS:172.16._._:49638 —\>  
SIP/2.0 180 Ringing  
Via: SIP/2.0/WSS fjoqd5gjb1p6.invalid;rport=49638;received=172.16._._;branch=z9hG4bK6143434  
Call-ID: cgjj64hg09hvo64q00r0  
From: sip:webrtc\_client@172.16.\*.\*;tag=r973a39flu  
To: sip:another\_account@172.16.\*.\*;tag=dcc20b1a-9d2d-40cb-9b2a-a228bbe05526  
CSeq: 9821 INVITE  
Server: Asterisk PBX 22.1.1  
Contact: sip:172.16.:5060\*.\*  
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER  
Content-Length: 0

\<— Received SIP response (1634 bytes) from TCP:212.95.45.179:5060 —\>  
SIP/2.0 200 OK  
Via: SIP/2.0/TCP 36.7._._:5060;received=36.7._._;rport=38534;branch=z9hG4bKPj6cfd673b-6745-44b1-982e-97c8efcb37d8;alias  
Record-Route: sip:212.95.45.179;transport=tcp;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Record-Route: sip:212.95.45.179;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Record-Route: sip:174.142.205.46;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.7e99d37  
Record-Route: sip:212.95.45.179;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Record-Route: sip:212.95.45.179;transport=tcp;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Require: timer  
Contact: sip:another\_account@36.7.:27555\*.\*;transport=TCP  
To: sip:another\_account@sip2sip.info;tag=10c0877a  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 INVITE  
Session-Expires: 1800;refresher=uac  
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE  
Content-Type: application/sdp  
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri  
User-Agent: Z 5.6.6 v2.10.20.5  
Allow-Events: presence, kpml, talk, as-feature-event  
Content-Length: 343

v=0  
o=Z 0 2756944404 IN IP4 172.16.9.52  
s=Z  
c=IN IP4 67.205.116.200  
t=0 0  
m=audio 52800 RTP/AVP 0 106 9 8 3 101 98  
a=rtpmap:106 opus/48000/2  
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1  
a=rtpmap:101 telephone-event/8000  
a=fmtp:101 0-16  
a=rtpmap:98 telephone-event/48000  
a=fmtp:98 0-16  
a=sendrecv  
a=rtcp-mux

\<— Transmitting SIP request (905 bytes) to TCP:212.95.45.179:5060 —\>  
ACK sip:another\_account@36.7._._:27555;transport=TCP SIP/2.0  
Via: SIP/2.0/TCP 36.7._._:5060;rport;branch=z9hG4bKPj732791c3-a31d-4b00-aac1-d32e20ebc72e;alias  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
To: sip:another\_account@sip2sip.info;tag=10c0877a  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 ACK  
Route: sip:212.95.45.179;transport=tcp;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Route: sip:212.95.45.179;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Route: sip:174.142.205.46;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.7e99d37  
Route: sip:212.95.45.179;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Route: sip:212.95.45.179;transport=tcp;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Max-Forwards: 70  
User-Agent: Asterisk PBX 22.1.1  
Content-Length: 0

```
-- PJSIP/sip2sip_provider-00000005 answered PJSIP/webrtc_client-00000004

```

\<— Transmitting SIP response (1555 bytes) to WSS:172.16._._:49638 —\>  
SIP/2.0 200 OK  
Via: SIP/2.0/WSS fjoqd5gjb1p6.invalid;rport=49638;received=172.16._._;branch=z9hG4bK6143434  
Call-ID: cgjj64hg09hvo64q00r0  
From: sip:webrtc\_client@172.16.\*.\*;tag=r973a39flu  
To: sip:another\_account@172.16.\*.\*;tag=dcc20b1a-9d2d-40cb-9b2a-a228bbe05526  
CSeq: 9821 INVITE  
Server: Asterisk PBX 22.1.1  
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER  
Contact: sip:172.16.:5060\*.\*  
Supported: 100rel, timer, replaces, norefersub  
Session-Expires: 90;refresher=uac  
Require: timer  
Content-Type: application/sdp  
Content-Length: 937

v=0  
o=- 3064053736346234544 4 IN IP4 172.16._._  
s=Asterisk  
c=IN IP4 172.16._._  
t=0 0  
a=msid-semantic:WMS \*  
a=group:BUNDLE 0  
m=audio 18496 UDP/TLS/RTP/SAVPF 0 126  
a=connection:new  
a=setup:active  
a=fingerprint:SHA-256 47:D2:2F:CB:44:63:C4:AE:BA:BE:B4:A2:48:1F:22:01:7A:D7:6E:D6:E0:DA:EA:2F:0F:43:85:58:E2:84:69:24  
a=ice-ufrag:2e5d32be54af2edb7f3b934f55a8a1a1  
a=ice-pwd:575112a551e8f37b459966d25b989bbf  
a=candidate:Hac100935 1 UDP 2130706431 172.16._._ 18496 typ host  
a=candidate:S24079f4e 1 UDP 1694498815 36.7._._ 15315 typ srflx raddr 172.16._._ rport 18496  
a=rtpmap:0 PCMU/8000  
a=rtpmap:126 telephone-event/8000  
a=fmtp:126 0-16  
a=ptime:20  
a=maxptime:140  
a=sendrecv  
a=rtcp-mux  
a=ssrc:362561819 cname:d0c4184f-806a-47c0-8341-1ba343898657  
a=msid:6490807e-13a8-4c45-ab47-45fb3d599963 6d66a681-73a8-4176-ab1b-dec135ade4e6  
a=rtcp-fb:\* transport-cc  
a=mid:0  
m=audio 0 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126

```
-- Channel PJSIP/sip2sip_provider-00000005 joined 'simple_bridge' basic-bridge <939c157d-45a0-40ba-9ba9-e2c3b93e6f8a>
-- Channel PJSIP/webrtc_client-00000004 joined 'simple_bridge' basic-bridge <939c157d-45a0-40ba-9ba9-e2c3b93e6f8a>

```

\<— Received SIP request (415 bytes) from WSS:172.16._._:49638 —\>  
ACK sip:172.16._._:5060 SIP/2.0  
Via: SIP/2.0/WSS fjoqd5gjb1p6.invalid;branch=z9hG4bK4796425  
Max-Forwards: 69  
To: sip:another\_account@172.16.\*.\*;tag=dcc20b1a-9d2d-40cb-9b2a-a228bbe05526  
From: sip:webrtc\_client@172.16.\*.\*;tag=r973a39flu  
Call-ID: cgjj64hg09hvo64q00r0  
CSeq: 9821 ACK  
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO  
Supported: outbound  
User-Agent: JsSIP 3.1.1  
Content-Length: 0

\<— Received SIP response (1634 bytes) from TCP:212.95.45.179:5060 —\>  
SIP/2.0 200 OK  
Via: SIP/2.0/TCP 36.7._._:5060;received=36.7._._;rport=38534;branch=z9hG4bKPj6cfd673b-6745-44b1-982e-97c8efcb37d8;alias  
Record-Route: sip:212.95.45.179;transport=tcp;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Record-Route: sip:212.95.45.179;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Record-Route: sip:174.142.205.46;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.7e99d37  
Record-Route: sip:212.95.45.179;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Record-Route: sip:212.95.45.179;transport=tcp;r2=on;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Require: timer  
Contact: sip:another\_account@36.7.:27555\*.\*;transport=TCP  
To: sip:another\_account@sip2sip.info;tag=10c0877a  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 INVITE  
Session-Expires: 1800;refresher=uac  
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE  
Content-Type: application/sdp  
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri  
User-Agent: Z 5.6.6 v2.10.20.5  
Allow-Events: presence, kpml, talk, as-feature-event  
Content-Length: 343

v=0  
o=Z 0 2756944404 IN IP4 172.16.9.52  
s=Z  
c=IN IP4 67.205.116.200  
t=0 0  
m=audio 52800 RTP/AVP 0 106 9 8 3 101 98  
a=rtpmap:106 opus/48000/2  
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1  
a=rtpmap:101 telephone-event/8000  
a=fmtp:101 0-16  
a=rtpmap:98 telephone-event/48000  
a=fmtp:98 0-16  
a=sendrecv  
a=rtcp-mux

\<— Transmitting SIP request (905 bytes) to TCP:212.95.45.179:5060 —\>  
ACK sip:another\_account@36.7._._:27555;transport=TCP SIP/2.0  
Via: SIP/2.0/TCP 36.7._._:5060;rport;branch=z9hG4bKPj732791c3-a31d-4b00-aac1-d32e20ebc72e;alias  
From: sip:sip2sip\_account@sip2sip.info;tag=add5ef57-107a-40ee-ac41-c776e1de09c6  
To: sip:another\_account@sip2sip.info;tag=10c0877a  
Call-ID: cef2e79c-2334-416b-9e2a-16b73b80b4cf  
CSeq: 27155 ACK  
Route: sip:212.95.45.179;transport=tcp;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Route: sip:212.95.45.179;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.56b32013  
Route: sip:174.142.205.46;lr;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.7e99d37  
Route: sip:212.95.45.179;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Route: sip:212.95.45.179;transport=tcp;lr;r2=on;ftag=add5ef57-107a-40ee-ac41-c776e1de09c6;did=e.66b32013  
Max-Forwards: 70  
User-Agent: Asterisk PBX 22.1.1  
Content-Length: 0

\<— Received SIP request (413 bytes) from WSS:172.16._._:49638 —\>  
BYE sip:172.16._._:5060 SIP/2.0  
Via: SIP/2.0/WSS fjoqd5gjb1p6.invalid;branch=z9hG4bK85992  
Max-Forwards: 69  
To: sip:another\_account@172.16.\*.\*;tag=dcc20b1a-9d2d-40cb-9b2a-a228bbe05526  
From: sip:webrtc\_client@172.16.\*.\*;tag=r973a39flu  
Call-ID: cgjj64hg09hvo64q00r0  
CSeq: 9822 BYE  
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO  
Supported: outbound  
User-Agent: JsSIP 3.1.1  
Content-Length: 0

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [February 17, 2025, 2:16pm UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/6 "2025-02-17T14:16:17Z")

</div>

> [@henryhkust](#):
>
> The different address do you mean the contact: sip: another\_account@36.7._._? This address is the external IP while 172.16._._ is the internal IP behind NAT.

I mean

> [@henryhkust](#):
>
> from TCP:212.95

doesn’t match

> [@henryhkust](#):
>
> c=IN IP4 67.205.

This is a broken NAT configuration at the remote side, which means that, for media to work, both Asterisk has to be configured for symmetric\_rtp, and the they have to send media to Asterisk first, so that Asterisk can learn their public media address.

---

<div class="post-metadata">

**Author:** ![henryhkust](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/henryhkust/32/8824_2.png) [@henryhkust](https://community.asterisk.org/u/henryhkust)\
**Post date:** [February 18, 2025, 10:34am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/7 "2025-02-18T10:34:22Z")

</div>

Thanks for your clarification. I checked the two IP addresses: 212.95.45.179 and 67.205.116.200. Neither of them belongs to my part. I think they are the servers from sip2sip or Zoiper.

I wonder what should be the IP in “c=IN IP4 67.205.116.200”, my external IP or the IP of the other side?

Do you mean the problem is from the other side (sip2sip)? My intended workflow is: dial a number from the website (webrtc\_account) =\> use the registered sip2sip account (sip2sip\_account) to make the call =\> talk with another sip2sip account (another\_account).

---

<div class="post-metadata">

**Author:** ![henryhkust](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/henryhkust/32/8824_2.png) [@henryhkust](https://community.asterisk.org/u/henryhkust)\
**Post date:** [February 18, 2025, 11:49am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/8 "2025-02-18T11:49:33Z")

</div>

I solved the problem. I replaced Zoiper with Linephone and the RTP is fine now. Very strange!

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [February 18, 2025, 12:27pm UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/9 "2025-02-18T12:27:29Z")

</div>

> [@henryhkust](#):
>
> I wonder what should be the IP in “c=IN IP4 67.205.116.200”, my external IP or the IP of the other side?

In that particular one, the external IP of the other side, as it is the SDP coming from them.

---

<div class="post-metadata">

**Author:** ![henryhkust](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/henryhkust/32/8824_2.png) [@henryhkust](https://community.asterisk.org/u/henryhkust)\
**Post date:** [February 19, 2025, 5:38am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/10 "2025-02-19T05:38:54Z")

</div>

Got it. So the problem is indeed caused by the server on the Zoiper side, right? Anyway, thank you for your kind help, David!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [March 21, 2025, 5:39am UTC](https://community.asterisk.org/t/asterisk-rtp-with-webrtc/106978/11 "2025-03-21T05:39:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
