aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323/ast_h323.cpp
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-26 19:14:51 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-26 19:14:51 +0000
commit02cb9c996bce3045e471f9167ff3b302251206ab (patch)
treeea0d5652e816eb05372960137ea3cc2c030d08c4 /channels/h323/ast_h323.cpp
parent0a1dd440cfd2ed8023cbeb2e04532cb923ba2435 (diff)
properly clean capabilites from the endpoint
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3079 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323/ast_h323.cpp')
-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) {