[Home]

Summary:ASTERISK-26591: res_pjsip: Can't exclude codecs with multiple formats
Reporter:George Joseph (gjoseph)Labels:
Date Opened:2016-11-14 08:37:26.000-0600Date Closed:2020-09-15 10:32:59
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:13.12.2 14.1.2 GIT Frequency of
Occurrence
Related
Issues:
is related toASTERISK-28416 Unable to get rtp codec payload code for slin
Environment:Attachments:
Description:Codecs that have multiple formats like speex, silk, siren, etc can't be negated in an endpoint/allow.

{{allow=!speex32,all}} passes validation but doesn't exclude speex32.
On the other hand, {{allow=!all,speex32}} DOES include only speex32.

Also, oddly enough, when you do a pjsip show endpoint for the negation example, the display for allow shows the codecs with multiple formats with just the base codec name (speex|speex|speex) but when you add a specific codec it shows speex32.

Comments:By: Sean Bright (seanbright) 2020-09-14 08:47:00.496-0500

{{allow = !ulaw,all}} doesn't work for me either ({{ulaw}} is still listed for the endpoint), so this doesn't appear to be limited to codecs with multiple formats. Is your experience different?

By: George Joseph (gjoseph) 2020-09-15 09:08:56.028-0500

I think I mixed up the ordering in my original description.  Reading (and processing) left-to-right, I would expect {{!speex32,all}} to result in all codecs.  Same for {{!ulaw,all}}.  What _doesn't_ work are...
* {{all,!speex32}} : results in all
* {{all,!speex}} : results in one of the speexes being excluded but couldn't tell which one, probably the unnumbered one.

Even more confusing is the fact that unlike speex and slin, the 8khz version of silk is silk8 instead of just silk.    Well, actually, the fact that slin and speex _don't_ append the 8 to the 8khz versions is confusing.



By: Sean Bright (seanbright) 2020-09-15 09:18:27.704-0500

I am not able to reproduce with the patch from ASTERISK-28416:

* {{all,!speex32}}: results in {{(g723|...|lpc10|g729|speex|speex16|ilbc|...|silk24)}}
* {{all,!speex}}: results in {{(g723|...|lpc10|g729|speex16|speex32|ilbc|...|silk24)}}