Sorry for delay,
Please find enclosed SIP trace with SDP. This is incoming call, so SDP from asterisk is in OK 200:
<— SIP read from UDP:192.168.1.173:48866 —>
INVITE sip:999@192.168.13.33 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.15:1043;rport;branch=z9hG4bKPj483cbb9e2ff64ac295e4c88f9ed3be8b
Max-Forwards: 70
From: sip:504@192.168.13.33;tag=65def2f85f21457e8ce6a80d015ac579
To: sip:999@192.168.13.33
Contact: sip:504@10.0.2.15:1043;ob
Call-ID: 283a025397fe426d94298469aabd9503
CSeq: 5536 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.19.10
Authorization: Digest username=“504”, realm=“asterisk”, nonce=“534f3196”, uri="sip:999@192.168.13.33", response=“3817f473a850db5f180372b4fd3cab2d”, algorithm=MD5
Content-Type: application/sdp
Content-Length: 414
v=0
o=- 3758425327 3758425327 IN IP4 10.0.2.15
s=pjmedia
b=AS:67
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 123 101
c=IN IP4 10.0.2.15
b=TIAS:48000
a=rtcp:4003 IN IP4 10.0.2.15
a=sendrecv
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=20000;useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ssrc:1741099167 cname:1fd556cd0feb13f5
<------------->
— (16 headers 16 lines) —
Sending to 192.168.1.173:48866 (NAT)
Using INVITE request as basis request - 283a025397fe426d94298469aabd9503
Found peer ‘504’ for ‘504’ from 192.168.1.173:48866
== Using SIP RTP CoS mark 5
Found RTP audio format 123
Found RTP audio format 101
Found audio description format opus for ID 123
Found audio description format telephone-event for ID 101
Capabilities: us - (opus8|ulaw|alaw|g722|gsm|speex|ilbc), peer - audio=(opus)/video=(nothing)/text=(nothing), combined - (opus8)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.0.2.15:4002
Looking for 999 in mcs-ctx (domain 192.168.13.33)
sip_route_dump: route/path hop: sip:504@10.0.2.15:1043;ob
<— Transmitting (NAT) to 192.168.1.173:48866 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.2.15:1043;branch=z9hG4bKPj483cbb9e2ff64ac295e4c88f9ed3be8b;received=192.168.1.173;rport=48866
From: sip:504@192.168.13.33;tag=65def2f85f21457e8ce6a80d015ac579
To: sip:999@192.168.13.33
Call-ID: 283a025397fe426d94298469aabd9503
CSeq: 5536 INVITE
Server: Asterisk PBX 13.6.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:999@192.168.13.33:5060
Content-Length: 0
<------------>
– Executing [999@mcs-ctx:1] Answer(“SIP/504-00000000”, “”) in new stack
Audio is at 19174
Adding codec opus8 to SDP
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec g722 to SDP
Adding codec gsm to SDP
Adding codec speex to SDP
Adding codec ilbc to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<— Reliably Transmitting (NAT) to 192.168.1.173:48866 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.2.15:1043;branch=z9hG4bKPj483cbb9e2ff64ac295e4c88f9ed3be8b;received=192.168.1.173;rport=48866
From: sip:504@192.168.13.33;tag=65def2f85f21457e8ce6a80d015ac579
To: sip:999@192.168.13.33;tag=as43be82d6
Call-ID: 283a025397fe426d94298469aabd9503
CSeq: 5536 INVITE
Server: Asterisk PBX 13.6.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:999@192.168.13.33:5060
Content-Type: application/sdp
Require: timer
Content-Length: 560
v=0
o=root 1372000500 1372000500 IN IP4 192.168.13.33
s=Asterisk PBX 13.6.0
c=IN IP4 192.168.13.33
t=0 0
m=audio 19174 RTP/AVP 123 0 8 9 3 110 97 101
a=rtpmap:123 opus/48000/2
a=fmtp:123 maxplaybackrate=48000;sprop-maxcapturerate=48000;minptime=10;maxaveragebitrate=20000;stereo=0;sprop-stereo=0;cbr=0;useinbandfec=0;usedtx=0
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:3 GSM/8000
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
<------------>
<— SIP read from UDP:192.168.1.173:48866 —>
ACK sip:999@192.168.13.33:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.15:1043;rport;branch=z9hG4bKPjb3a6f84b4173499f82020b6a65093b02
Max-Forwards: 70
From: sip:504@192.168.13.33;tag=65def2f85f21457e8ce6a80d015ac579
To: sip:999@192.168.13.33;tag=as43be82d6
Call-ID: 283a025397fe426d94298469aabd9503
CSeq: 5536 ACK
Content-Length: 0
<------------->
— (8 headers 0 lines) —
> 0x7f4c28009e50 – Probation passed - setting RTP source address to 192.168.1.173:58663
– Executing [999@mcs-ctx:2] Echo(“SIP/504-00000000”, “”) in new stack
> 0x7f4c28009e50 – Probation passed - setting RTP source address to 192.168.1.173:58663
[Feb 6 07:37:43] WARNING[19517]: chan_mgcp.c:667 retrans_pkt: Maximum retries exceeded for transaction 4 on [192.168.1.137]
[Feb 6 07:37:43] NOTICE[19517]: chan_mgcp.c:2834 handle_response: Transaction 4 timed out
[Feb 6 07:37:44] WARNING[19517]: chan_mgcp.c:667 retrans_pkt: Maximum retries exceeded for transaction 5 on [192.168.1.137]
[Feb 6 07:37:44] NOTICE[19517]: chan_mgcp.c:2834 handle_response: Transaction 5 timed out
<— SIP read from UDP:192.168.1.173:48866 —>
BYE sip:999@192.168.13.33:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.15:1043;rport;branch=z9hG4bKPj0bc8886caad040daaa76ac7ca3054e6a
Max-Forwards: 70
From: sip:504@192.168.13.33;tag=65def2f85f21457e8ce6a80d015ac579
To: sip:999@192.168.13.33;tag=as43be82d6
Call-ID: 283a025397fe426d94298469aabd9503
CSeq: 5537 BYE
User-Agent: MicroSIP/3.19.10
Content-Length: 0
Used config in codecs.conf:
[opus8]
type=opus
bitrate=8000
cbr=yes
packet_loss=5
max_bandwidth=narrow
max_playback_rate=8000
For this test i used chan_sip. But in chan pjsip (on my diffrent installation) behaviour is the same. max_playback_rate is ignored. In config is 8000, but in SDP is:
a=fmtp:123 maxplaybackrate=48000;sprop-maxcapturerate=48000;minptime=10;maxaveragebitrate=20000;stereo=0;sprop-stereo=0;cbr=0;useinbandfec=0;usedtx=0
This endpoint config:
my-codecs ; a template for my preferred codecs
disallow=all
allow=opus8
allow=ulaw
allow=alaw
allow=g722
allow=gsm
allow=speex
allow=ilbc
allow=isac
natted-phone ; another template inheriting basic-options
directmedia=no
host=dynamic
nat=force_rport,comedia
504
secret = pass
mailbox=504
callerid=“Test1 <504>”
Best regards