[asterisk-addons-commits] objsys: branch 1.2 r370 - /branches/1.2/asterisk-ooh323c/src/chan_h323.c

asterisk-addons-commits at lists.digium.com asterisk-addons-commits at lists.digium.com
Fri Apr 20 13:26:20 MST 2007


Author: objsys
Date: Fri Apr 20 15:26:19 2007
New Revision: 370

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=370
Log:
allow=all option update

Modified:
    branches/1.2/asterisk-ooh323c/src/chan_h323.c

Modified: branches/1.2/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/src/chan_h323.c?view=diff&rev=370&r1=369&r2=370
==============================================================================
--- branches/1.2/asterisk-ooh323c/src/chan_h323.c (original)
+++ branches/1.2/asterisk-ooh323c/src/chan_h323.c Fri Apr 20 15:26:19 2007
@@ -1640,8 +1640,12 @@
                                      v->value, 0);
          }
          else if (!strcasecmp(v->name, "allow")) {
+            const char* tcodecs = v->value;
+            if(!strcasecmp(v->value, "all")) {
+               tcodecs = "ulaw,alaw,g729,g723,gsm";
+            }
             ast_parse_allow_disallow(&user->prefs, &user->capability, 
-                                     v->value, 1);
+                                     tcodecs, 1);
          }
          else if (!strcasecmp(v->name, "amaflags")) {
             user->amaflags = ast_cdr_amaflags2int(v->value);
@@ -1761,8 +1765,12 @@
                                      v->value, 0); 
          }
          else if (!strcasecmp(v->name, "allow")) {
+            const char* tcodecs = v->value;
+            if(!strcasecmp(v->value, "all")) {
+               tcodecs = "ulaw,alaw,g729,g723,gsm";
+            }
             ast_parse_allow_disallow(&peer->prefs, &peer->capability, 
-                                     v->value, 1);             
+                                     tcodecs, 1);             
          }
          else if (!strcasecmp(v->name,  "amaflags")) {
             peer->amaflags = ast_cdr_amaflags2int(v->value);
@@ -2003,7 +2011,11 @@
          ast_parse_allow_disallow(&gPrefs, &gCapability, v->value, 0);
       }
       else if (!strcasecmp(v->name, "allow")) {
-         ast_parse_allow_disallow(&gPrefs, &gCapability, v->value, 1);
+         const char* tcodecs = v->value;
+         if(!strcasecmp(v->value, "all")) {
+            tcodecs = "ulaw,alaw,g729,g723,gsm";
+         }
+         ast_parse_allow_disallow(&gPrefs, &gCapability, tcodecs, 1);
       }
       else if (!strcasecmp(v->name, "dtmfmode")) {
          if (!strcasecmp(v->value, "inband"))
@@ -2132,7 +2144,7 @@
       ast_cli(fd, "%-15.15s%s\n", "AccountCode: ", peer->accountcode);
       ast_cli(fd, "%-15.15s%s\n", "AMA flags: ", 
                                             ast_cdr_flags2str(peer->amaflags));
-      ast_cli(fd, "%-15.15s%s\n", "Ip:Port: ", ip_port);
+      ast_cli(fd, "%-15.15s%s\n", "IP:Port: ", ip_port);
       ast_cli(fd, "%-15.15s%d\n", "OutgoingLimit: ", peer->outgoinglimit);
       ast_cli(fd, "%-15.15s%d\n", "rtptimeout: ", peer->rtptimeout);
       ast_mutex_unlock(&peer->lock);



More information about the asterisk-addons-commits mailing list