Specifying the band is not that bad. With opus, you just specify the MAX rate capabilities and let it run from there. By default OPUS goes to its max capabilities(48000, aka fullband).
Also, keep in mind that rtp clock rate must be 48000 no matter what capture rate you specify.
The below examples are taken from the rfc section-7.
m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2
a=fmtp:101 maxplaybackrate=16000; sprop-maxcapturerate=16000
That specifies a max capture and play back rate for the sender of 16kHz (aka Wideband).
Two-way full band stereo
m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2
a=fmtp:101 stereo=1; sprop-stereo=1
The options that you will be most concerned with if you want to specify the prefered band are:
- maxplaybackrate: a hint about the maximum output sampling rate that
the receiver is capable of rendering in Hz.
- sprop-maxcapturerate: a hint about the maximum input sampling rate
that the sender is likely to produce.
The different bands and their respected max:
- NB: 8 kHz
- MB: 12 kHz
- WB: 16 kHz
- SWB: 24 kHz
- FB: 48 kHz //the codec default in webrtc
Also, note, there is a difference between Bitrate and Sample Rate. You modified the bitrate which may have forced Opus to change the sample rate but the options I have showed do not modify the bitrate at all and only change the sample rate.
Post Script, all this is contingent on the webrtc implementation and if it actually cares about what is specified in the SDP and if it actually effects the opus encoding/decoding. I have noticed(in the past, it very well may have changed) that the implementation in Firefox couldn't care less about what is in the SDP and just does what it wants by default.