On Mon, 2007-02-26 at 08:07 +0200, Damjan Jovanovic wrote:
> Hi
> I've made a patch (which is attached) to set the codecs that are in
> capability but not in prefs, but it doesn't seem to fully work. With the
> patch it doesn't complain about audio capabilities when you have
> "allow=all" and doesn't hang up the call any more, but I either get no
> audio, or just noise. Maybe you could have a look at it and help me out?
Ok the attached patch fixes the audio problem. Now (with both patches)
putting "allow=all" works perfectly.
Please let me know if my patches are accepted.
Thank you for the best Asterisk H.323 implementation,
Damjan
--- a/asterisk-ooh323c/src/chan_h323.c 2006-12-15 00:19:53.000000000 +0200
+++ b/asterisk-ooh323c/src/chan_h323.c 2007-02-26 09:35:31.970971256 +0200
@@ -1600,6 +1600,7 @@
else if (!strcasecmp(v->name, "allow")) {
ast_parse_allow_disallow(&user->prefs, &user->capability,
v->value, 1);
+ user->capability &= (AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_G729A | AST_FORMAT_G723_1);
}
else if (!strcasecmp(v->name, "amaflags")) {
user->amaflags = ast_cdr_amaflags2int(v->value);
@@ -1714,6 +1715,7 @@
else if (!strcasecmp(v->name, "allow")) {
ast_parse_allow_disallow(&peer->prefs, &peer->capability,
v->value, 1);
+ peer->capability &= (AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_G729A | AST_FORMAT_G723_1);
}
else if (!strcasecmp(v->name, "amaflags")) {
peer->amaflags = ast_cdr_amaflags2int(v->value);
@@ -1956,6 +1958,7 @@
}
else if (!strcasecmp(v->name, "allow")) {
ast_parse_allow_disallow(&gPrefs, &gCapability, v->value, 1);
+ gCapability &= (AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_G729A | AST_FORMAT_G723_1);
}
else if (!strcasecmp(v->name, "dtmfmode")) {
if (!strcasecmp(v->value, "inband"))
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ooh323c-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ooh323c-devel