-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bandwidth negotiation does not accept NB #11
Comments
The bandwidth is encoded as plain text in the SDP, given as range values or single value. My module translates all known text strings (7) into a bit-set, like the set theory, it allows the module to check which bandwidth is on/off or one/zero. The lowest bit 0 is just an indicator whether it was included in SDP or a default is in use. Consequently, everything is shifted one the left, narrowband is bit 1. Therefore, narrowband should be covered, as you can see in |
That is indeed curious. Where is that Asterisk from? 16.18.0 sounds like a version from a Linux distribution, at least terrible old from May 2021. It should work but I am not sure what is going wrong here. Do you know how to debug a running Asterisk? Then you can create a breakpoint and jump through its code. |
Yeah, it's an old Asterisk, have no control over changing that. Interestingly enough, I added extra logs and bw_recv and bw_send just come as 0x0 in logs. I added more logging above the operation so that I get what it bw_send and bw_recv before they get put against 0x1e and it's still a 0x0. So will add more logging above to the evs_parse_sdp_fmtp_bw use for determining bw_send and bw_recv to try to understand how they actually look in the SDP. |
From what I managed to understand from the code, the patch allows Asterisk to work with all 4 types of bandwidth of the EVS codec: NB, WB, SWB and FB.
I had a chance to test the patch in practice and sometimes I stumbled on the following error:
no bandwidth in common
After checking the code, I noticed that there's a restriction regarding the negotiated bandwidth. In the res_format_attr_evs.c at the 803 line there is this:
if (0 == (attr_res->bw_recv & 0x1e) || 0 == (attr_res->bw_send & 0x1e)) { ast_log(LOG_WARNING, "no bandwidth in common\n"); return NULL;
From my limited knowledge, I take it this limits bandwidth negotiation to only the WB and up. That is, if common negotiated bandwidth is NB, then the module will consider that no common bandwidth was found, and therefore end the call.
Any specific reason to limit the common denominator to WB and up? Or was this pure own preference?
Interested in trying a change to this in practice:
if (attr_res->bw_recv == 0 || attr_res->bw_send == 0) {
The text was updated successfully, but these errors were encountered: