[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r321502 - in /team/may/ooh323_ipv6_dir...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat May 28 03:03:00 CDT 2011
Author: may
Date: Sat May 28 03:02:53 2011
New Revision: 321502
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321502
Log:
Merged revisions 316552,316584,316618,316657,316664,316711,316798,316832,316885,316920,316962,316994,317026,317059,317105,317197-317198,317282,317334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r316552 | wedhorn | 2011-05-04 11:43:58 +0400 (Wed, 04 May 2011) | 5 lines
Make skinny_answer use setsubsate_connected.
Cosolidated the code so that skinny_answer now uses the setsubstate procedures
rather than doing the handling inline.
................
r316584 | wedhorn | 2011-05-04 12:25:47 +0400 (Wed, 04 May 2011) | 6 lines
Add setsubstate_ringin.
Added setsubstate_ringin. skinny_call now calls sss_ringin rather than inline.
Fixed previous issue so that setsubstate_connected now use SUBSTATE_RINGIN
to determine is an AST_CONTROL_ANSWER should be queued.
................
r316618 | dvossel | 2011-05-04 17:48:07 +0400 (Wed, 04 May 2011) | 26 lines
Merged revisions 316617 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r316617 | dvossel | 2011-05-04 08:44:41 -0500 (Wed, 04 May 2011) | 19 lines
Merged revisions 316616 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r316616 | dvossel | 2011-05-04 08:40:41 -0500 (Wed, 04 May 2011) | 12 lines
Fixes session-timers=refuse not being enforced for *caller*
During handle_request_invite, the session timer mode was retrieved from
a cached variable. This patch forces a peer lookup of the session timer
mode in the case of an incoming invite.
(closes issue #18804)
Reported by: wdoekes
Patches:
issue18804_session_timer_refuse_caller.patch uploaded by wdoekes (license 717)
issue_18804_v2.diff uploaded by dvossel (license 671)
........
................
................
r316657 | dvossel | 2011-05-04 18:26:33 +0400 (Wed, 04 May 2011) | 22 lines
Merged revisions 316650 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r316650 | dvossel | 2011-05-04 09:25:03 -0500 (Wed, 04 May 2011) | 15 lines
Merged revisions 316644 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r316644 | dvossel | 2011-05-04 09:23:39 -0500 (Wed, 04 May 2011) | 9 lines
Fixes one-way-audio when chanspy activated with the 'o' option
(closes issue #18382)
Reported by: jkister
Patches:
0001-Bugfix-18382-one-way-audio-when-chanspy-activated.patch.txt uploaded by malin (license )
Tested by: firstsip, Greenlightcrm, malin, wdoekes, boroda, dvossel
........
................
................
r316664 | seanbright | 2011-05-04 18:40:08 +0400 (Wed, 04 May 2011) | 15 lines
Merged revisions 316663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r316663 | seanbright | 2011-05-04 10:35:05 -0400 (Wed, 04 May 2011) | 8 lines
Only return a single error via AMI when requesting a forbidden action.
(closes issue #19216)
Reported by: oej
Patches:
issue19216-1.8-r316204.patch uploaded by seanbright (license 71)
Tested by: seanbright
........
................
r316711 | seanbright | 2011-05-04 20:17:14 +0400 (Wed, 04 May 2011) | 29 lines
Merged revisions 316709 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r316709 | seanbright | 2011-05-04 12:15:32 -0400 (Wed, 04 May 2011) | 22 lines
Merged revisions 316708 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r316708 | seanbright | 2011-05-04 12:10:59 -0400 (Wed, 04 May 2011) | 15 lines
Merged revisions 316707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r316707 | seanbright | 2011-05-04 12:08:50 -0400 (Wed, 04 May 2011) | 8 lines
If sox fails when processing a voicemail, don't delete the original file.
(closes issue #18111)
Reported by: sysreq
Patches:
issue18111_trunk.patch uploaded by seanbright (license 71)
Tested by: seanbright
........
................
................
................
r316798 | dvossel | 2011-05-04 20:42:19 +0400 (Wed, 04 May 2011) | 8 lines
Reverts rev 316218 as it breaks parsing the [general] section of sip.conf.
The functionality this patch attempts to achieve should already
be possible using [general](+) in the config file.
issue #17957
................
r316832 | rmudgett | 2011-05-04 22:57:02 +0400 (Wed, 04 May 2011) | 16 lines
Merged revisions 316831 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r316831 | rmudgett | 2011-05-04 13:51:40 -0500 (Wed, 04 May 2011) | 9 lines
Wait for leader with Music On Hold allows crosstalk between participants.
Parenthesis in the wrong position. Regression from issue #14365 when
expanding conference flags to use 64 bits.
(closes issue #18418)
Reported by: MrHanMan
Tested by: rmudgett
........
................
r316885 | wedhorn | 2011-05-05 01:44:06 +0400 (Thu, 05 May 2011) | 7 lines
Add setsubstate_ringout (equivalent to AST_STATE ringing).
Renamed previous setsubstate_ringout to setsubstate_dialing for a state
when attempting to dial a number, substate ringout now for when core
has indicated that the channel is actually ringing on the other end.
Also added substate2str for debugging purposes.
................
r316920 | seanbright | 2011-05-05 06:34:29 +0400 (Thu, 05 May 2011) | 31 lines
Merged revisions 316917-316919 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r316917 | seanbright | 2011-05-04 22:23:28 -0400 (Wed, 04 May 2011) | 5 lines
Make sure that tcptls_session is properly initialized.
(issue #18598)
Reported by: ksn
........
r316918 | seanbright | 2011-05-04 22:25:20 -0400 (Wed, 04 May 2011) | 5 lines
Look at the correct buffer for our digest info instead of an empty one.
(issue #18598)
Reported by: ksn
........
r316919 | seanbright | 2011-05-04 22:30:45 -0400 (Wed, 04 May 2011) | 10 lines
Use the correct HTTP method when generating our digest, otherwise we always fail.
When calculating the 'A2' portion of our digest for verification, we need the
HTTP method that is currently in use. Unfortunately our mapping function was
incorrect, resulting in invalid hashes being generated and, in turn, failures
in authentication.
(closes issue #18598)
Reported by: ksn
........
................
r316962 | schmidts | 2011-05-05 11:09:20 +0400 (Thu, 05 May 2011) | 10 lines
Adding the Move to Front Hash functionality
Moving a found object to the front of its bucket to reduce the necessary traversal steps to find an object. This change improves the search time on large system with many data or in link lists.
(closes issue #19233)
Reported by: schmidts
Review: https://reviewboard.asterisk.org/r/1201/
................
r316994 | wedhorn | 2011-05-05 12:10:14 +0400 (Thu, 05 May 2011) | 7 lines
Add setsubstate_busy.
Move handling of setting busy state from skinny_indicate to it's own sub.
Also, modified behaviour to not hangup the sub and let the dialplan
have a chance in doing what it wants (eg busy(10); hangup() in the dialplan
now gives a busy indication for 10 secs and then hangs up.
................
r317026 | wedhorn | 2011-05-05 13:03:32 +0400 (Thu, 05 May 2011) | 8 lines
Add setsubstate_congestion and setsubstate_progress.
Move handling of both state handling from skinny_indicate to it's own sub.
Also, modified behaviour to not hangup the sub and let the dialplan
have a chance in doing what it wants for congestion. Added various states to
substate2str and added these states where applicable for other set_substate_
procs.
................
r317059 | lmadsen | 2011-05-05 16:28:40 +0400 (Thu, 05 May 2011) | 15 lines
Merged revisions 317058 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317058 | lmadsen | 2011-05-05 08:27:56 -0400 (Thu, 05 May 2011) | 7 lines
Remove unused directory and clear up some documentation.
(closes issue #19193)
Reported by: bchia
Patches:
cel-csv.diff uploaded by lathama (license 1028)
Tested by: lathama, Marquis42
........
................
r317105 | lmadsen | 2011-05-05 19:06:59 +0400 (Thu, 05 May 2011) | 22 lines
Merged revisions 317104 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r317104 | lmadsen | 2011-05-05 11:04:24 -0400 (Thu, 05 May 2011) | 15 lines
Merged revisions 317102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r317102 | lmadsen | 2011-05-05 10:54:46 -0400 (Thu, 05 May 2011) | 8 lines
Disable console colourization inside safe_asterisk checks.
(closes issue #19213)
Reported by: lefoyer
Patches:
issue19213_strip_color_in_safe_asterisk-svn.patch uploaded by wdoekes (license 717)
Tested by: wdoekes, lefoyer
........
................
................
r317197 | dvossel | 2011-05-05 22:08:42 +0400 (Thu, 05 May 2011) | 2 lines
Fixes reliability issues with func_jitterbuffer's usage in the new ConfBridge application.
................
r317198 | mnicholson | 2011-05-05 22:09:23 +0400 (Thu, 05 May 2011) | 15 lines
Merged revisions 317196 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317196 | mnicholson | 2011-05-05 13:02:52 -0500 (Thu, 05 May 2011) | 8 lines
Set SO_KEEPALIVE on SIP TCP sockets so that they eventually go away when a peer
abruptly disappears. This mostly occurs after a successful registration.
(closes issue #17544)
Reported by: marcelloceschia
Patches:
(modified) tcptls.patch uploaded by st (license 907)
........
................
r317282 | russell | 2011-05-05 22:46:22 +0400 (Thu, 05 May 2011) | 36 lines
Merged revisions 317281 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r317281 | russell | 2011-05-05 13:39:44 -0500 (Thu, 05 May 2011) | 29 lines
Merged revisions 317255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r317255 | russell | 2011-05-05 13:29:53 -0500 (Thu, 05 May 2011) | 22 lines
Merged revisions 317211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r317211 | russell | 2011-05-05 13:20:29 -0500 (Thu, 05 May 2011) | 15 lines
chan_sip: fix broken realtime peer count, fix memory leak
This patch addresses two bugs in chan_sip:
1) The count of realtime peers and users was off. The increment checked the
value of the caching option, while the decrement did not.
2) Add a missing regfree() for a regex.
(closes issue #19108)
Reported by: vrban
Patches:
missing_regfree.patch uploaded by vrban (license 756)
sip_object_counter.patch uploaded by vrban (license 756)
........
................
................
................
r317334 | jrose | 2011-05-05 23:33:11 +0400 (Thu, 05 May 2011) | 16 lines
Merged revisions 317283 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317283 | jrose | 2011-05-05 14:09:13 -0500 (Thu, 05 May 2011) | 10 lines
Resolves a deadlock that occurs during sip_new
This is based on an uncommitted patch by jpeeler for the issue. Instead of
relocking and then unlocking the channel though, we keep the lock on the channel
until we are finished doing what we need to the channel.
(closes issue #18441)
Reported by: Alric
........
................
Modified:
team/may/ooh323_ipv6_direct_rtp/ (props changed)
team/may/ooh323_ipv6_direct_rtp/CHANGES
team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
team/may/ooh323_ipv6_direct_rtp/channels/chan_skinny.c
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May 28 03:02:53 2011
@@ -1,1 +1,1 @@
-/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520
+/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520,316552-317334
Modified: team/may/ooh323_ipv6_direct_rtp/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/CHANGES?view=diff&rev=321502&r1=321501&r2=321502
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/CHANGES (original)
+++ team/may/ooh323_ipv6_direct_rtp/CHANGES Sat May 28 03:02:53 2011
@@ -107,11 +107,6 @@
channels involved with the FollowMe thread. Use this option to improve
compatability for a FollowMe call with certain dialplan apps, options, and
functions.
-
-SIP Changes
------------
- * Multiple [general] contexts are now permitted within sip.conf. They will be
- merged at load time.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c?view=diff&rev=321502&r1=321501&r2=321502
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c Sat May 28 03:02:53 2011
@@ -27277,512 +27277,505 @@
ast_clear_flag(&global_flags[1], SIP_PAGE2_IGNORESDPVERSION);
- /* Read all [general] config sections of sip.conf (or from realtime config) */
- for (cat = ast_category_browse(cfg, "general"); cat; cat = ast_category_browse(cfg, cat)) {
- if (strcmp(cat, "general")) {
+ /* Read the [general] config section of sip.conf (or from realtime config) */
+ for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
+ if (handle_common_options(&global_flags[0], &dummy[0], v)) {
continue;
}
-
- for (v = ast_variable_browse(cfg, cat); v; v = v->next) {
- if (handle_common_options(&global_flags[0], &dummy[0], v)) {
+ if (handle_t38_options(&global_flags[0], &dummy[0], v, &global_t38_maxdatagram)) {
+ continue;
+ }
+ /* handle jb conf */
+ if (!ast_jb_read_conf(&global_jbconf, v->name, v->value)) {
+ continue;
+ }
+
+ /* handle tls conf */
+ if (!ast_tls_read_conf(&default_tls_cfg, &sip_tls_desc, v->name, v->value)) {
+ continue;
+ }
+
+ if (!strcasecmp(v->name, "context")) {
+ ast_copy_string(sip_cfg.default_context, v->value, sizeof(sip_cfg.default_context));
+ } else if (!strcasecmp(v->name, "subscribecontext")) {
+ ast_copy_string(sip_cfg.default_subscribecontext, v->value, sizeof(sip_cfg.default_subscribecontext));
+ } else if (!strcasecmp(v->name, "callcounter")) {
+ global_callcounter = ast_true(v->value) ? 1 : 0;
+ } else if (!strcasecmp(v->name, "allowguest")) {
+ sip_cfg.allowguest = ast_true(v->value) ? 1 : 0;
+ } else if (!strcasecmp(v->name, "realm")) {
+ ast_copy_string(sip_cfg.realm, v->value, sizeof(sip_cfg.realm));
+ } else if (!strcasecmp(v->name, "domainsasrealm")) {
+ sip_cfg.domainsasrealm = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "useragent")) {
+ ast_copy_string(global_useragent, v->value, sizeof(global_useragent));
+ ast_debug(1, "Setting SIP channel User-Agent Name to %s\n", global_useragent);
+ } else if (!strcasecmp(v->name, "sdpsession")) {
+ ast_copy_string(global_sdpsession, v->value, sizeof(global_sdpsession));
+ } else if (!strcasecmp(v->name, "sdpowner")) {
+ /* Field cannot contain spaces */
+ if (!strstr(v->value, " ")) {
+ ast_copy_string(global_sdpowner, v->value, sizeof(global_sdpowner));
+ } else {
+ ast_log(LOG_WARNING, "'%s' must not contain spaces at line %d. Using default.\n", v->value, v->lineno);
+ }
+ } else if (!strcasecmp(v->name, "allowtransfer")) {
+ sip_cfg.allowtransfer = ast_true(v->value) ? TRANSFER_OPENFORALL : TRANSFER_CLOSED;
+ } else if (!strcasecmp(v->name, "rtcachefriends")) {
+ ast_set2_flag(&global_flags[1], ast_true(v->value), SIP_PAGE2_RTCACHEFRIENDS);
+ } else if (!strcasecmp(v->name, "rtsavesysname")) {
+ sip_cfg.rtsave_sysname = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "rtupdate")) {
+ sip_cfg.peer_rtupdate = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "ignoreregexpire")) {
+ sip_cfg.ignore_regexpire = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "timert1")) {
+ /* Defaults to 500ms, but RFC 3261 states that it is recommended
+ * for the value to be set higher, though a lower value is only
+ * allowed on private networks unconnected to the Internet. */
+ global_t1 = atoi(v->value);
+ } else if (!strcasecmp(v->name, "timerb")) {
+ int tmp = atoi(v->value);
+ if (tmp < 500) {
+ global_timer_b = global_t1 * 64;
+ ast_log(LOG_WARNING, "Invalid value for timerb ('%s'). Setting to default ('%d').\n", v->value, global_timer_b);
+ }
+ timerb_set = 1;
+ } else if (!strcasecmp(v->name, "t1min")) {
+ global_t1min = atoi(v->value);
+ } else if (!strcasecmp(v->name, "transport") && !ast_strlen_zero(v->value)) {
+ char *val = ast_strdupa(v->value);
+ char *trans;
+
+ while ((trans = strsep(&val, ","))) {
+ trans = ast_skip_blanks(trans);
+
+ if (!strncasecmp(trans, "udp", 3)) {
+ default_transports |= SIP_TRANSPORT_UDP;
+ } else if (!strncasecmp(trans, "tcp", 3)) {
+ default_transports |= SIP_TRANSPORT_TCP;
+ } else if (!strncasecmp(trans, "tls", 3)) {
+ default_transports |= SIP_TRANSPORT_TLS;
+ } else {
+ ast_log(LOG_NOTICE, "'%s' is not a valid transport type. if no other is specified, udp will be used.\n", trans);
+ }
+ if (default_primary_transport == 0) {
+ default_primary_transport = default_transports;
+ }
+ }
+ } else if (!strcasecmp(v->name, "tcpenable")) {
+ if (!ast_false(v->value)) {
+ ast_debug(2, "Enabling TCP socket for listening\n");
+ sip_cfg.tcp_enabled = TRUE;
+ }
+ } else if (!strcasecmp(v->name, "tcpbindaddr")) {
+ if (ast_parse_arg(v->value, PARSE_ADDR,
+ &sip_tcp_desc.local_address)) {
+ ast_log(LOG_WARNING, "Invalid %s '%s' at line %d of %s\n",
+ v->name, v->value, v->lineno, config);
+ }
+ ast_debug(2, "Setting TCP socket address to %s\n",
+ ast_sockaddr_stringify(&sip_tcp_desc.local_address));
+ } else if (!strcasecmp(v->name, "dynamic_exclude_static") || !strcasecmp(v->name, "dynamic_excludes_static")) {
+ global_dynamic_exclude_static = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "contactpermit") || !strcasecmp(v->name, "contactdeny")) {
+ int ha_error = 0;
+ sip_cfg.contact_ha = ast_append_ha(v->name + 7, v->value, sip_cfg.contact_ha, &ha_error);
+ if (ha_error) {
+ ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
+ }
+ } else if (!strcasecmp(v->name, "rtautoclear")) {
+ int i = atoi(v->value);
+ if (i > 0) {
+ sip_cfg.rtautoclear = i;
+ } else {
+ i = 0;
+ }
+ ast_set2_flag(&global_flags[1], i || ast_true(v->value), SIP_PAGE2_RTAUTOCLEAR);
+ } else if (!strcasecmp(v->name, "usereqphone")) {
+ ast_set2_flag(&global_flags[0], ast_true(v->value), SIP_USEREQPHONE);
+ } else if (!strcasecmp(v->name, "prematuremedia")) {
+ global_prematuremediafilter = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "relaxdtmf")) {
+ global_relaxdtmf = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "vmexten")) {
+ ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten));
+ } else if (!strcasecmp(v->name, "rtptimeout")) {
+ if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) {
+ ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
+ global_rtptimeout = 0;
+ }
+ } else if (!strcasecmp(v->name, "rtpholdtimeout")) {
+ if ((sscanf(v->value, "%30d", &global_rtpholdtimeout) != 1) || (global_rtpholdtimeout < 0)) {
+ ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
+ global_rtpholdtimeout = 0;
+ }
+ } else if (!strcasecmp(v->name, "rtpkeepalive")) {
+ if ((sscanf(v->value, "%30d", &global_rtpkeepalive) != 1) || (global_rtpkeepalive < 0)) {
+ ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d. Using default.\n", v->value, v->lineno);
+ global_rtpkeepalive = DEFAULT_RTPKEEPALIVE;
+ }
+ } else if (!strcasecmp(v->name, "compactheaders")) {
+ sip_cfg.compactheaders = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "notifymimetype")) {
+ ast_copy_string(default_notifymime, v->value, sizeof(default_notifymime));
+ } else if (!strcasecmp(v->name, "directrtpsetup")) {
+ sip_cfg.directrtpsetup = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "notifyringing")) {
+ sip_cfg.notifyringing = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "notifyhold")) {
+ sip_cfg.notifyhold = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "notifycid")) {
+ if (!strcasecmp(v->value, "ignore-context")) {
+ sip_cfg.notifycid = IGNORE_CONTEXT;
+ } else {
+ sip_cfg.notifycid = ast_true(v->value);
+ }
+ } else if (!strcasecmp(v->name, "alwaysauthreject")) {
+ sip_cfg.alwaysauthreject = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "auth_options_requests")) {
+ if (ast_true(v->value)) {
+ sip_cfg.auth_options_requests = 1;
+ }
+ } else if (!strcasecmp(v->name, "mohinterpret")) {
+ ast_copy_string(default_mohinterpret, v->value, sizeof(default_mohinterpret));
+ } else if (!strcasecmp(v->name, "mohsuggest")) {
+ ast_copy_string(default_mohsuggest, v->value, sizeof(default_mohsuggest));
+ } else if (!strcasecmp(v->name, "language")) {
+ ast_copy_string(default_language, v->value, sizeof(default_language));
+ } else if (!strcasecmp(v->name, "regcontext")) {
+ ast_copy_string(newcontexts, v->value, sizeof(newcontexts));
+ stringp = newcontexts;
+ /* Let's remove any contexts that are no longer defined in regcontext */
+ cleanup_stale_contexts(stringp, oldregcontext);
+ /* Create contexts if they don't exist already */
+ while ((context = strsep(&stringp, "&"))) {
+ ast_copy_string(used_context, context, sizeof(used_context));
+ ast_context_find_or_create(NULL, NULL, context, "SIP");
+ }
+ ast_copy_string(sip_cfg.regcontext, v->value, sizeof(sip_cfg.regcontext));
+ } else if (!strcasecmp(v->name, "regextenonqualify")) {
+ sip_cfg.regextenonqualify = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "callerid")) {
+ ast_copy_string(default_callerid, v->value, sizeof(default_callerid));
+ } else if (!strcasecmp(v->name, "mwi_from")) {
+ ast_copy_string(default_mwi_from, v->value, sizeof(default_mwi_from));
+ } else if (!strcasecmp(v->name, "fromdomain")) {
+ char *fromdomainport;
+ ast_copy_string(default_fromdomain, v->value, sizeof(default_fromdomain));
+ if ((fromdomainport = strchr(default_fromdomain, ':'))) {
+ *fromdomainport++ = '\0';
+ if (!(default_fromdomainport = port_str2int(fromdomainport, 0))) {
+ ast_log(LOG_NOTICE, "'%s' is not a valid port number for fromdomain.\n",fromdomainport);
+ }
+ } else {
+ default_fromdomainport = STANDARD_SIP_PORT;
+ }
+ } else if (!strcasecmp(v->name, "outboundproxy")) {
+ char *tok, *proxyname;
+
+ if (ast_strlen_zero(v->value)) {
+ ast_log(LOG_WARNING, "no value given for outbound proxy on line %d of sip.conf.", v->lineno);
continue;
}
- if (handle_t38_options(&global_flags[0], &dummy[0], v, &global_t38_maxdatagram)) {
+
+ tok = ast_skip_blanks(strtok(ast_strdupa(v->value), ","));
+
+ sip_parse_host(tok, v->lineno, &proxyname,
+ &sip_cfg.outboundproxy.port,
+ &sip_cfg.outboundproxy.transport);
+
+ if ((tok = strtok(NULL, ","))) {
+ sip_cfg.outboundproxy.force = !strncasecmp(ast_skip_blanks(tok), "force", 5);
+ } else {
+ sip_cfg.outboundproxy.force = FALSE;
+ }
+
+ if (ast_strlen_zero(proxyname)) {
+ ast_log(LOG_WARNING, "you must specify a name for the outboundproxy on line %d of sip.conf.", v->lineno);
+ sip_cfg.outboundproxy.name[0] = '\0';
continue;
}
- /* handle jb conf */
- if (!ast_jb_read_conf(&global_jbconf, v->name, v->value)) {
- continue;
- }
-
- /* handle tls conf */
- if (!ast_tls_read_conf(&default_tls_cfg, &sip_tls_desc, v->name, v->value)) {
- continue;
- }
-
- if (!strcasecmp(v->name, "context")) {
- ast_copy_string(sip_cfg.default_context, v->value, sizeof(sip_cfg.default_context));
- } else if (!strcasecmp(v->name, "subscribecontext")) {
- ast_copy_string(sip_cfg.default_subscribecontext, v->value, sizeof(sip_cfg.default_subscribecontext));
- } else if (!strcasecmp(v->name, "callcounter")) {
- global_callcounter = ast_true(v->value) ? 1 : 0;
- } else if (!strcasecmp(v->name, "allowguest")) {
- sip_cfg.allowguest = ast_true(v->value) ? 1 : 0;
- } else if (!strcasecmp(v->name, "realm")) {
- ast_copy_string(sip_cfg.realm, v->value, sizeof(sip_cfg.realm));
- } else if (!strcasecmp(v->name, "domainsasrealm")) {
- sip_cfg.domainsasrealm = ast_true(v->value);
- } else if (!strcasecmp(v->name, "useragent")) {
- ast_copy_string(global_useragent, v->value, sizeof(global_useragent));
- ast_debug(1, "Setting SIP channel User-Agent Name to %s\n", global_useragent);
- } else if (!strcasecmp(v->name, "sdpsession")) {
- ast_copy_string(global_sdpsession, v->value, sizeof(global_sdpsession));
- } else if (!strcasecmp(v->name, "sdpowner")) {
- /* Field cannot contain spaces */
- if (!strstr(v->value, " ")) {
- ast_copy_string(global_sdpowner, v->value, sizeof(global_sdpowner));
- } else {
- ast_log(LOG_WARNING, "'%s' must not contain spaces at line %d. Using default.\n", v->value, v->lineno);
- }
- } else if (!strcasecmp(v->name, "allowtransfer")) {
- sip_cfg.allowtransfer = ast_true(v->value) ? TRANSFER_OPENFORALL : TRANSFER_CLOSED;
- } else if (!strcasecmp(v->name, "rtcachefriends")) {
- ast_set2_flag(&global_flags[1], ast_true(v->value), SIP_PAGE2_RTCACHEFRIENDS);
- } else if (!strcasecmp(v->name, "rtsavesysname")) {
- sip_cfg.rtsave_sysname = ast_true(v->value);
- } else if (!strcasecmp(v->name, "rtupdate")) {
- sip_cfg.peer_rtupdate = ast_true(v->value);
- } else if (!strcasecmp(v->name, "ignoreregexpire")) {
- sip_cfg.ignore_regexpire = ast_true(v->value);
- } else if (!strcasecmp(v->name, "timert1")) {
- /* Defaults to 500ms, but RFC 3261 states that it is recommended
- * for the value to be set higher, though a lower value is only
- * allowed on private networks unconnected to the Internet. */
- global_t1 = atoi(v->value);
- } else if (!strcasecmp(v->name, "timerb")) {
- int tmp = atoi(v->value);
- if (tmp < 500) {
- global_timer_b = global_t1 * 64;
- ast_log(LOG_WARNING, "Invalid value for timerb ('%s'). Setting to default ('%d').\n", v->value, global_timer_b);
- }
- timerb_set = 1;
- } else if (!strcasecmp(v->name, "t1min")) {
- global_t1min = atoi(v->value);
- } else if (!strcasecmp(v->name, "transport") && !ast_strlen_zero(v->value)) {
- char *val = ast_strdupa(v->value);
- char *trans;
-
- while ((trans = strsep(&val, ","))) {
- trans = ast_skip_blanks(trans);
-
- if (!strncasecmp(trans, "udp", 3)) {
- default_transports |= SIP_TRANSPORT_UDP;
- } else if (!strncasecmp(trans, "tcp", 3)) {
- default_transports |= SIP_TRANSPORT_TCP;
- } else if (!strncasecmp(trans, "tls", 3)) {
- default_transports |= SIP_TRANSPORT_TLS;
- } else {
- ast_log(LOG_NOTICE, "'%s' is not a valid transport type. if no other is specified, udp will be used.\n", trans);
- }
- if (default_primary_transport == 0) {
- default_primary_transport = default_transports;
- }
- }
- } else if (!strcasecmp(v->name, "tcpenable")) {
- if (!ast_false(v->value)) {
- ast_debug(2, "Enabling TCP socket for listening\n");
- sip_cfg.tcp_enabled = TRUE;
- }
- } else if (!strcasecmp(v->name, "tcpbindaddr")) {
- if (ast_parse_arg(v->value, PARSE_ADDR,
- &sip_tcp_desc.local_address)) {
- ast_log(LOG_WARNING, "Invalid %s '%s' at line %d of %s\n",
- v->name, v->value, v->lineno, config);
- }
- ast_debug(2, "Setting TCP socket address to %s\n",
- ast_sockaddr_stringify(&sip_tcp_desc.local_address));
- } else if (!strcasecmp(v->name, "dynamic_exclude_static") || !strcasecmp(v->name, "dynamic_excludes_static")) {
- global_dynamic_exclude_static = ast_true(v->value);
- } else if (!strcasecmp(v->name, "contactpermit") || !strcasecmp(v->name, "contactdeny")) {
- int ha_error = 0;
- sip_cfg.contact_ha = ast_append_ha(v->name + 7, v->value, sip_cfg.contact_ha, &ha_error);
- if (ha_error) {
- ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
- }
- } else if (!strcasecmp(v->name, "rtautoclear")) {
- int i = atoi(v->value);
- if (i > 0) {
- sip_cfg.rtautoclear = i;
- } else {
- i = 0;
- }
- ast_set2_flag(&global_flags[1], i || ast_true(v->value), SIP_PAGE2_RTAUTOCLEAR);
- } else if (!strcasecmp(v->name, "usereqphone")) {
- ast_set2_flag(&global_flags[0], ast_true(v->value), SIP_USEREQPHONE);
- } else if (!strcasecmp(v->name, "prematuremedia")) {
- global_prematuremediafilter = ast_true(v->value);
- } else if (!strcasecmp(v->name, "relaxdtmf")) {
- global_relaxdtmf = ast_true(v->value);
- } else if (!strcasecmp(v->name, "vmexten")) {
- ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten));
- } else if (!strcasecmp(v->name, "rtptimeout")) {
- if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) {
- ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
- global_rtptimeout = 0;
- }
- } else if (!strcasecmp(v->name, "rtpholdtimeout")) {
- if ((sscanf(v->value, "%30d", &global_rtpholdtimeout) != 1) || (global_rtpholdtimeout < 0)) {
- ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
- global_rtpholdtimeout = 0;
- }
- } else if (!strcasecmp(v->name, "rtpkeepalive")) {
- if ((sscanf(v->value, "%30d", &global_rtpkeepalive) != 1) || (global_rtpkeepalive < 0)) {
- ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d. Using default.\n", v->value, v->lineno);
- global_rtpkeepalive = DEFAULT_RTPKEEPALIVE;
- }
- } else if (!strcasecmp(v->name, "compactheaders")) {
- sip_cfg.compactheaders = ast_true(v->value);
- } else if (!strcasecmp(v->name, "notifymimetype")) {
- ast_copy_string(default_notifymime, v->value, sizeof(default_notifymime));
- } else if (!strcasecmp(v->name, "directrtpsetup")) {
- sip_cfg.directrtpsetup = ast_true(v->value);
- } else if (!strcasecmp(v->name, "notifyringing")) {
- sip_cfg.notifyringing = ast_true(v->value);
- } else if (!strcasecmp(v->name, "notifyhold")) {
- sip_cfg.notifyhold = ast_true(v->value);
- } else if (!strcasecmp(v->name, "notifycid")) {
- if (!strcasecmp(v->value, "ignore-context")) {
- sip_cfg.notifycid = IGNORE_CONTEXT;
- } else {
- sip_cfg.notifycid = ast_true(v->value);
- }
- } else if (!strcasecmp(v->name, "alwaysauthreject")) {
- sip_cfg.alwaysauthreject = ast_true(v->value);
- } else if (!strcasecmp(v->name, "auth_options_requests")) {
- if (ast_true(v->value)) {
- sip_cfg.auth_options_requests = 1;
- }
- } else if (!strcasecmp(v->name, "mohinterpret")) {
- ast_copy_string(default_mohinterpret, v->value, sizeof(default_mohinterpret));
- } else if (!strcasecmp(v->name, "mohsuggest")) {
- ast_copy_string(default_mohsuggest, v->value, sizeof(default_mohsuggest));
- } else if (!strcasecmp(v->name, "language")) {
- ast_copy_string(default_language, v->value, sizeof(default_language));
- } else if (!strcasecmp(v->name, "regcontext")) {
- ast_copy_string(newcontexts, v->value, sizeof(newcontexts));
- stringp = newcontexts;
- /* Let's remove any contexts that are no longer defined in regcontext */
- cleanup_stale_contexts(stringp, oldregcontext);
- /* Create contexts if they don't exist already */
- while ((context = strsep(&stringp, "&"))) {
- ast_copy_string(used_context, context, sizeof(used_context));
- ast_context_find_or_create(NULL, NULL, context, "SIP");
- }
- ast_copy_string(sip_cfg.regcontext, v->value, sizeof(sip_cfg.regcontext));
- } else if (!strcasecmp(v->name, "regextenonqualify")) {
- sip_cfg.regextenonqualify = ast_true(v->value);
- } else if (!strcasecmp(v->name, "callerid")) {
- ast_copy_string(default_callerid, v->value, sizeof(default_callerid));
- } else if (!strcasecmp(v->name, "mwi_from")) {
- ast_copy_string(default_mwi_from, v->value, sizeof(default_mwi_from));
- } else if (!strcasecmp(v->name, "fromdomain")) {
- char *fromdomainport;
- ast_copy_string(default_fromdomain, v->value, sizeof(default_fromdomain));
- if ((fromdomainport = strchr(default_fromdomain, ':'))) {
- *fromdomainport++ = '\0';
- if (!(default_fromdomainport = port_str2int(fromdomainport, 0))) {
- ast_log(LOG_NOTICE, "'%s' is not a valid port number for fromdomain.\n",fromdomainport);
- }
- } else {
- default_fromdomainport = STANDARD_SIP_PORT;
- }
- } else if (!strcasecmp(v->name, "outboundproxy")) {
- char *tok, *proxyname;
-
- if (ast_strlen_zero(v->value)) {
- ast_log(LOG_WARNING, "no value given for outbound proxy on line %d of sip.conf.", v->lineno);
- continue;
- }
-
- tok = ast_skip_blanks(strtok(ast_strdupa(v->value), ","));
-
- sip_parse_host(tok, v->lineno, &proxyname,
- &sip_cfg.outboundproxy.port,
- &sip_cfg.outboundproxy.transport);
-
- if ((tok = strtok(NULL, ","))) {
- sip_cfg.outboundproxy.force = !strncasecmp(ast_skip_blanks(tok), "force", 5);
- } else {
- sip_cfg.outboundproxy.force = FALSE;
- }
-
- if (ast_strlen_zero(proxyname)) {
- ast_log(LOG_WARNING, "you must specify a name for the outboundproxy on line %d of sip.conf.", v->lineno);
- sip_cfg.outboundproxy.name[0] = '\0';
- continue;
- }
-
- ast_copy_string(sip_cfg.outboundproxy.name, proxyname, sizeof(sip_cfg.outboundproxy.name));
-
- proxy_update(&sip_cfg.outboundproxy);
- } else if (!strcasecmp(v->name, "autocreatepeer")) {
- sip_cfg.autocreatepeer = ast_true(v->value);
- } else if (!strcasecmp(v->name, "match_auth_username")) {
- global_match_auth_username = ast_true(v->value);
- } else if (!strcasecmp(v->name, "srvlookup")) {
- sip_cfg.srvlookup = ast_true(v->value);
- } else if (!strcasecmp(v->name, "pedantic")) {
- sip_cfg.pedanticsipchecking = ast_true(v->value);
- } else if (!strcasecmp(v->name, "maxexpirey") || !strcasecmp(v->name, "maxexpiry")) {
- max_expiry = atoi(v->value);
- if (max_expiry < 1) {
- max_expiry = DEFAULT_MAX_EXPIRY;
- }
- } else if (!strcasecmp(v->name, "minexpirey") || !strcasecmp(v->name, "minexpiry")) {
- min_expiry = atoi(v->value);
- if (min_expiry < 1) {
- min_expiry = DEFAULT_MIN_EXPIRY;
- }
- } else if (!strcasecmp(v->name, "defaultexpiry") || !strcasecmp(v->name, "defaultexpirey")) {
- default_expiry = atoi(v->value);
- if (default_expiry < 1) {
- default_expiry = DEFAULT_DEFAULT_EXPIRY;
- }
- } else if (!strcasecmp(v->name, "mwiexpiry") || !strcasecmp(v->name, "mwiexpirey")) {
- mwi_expiry = atoi(v->value);
- if (mwi_expiry < 1) {
- mwi_expiry = DEFAULT_MWI_EXPIRY;
- }
- } else if (!strcasecmp(v->name, "tcpauthtimeout")) {
- if (ast_parse_arg(v->value, PARSE_INT32|PARSE_DEFAULT|PARSE_IN_RANGE,
- &authtimeout, DEFAULT_AUTHTIMEOUT, 1, INT_MAX)) {
- ast_log(LOG_WARNING, "Invalid %s '%s' at line %d of %s\n",
- v->name, v->value, v->lineno, config);
- }
- } else if (!strcasecmp(v->name, "tcpauthlimit")) {
- if (ast_parse_arg(v->value, PARSE_INT32|PARSE_DEFAULT|PARSE_IN_RANGE,
- &authlimit, DEFAULT_AUTHLIMIT, 1, INT_MAX)) {
- ast_log(LOG_WARNING, "Invalid %s '%s' at line %d of %s\n",
- v->name, v->value, v->lineno, config);
- }
- } else if (!strcasecmp(v->name, "sipdebug")) {
- if (ast_true(v->value))
- sipdebug |= sip_debug_config;
- } else if (!strcasecmp(v->name, "dumphistory")) {
- dumphistory = ast_true(v->value);
- } else if (!strcasecmp(v->name, "recordhistory")) {
- recordhistory = ast_true(v->value);
- } else if (!strcasecmp(v->name, "registertimeout")) {
- global_reg_timeout = atoi(v->value);
- if (global_reg_timeout < 1) {
- global_reg_timeout = DEFAULT_REGISTRATION_TIMEOUT;
- }
- } else if (!strcasecmp(v->name, "registerattempts")) {
- global_regattempts_max = atoi(v->value);
- } else if (!strcasecmp(v->name, "bindaddr") || !strcasecmp(v->name, "udpbindaddr")) {
- if (ast_parse_arg(v->value, PARSE_ADDR, &bindaddr)) {
- ast_log(LOG_WARNING, "Invalid address: %s\n", v->value);
- }
- } else if (!strcasecmp(v->name, "localnet")) {
- struct ast_ha *na;
- int ha_error = 0;
-
- if (!(na = ast_append_ha("d", v->value, localaddr, &ha_error))) {
- ast_log(LOG_WARNING, "Invalid localnet value: %s\n", v->value);
- } else {
- localaddr = na;
- }
- if (ha_error) {
- ast_log(LOG_ERROR, "Bad localnet configuration value line %d : %s\n", v->lineno, v->value);
- }
- } else if (!strcasecmp(v->name, "media_address")) {
- if (ast_parse_arg(v->value, PARSE_ADDR, &media_address))
- ast_log(LOG_WARNING, "Invalid address for media_address keyword: %s\n", v->value);
- } else if (!strcasecmp(v->name, "externaddr") || !strcasecmp(v->name, "externip")) {
- if (ast_parse_arg(v->value, PARSE_ADDR, &externaddr)) {
- ast_log(LOG_WARNING,
- "Invalid address for externaddr keyword: %s\n",
- v->value);
- }
- externexpire = 0;
- } else if (!strcasecmp(v->name, "externhost")) {
- ast_copy_string(externhost, v->value, sizeof(externhost));
- if (ast_sockaddr_resolve_first(&externaddr, externhost, 0)) {
- ast_log(LOG_WARNING, "Invalid address for externhost keyword: %s\n", externhost);
- }
- externexpire = time(NULL);
- } else if (!strcasecmp(v->name, "externrefresh")) {
- if (sscanf(v->value, "%30d", &externrefresh) != 1) {
- ast_log(LOG_WARNING, "Invalid externrefresh value '%s', must be an integer >0 at line %d\n", v->value, v->lineno);
[... 885 lines stripped ...]
More information about the asterisk-commits
mailing list