[Home]

Summary:ASTERISK-25182: [patch] on CLI sip reload, new codecs get appended only
Reporter:Alexander Traud (traud)Labels:
Date Opened:2015-06-22 09:34:55Date Closed:2015-08-08 01:29:36
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/CodecHandling
Versions:SVN 13.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) asterisk_13_allow_codec_reload.patch
Description:When you edit the allowed codecs, newly added codecs get appended, previously existing ones do not get removed. Or stated differently: On reload, the allowed codecs are not same as when Asterisk is restarted.

Steps to reproduce:
# sip.conf with
  disallow=all
  allow=ulaw
# start Asterisk
# change sip.conf to
  allow=g722,ulaw
# CLI: sip reload
# called Asterisk from a VoIP/SIP client
# client gets ulaw,g722
# CLI: core stop now

I started over with step 2: Now, the expected order is offered (g722,ulaw). By the way in format_cap.c, the method format_in_format_cap() is a great starting point to find such issues. In this case, the code flow was:
* build_peer, then
* set_peer_defaults, then
* ast_format_cap_append_from_cap, then
* ast_format_cap_append, then
* format_in_format_cap.
Comments:By: ibercom (ibercom) 2015-06-23 12:51:26.652-0500

What about asterisk_11? The code in chan_sip.c is similar to asterisk_13.

By: Alexander Traud (traud) 2015-08-08 01:24:09.580-0500

@ibercom with Asterisk 13, although the SIP channel chan_sip did not change that much the whole media-format handling changed. In the past, I did not face this issue in Asterisk 12 or Asterisk 11. I tried to reproduce this issue with a recent version of Asterisk 11 – it worked as expected without any patch/change. If you are able to reproduce a similar issue in Asterisk 11, are you using the same configuration as mentioned here?

By: Asterisk Team (asteriskteam) 2015-08-08 01:24:10.506-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.