--- asterisk-11.3.0.o/main/manager.c 2013-01-17 00:49:59.000000000 +0200 +++ asterisk-11.3.0/main/manager.c 2013-06-30 21:28:19.606457197 +0200 @@ -4339,7 +4339,7 @@ if (!cap) { astman_send_error(s, m, "Internal Error. Memory allocation failure."); } - ast_format_cap_add(cap, ast_format_set(&tmp_fmt, AST_FORMAT_SLINEAR, 0)); + ast_format_cap_add_all(cap); if (ast_strlen_zero(name)) { astman_send_error(s, m, "Channel not specified"); --- asterisk-11.3.0.o/res/res_clioriginate.c 2012-08-09 00:39:40.000000000 +0200 +++ asterisk-11.3.0/res/res_clioriginate.c 2013-06-30 21:28:41.116814870 +0200 @@ -73,7 +73,7 @@ if (!(cap = ast_format_cap_alloc_nolock())) { return CLI_FAILURE; } - ast_format_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0)); + ast_format_cap_add_all(cap); ast_pbx_outgoing_app(chantech, cap, chandata, TIMEOUT * 1000, app, appdata, &reason, 0, NULL, NULL, NULL, NULL, NULL); cap = ast_format_cap_destroy(cap); --- asterisk-11.3.0.o/apps/app_originate.c 2012-08-09 00:39:40.000000000 +0200 +++ asterisk-11.3.0/apps/app_originate.c 2013-06-30 21:29:23.177515402 +0200 @@ -113,21 +113,13 @@ unsigned int timeout = 30; static const char default_exten[] = "s"; struct ast_format tmpfmt; - struct ast_format_cap *cap_slin = ast_format_cap_alloc_nolock(); + struct ast_format_cap *cap = ast_format_cap_alloc_nolock(); ast_autoservice_start(chan); - if (!cap_slin) { + if (!cap) { goto return_cleanup; } - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR12, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR16, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR24, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR32, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR44, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR48, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR96, 0)); - ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR192, 0)); + ast_format_cap_add_all(cap); if (ast_strlen_zero(data)) { ast_log(LOG_ERROR, "Originate() requires arguments\n"); @@ -176,14 +168,14 @@ ast_debug(1, "Originating call to '%s/%s' and connecting them to extension %s,%s,%d\n", chantech, chandata, args.arg1, exten, priority); - ast_pbx_outgoing_exten(chantech, cap_slin, chandata, + ast_pbx_outgoing_exten(chantech, cap, chandata, timeout * 1000, args.arg1, exten, priority, &outgoing_status, 0, NULL, NULL, NULL, NULL, NULL, 0); } else if (!strcasecmp(args.type, "app")) { ast_debug(1, "Originating call to '%s/%s' and connecting them to %s(%s)\n", chantech, chandata, args.arg1, S_OR(args.arg2, "")); - ast_pbx_outgoing_app(chantech, cap_slin, chandata, + ast_pbx_outgoing_app(chantech, cap, chandata, timeout * 1000, args.arg1, args.arg2, &outgoing_status, 0, NULL, NULL, NULL, NULL, NULL); } else { @@ -222,7 +214,7 @@ break; } } - cap_slin = ast_format_cap_destroy(cap_slin); + cap = ast_format_cap_destroy(cap); ast_autoservice_stop(chan); return res;