asterisk-evs
asterisk-evs copied to clipboard
Bandwidth negotiation does not accept NB
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) {