mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 06:26:41 +00:00
properly clean capabilites from the endpoint
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -853,6 +853,7 @@ void h323_callback_register(setup_incoming_cb ifunc,
|
|||||||
int h323_set_capability(int cap, int dtmfMode)
|
int h323_set_capability(int cap, int dtmfMode)
|
||||||
{
|
{
|
||||||
H323Capabilities oldcaps;
|
H323Capabilities oldcaps;
|
||||||
|
PStringArray codecs;
|
||||||
int g711Frames = 30;
|
int g711Frames = 30;
|
||||||
int gsmFrames = 4;
|
int gsmFrames = 4;
|
||||||
|
|
||||||
@@ -863,7 +864,10 @@ int h323_set_capability(int cap, int dtmfMode)
|
|||||||
|
|
||||||
/* clean up old capabilities list before changing */
|
/* clean up old capabilities list before changing */
|
||||||
oldcaps = endPoint->GetCapabilities();
|
oldcaps = endPoint->GetCapabilities();
|
||||||
oldcaps.RemoveAll();
|
for (PINDEX i=0; i< oldcaps.GetSize(); i++) {
|
||||||
|
codecs.AppendString(oldcaps[i].GetFormatName());
|
||||||
|
}
|
||||||
|
endPoint->RemoveCapabilities(codecs);
|
||||||
|
|
||||||
mode = dtmfMode;
|
mode = dtmfMode;
|
||||||
if (dtmfMode == H323_DTMF_INBAND) {
|
if (dtmfMode == H323_DTMF_INBAND) {
|
||||||
|
|||||||
Reference in New Issue
Block a user