summaryrefslogtreecommitdiff
path: root/net/asterisk14
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2006-06-19 18:38:41 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2006-06-19 18:38:41 +0000
commitfa584687f3ea78cb1e0f167e8c5d26621cc75cb8 (patch)
treed2638411ea55099952ea22f282bf13b91b803d45 /net/asterisk14
parentUpdate to 0.07 (diff)
Merge in patch from Asterisk's ticket 7305. This patch should be part of the
next release. Requested by: Denis Shaposhnikov <dsh@vlink.ru>
Notes
Notes: svn path=/head/; revision=165788
Diffstat (limited to 'net/asterisk14')
-rw-r--r--net/asterisk14/files/patch-asterisk.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/net/asterisk14/files/patch-asterisk.c b/net/asterisk14/files/patch-asterisk.c
new file mode 100644
index 000000000000..fbd6dd4874c9
--- /dev/null
+++ b/net/asterisk14/files/patch-asterisk.c
@@ -0,0 +1,62 @@
+
+$FreeBSD$
+
+--- asterisk.c.orig
++++ asterisk.c
+@@ -177,6 +177,7 @@
+ int fully_booted = 0;
+ char record_cache_dir[AST_CACHE_DIR_LEN] = AST_TMP_DIR;
+ char debug_filename[AST_FILENAME_MAX] = "";
++enum ast_trans_algorithm option_translation_algorithm = AST_TRANS_ALG_STRICT;
+
+ static int ast_socket = -1; /*!< UNIX Socket for allowing remote control */
+ static int ast_consock = -1; /*!< UNIX Socket for controlling another asterisk */
+@@ -1803,7 +1804,6 @@
+
+ if (option_exec && data) { /* hack to print output then exit if asterisk -rx is used */
+ char tempchar;
+-#ifdef __Darwin__
+ struct pollfd fds[0];
+ fds[0].fd = ast_consock;
+ fds[0].events = POLLIN;
+@@ -1811,9 +1811,6 @@
+ while (poll(fds, 1, 100) > 0) {
+ ast_el_read_char(el, &tempchar);
+ }
+-#else
+- while (!ast_el_read_char(el, &tempchar));
+-#endif
+ return;
+ }
+ for(;;) {
+@@ -2009,6 +2006,30 @@
+ ast_copy_string(ast_config_AST_RUN_GROUP, v->value, sizeof(ast_config_AST_RUN_GROUP));
+ }
+ v = v->next;
++ }
++ option_translation_algorithm = AST_TRANS_ALG_STRICT;
++ for (v = ast_variable_browse(cfg, "codec_negotiation"); v; v = v->next)
++ {
++ if (!strcasecmp(v->name, "translation_algorithm")) {
++ if (!strcasecmp(v->value, "loose") ||
++ !strcasecmp(v->value, "save_cpu") ||
++ !strcasecmp(v->value, "avoid_translation") ||
++ !strcasecmp(v->value, "asymmetric"))
++ {
++ option_translation_algorithm = AST_TRANS_ALG_LOOSE;
++ }
++/*
++ else if (!strcasecmp(v->value, "strict") ||
++ !strcasecmp(v->value, "follow_peer") ||
++ !strcasecmp(v->value, "avoid_asymmetry"))
++ {
++ option_translation_algorithm = AST_TRANS_ALG_STRICT;
++ }
++*/
++ else {
++ option_translation_algorithm = AST_TRANS_ALG_STRICT;
++ }
++ }
+ }
+ ast_config_destroy(cfg);
+ }