summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJeremy McNamara <jj@nufone.net>2004-05-26 19:14:51 +0000
committerJeremy McNamara <jj@nufone.net>2004-05-26 19:14:51 +0000
commit9432a1c19f08309b296a0c93888e2a505ee985d3 (patch)
treeea0d5652e816eb05372960137ea3cc2c030d08c4 /channels
parent1b5d2d466702e831f813c493147839540f5109ad (diff)
properly clean capabilites from the endpoint
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/h323/ast_h323.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp
index ba7de93f7..cb78730af 100755
--- a/channels/h323/ast_h323.cpp
+++ b/channels/h323/ast_h323.cpp
@@ -853,6 +853,7 @@ void h323_callback_register(setup_incoming_cb ifunc,
int h323_set_capability(int cap, int dtmfMode)
{
H323Capabilities oldcaps;
+ PStringArray codecs;
int g711Frames = 30;
int gsmFrames = 4;
@@ -863,7 +864,10 @@ int h323_set_capability(int cap, int dtmfMode)
/* clean up old capabilities list before changing */
oldcaps = endPoint->GetCapabilities();
- oldcaps.RemoveAll();
+ for (PINDEX i=0; i< oldcaps.GetSize(); i++) {
+ codecs.AppendString(oldcaps[i].GetFormatName());
+ }
+ endPoint->RemoveCapabilities(codecs);
mode = dtmfMode;
if (dtmfMode == H323_DTMF_INBAND) {