Commit Graph

2129 Commits

Author SHA1 Message Date
zuul 88dfcd21b2 Merge "chan_sip: Support auth username for callbackextension feature" 2016-06-09 21:35:42 -05:00
Joshua Colp 31a5c28339 res_odbc: Implement a connection pool.
Testing has shown that our usage of UnixODBC is problematic
due to bugs within UnixODBC itself as well as the heavy weight
cost of connecting and disconnecting database connections, even
when pooling is enabled.

For users of UnixODBC 2.3.1 and earlier crashes would occur due
to insufficient protection of the disconnect operation. This was
fixed in UnixODBC 2.3.2 and above.

For users of UnixODBC 2.3.3 and higher a slow-down would occur
under heavy database use due to repeated connection establishment.
A regression is present where on each connection the database
configuration is cached again, with the cache growing out of
control.

The connection pool implementation present in this change helps
to mitigate these issues by reducing how much we connect and
disconnect database connections. We also solve the issue of
crashes under UnixODBC 2.3.1 by defaulting the maximum number of
connections to 1, returning us to the previous working behavior.
For users who may have a fixed version the maximum concurrent
connection limit can be increased helping with performance.

The connection pool works by keeping a list of active connections.
If the connection limit has not been reached a new connection is
established. If the connection limit has been reached then the
request waits until a connection becomes available before
continuing.

ASTERISK-26074 #close
ASTERISK-26054 #close

Change-Id: I6774bf4bac49a0b30242c76a09c403d2e856ecff
2016-06-07 11:59:05 -03:00
Timo Teräs 538c6415c6 chan_sip: Support auth username for callbackextension feature
ASTERISK-20527 #close

Change-Id: I659cf7f00836a09d09d146ad226a40477d731239
2016-06-03 09:35:53 +03:00
Tzafrir Cohen 1d60bfcdf1 followme: allow disabling callee prompt
Add the option 'enable_callee_prompt' to followme.conf. Enabled by
default. If disabled, a callee is not prompted to accept or reject
the forwarded call.

ASTERISK-26064 #close

Change-Id: I0a8b19d4cf95c86a07c992813babb9e4a4acfff5
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-26 08:00:09 +03:00
Joshua Colp 56f24345f7 Merge "func_odbc: single database connection should be optional" 2016-05-24 09:28:03 -05:00
Alexei Gradinari c378b00a83 func_odbc: single database connection should be optional
func_odbc was changed in Asterisk 13.9.0
to make func_odbc use a single database connection per DSN
because of reported bug ASTERISK-25938
with MySQL/MariaDB LAST_INSERT_ID().

This is drawback in performance when func_odbc is used
very often in dialplan.

Single database connection should be optional.

ASTERISK-26010

Change-Id: I7091783a7150252de8eeb455115bd00514dfe843
2016-05-20 13:46:03 -04:00
Joshua Colp b57032c364 Merge "res_hep: Provide an option to pick the UUID type" 2016-05-19 05:26:57 -05:00
Matt Jordan a1803cb5f4 configs/samples/pjsip.conf.sample: Fix typo
A ':' is not a valid token for starting a comment.

Change-Id: I123592d93a83d1bdde3e352822881eb9da85e5ad
2016-05-14 21:49:42 -05:00
Matt Jordan e06a23681c res_hep: Provide an option to pick the UUID type
At one point in time, it seemed like a good idea to use the Asterisk
channel name as the HEP correlation UUID. In particular, it felt like
this would be a useful identifier to tie PJSIP messages and RTCP
messages together, along with whatever other data we may eventually send
to Homer. This also had the benefit of keeping the correlation UUID
channel technology agnostic.

In practice, it isn't as useful as hoped, for two reasons:
1) The first INVITE request received doesn't have a channel. As a
   result, there is always an 'odd message out', leading it to be
   potentially uncorrelated in Homer.
2) Other systems sending capture packets (Kamailio) use the SIP Call-ID.
   This causes RTCP information to be uncorrelated to the SIP message
   traffic seen by those capture nodes.

In order to support both (in case someone is trying to use res_hep_rtcp
with a non-PJSIP channel), this patch adds a new option, uuid_type, with
two valid values - 'call-id' and 'channel'. The uuid_type option is used
by a module to determine the preferred UUID type. When available, that
source of a correlation UUID is used; when not, the more readily available
source is used.

For res_hep_pjsip:
 - uuid_type = call-id: the module uses the SIP Call-ID header value
 - uuid_type = channel: the module uses the channel name if available,
                        falling back to SIP Call-ID if not
For res_hep_rtcp:
 - uuid_type = call-id: the module uses the SIP Call-ID header if the
                        channel type is PJSIP and we have a channel,
                        falling back to the Stasis event provided
                        channel name if not
 - uuid_type = channel: the module uses the channel name

ASTERISK-25352 #close

Change-Id: Ide67e59a52d9c806e3cc0a797ea1a4b88a00122c
2016-05-14 09:42:20 -05:00
Joshua Colp 1bfe8602a5 Merge "basic-cfg: asterisk.conf: don't set languages" 2016-05-13 04:53:39 -05:00
Joshua Colp da2506b2dc Merge "basic-cfg: asterisk.conf: debug level 5 spams" 2016-05-13 04:53:27 -05:00
Joshua Colp d733dccf81 Merge "basic-cfg: asterisk.conf: defaults of options" 2016-05-13 04:53:13 -05:00
zuul c5cb9d120f Merge "basic-cfg: asterisk.conf: remove [directories]" 2016-05-12 19:52:13 -05:00
Tzafrir Cohen ec85ea3c21 basic-cfg: asterisk.conf: don't set languages
* No need to set language in a miniml configuration. 'en' will do just
  fine.
* It would be useful to have an example of setting it to a different
  language.
* Setting the documentation language explicitly is likewise not
  required. Setting it to a different value is not common. At least
  until there is a set of translated documentation.

Change-Id: I94d91ea34e129925f25af81ef8dc0906fb568cb7
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-10 11:10:55 +03:00
Tzafrir Cohen 1b0a9bb2c4 basic-cfg: asterisk.conf: debug level 5 spams
Don't suggest users to use debug level 5, which spews (usually
non-useful) debug information. Reduce the suggestion to (an
arbitrarily-selected) level 2.

Change-Id: Ib53195f78945970956ff59ef13fa89b90e0fcd60
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-10 11:08:33 +03:00
Tzafrir Cohen d0ba3e8196 basic-cfg: asterisk.conf: defaults of options
Note the default of remmed-out options. To clarify that those values are
not the defaults.

Change-Id: I849c29b7a710f0abc37355fcb5bfee335ae30738
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-10 11:06:57 +03:00
Tzafrir Cohen f943a1fd84 basic-cfg: asterisk.conf: remove [directories]
A minimal configuration does not need to explicitly spell out the
directories. The built-in defaults will do just fine. In many cases
they are wrong.

Change-Id: Id1a671e5c5e9923765a4156b57f9f7e263fdd26c
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
2016-05-10 11:04:46 +03:00
Jaco Kroon 8923c9ac96 app_confbridge: Add a regcontext option for confbridge bridge profiles.
This patch allows for having app_confbridge register the name of the
conference as an extension into a specific context, similar to
regcontext for chan_sip.  This variant is not quite as involved as the
one in chan_sip and doesn't allow for multiple contexts or custom
extensions, you can only specify the context and the conference name
will always be used as the extension to register.

ASTERISK-25989 #close

Change-Id: Icacf94d9f2b5dfd31ef36f6cb702392619a7902f
2016-05-09 08:18:56 -05:00
Diederik de Groot bf13b59062 configs/basic-pbx/asterisk.conf: contains incorrect path separator
Note: When packagers use these files (as an example) the paths are never
really used when they are split using '='.

Note: Thirdparty applications will also have trouble parsing the file when
expecting '=>'.

Change-Id: I0ada647f588e81f023fb1333ca15a1a333fd6004
2016-05-01 09:25:00 +02:00
George Joseph 4ebf9a938d res_pjsip: Add ability to identify by Authorization username
A feature of chan_sip that service providers relied upon was the ability to
identify by the Authorization username.  This is most often used when customers
have a PBX that needs to register rather than identify by IP address.  From my
own experiance, this is pretty common with small businesses who otherwise
don't need a static IP.

In this scenario, a register from the customer's PBX may succeed because From
will usually contain the PBXs account id but an INVITE will contain the caller
id.  With nothing recognizable in From, the service provider's Asterisk can
never match to an endpoint and the INVITE just stays unauthorized.

The fixes:

A new value "auth_username" has been added to endpoint/identify_by that
will use the username and digest fields in the Authorization header
instead of username and domain in the the From header to match an endpoint,
or the To header to match an aor.  This code as added to
res_pjsip_endpoint_identifier_user rather than creating a new module.

Although identify_by was always a comma-separated list, there was only
1 choice so order wasn't preserved.  So to keep the order, a vector was added
to the end of ast_sip_endpoint.  This is only used by res_pjsip_registrar
to find the aor.  The res_pjsip_endpoint_identifier_* modules are called in
globals/endpoint_identifier_order.

Along the way, the logic in res_pjsip_registrar was corrected to match
most-specific to least-specific as res_pjsip_endpoint_identifier_user does.

The order is:

username@domain
username@domain_alias
username

Auth by username does present 1 problem however, the first INVITE won't have
an Authorization header so the distributor, not finding a match on anything,
sends a securty_alert.  It still sends a 401 with a challenge so the next
INVITE will have the Authorization header and presumably succeed.  As a result
though, that first security alert is actually a false alarm.

To address this, a new feature has been added to pjsip_distributor that keeps
track of unidentified requests and only sends the security alert if a
configurable number of unidentified requests come from the same IP in a
configurable amout of time.  Those configuration options have been added to
the global config object.  This feature is only used when auth_username
is enabled.

Finally, default_realm was added to the globals object to replace the hard
coded "asterisk" used when an endpoint is not yet identified.

The testsuite tests all pass but new tests are forthcoming for this new
feature.

ASTERISK-25835 #close
Reported-by: Ross Beer

Change-Id: I30ba62d208e6f63439600916fcd1c08a365ed69d
2016-04-27 16:33:51 -05:00
Alexei Gradinari 860b135c88 res_pjsip: disable multi domain to improve realtime performace
This patch added new global pjsip option 'disable_multi_domain'.
Disabling Multi Domain can improve Realtime performance by reducing
number of database requests.

ASTERISK-25930 #close

Change-Id: I2e7160f3aae68475d52742107949a799aa2c7dc7
2016-04-27 10:58:43 -05:00
Leif Madsen 6ede210c98 Remove reference to non-existent sip.conf option
Option was removed in commit 7f883ef495

ASTERISK-25927 #close

Change-Id: I92f9b0196d9fc41d1d58354c07340c465ef1fcf8
2016-04-22 13:12:29 -05:00
George Joseph e2524fcee3 res_pjsip_mwi: Add voicemail extension and mwi_subscribe_replaces_unsolicited
res_pjsip_mwi was missing the chan_sip "vmexten" functionality which adds
the Message-Account header to the MWI NOTIFY.  Also, specifying mailboxes
on endpoints for unsolicited mwi and on aors for subscriptions required
that the admin know in advance which the client wanted.  If you specified
mailboxes on the endpoint, subscriptions were rejected even if you also
specified mailboxes on the aor.

Voicemail extension:
* Added a global default_voicemail_extension which defaults to "".
* Added voicemail_extension to both endpoint and aor.
* Added ast_sip_subscription_get_dialog for support.
* Added ast_sip_subscription_get_sip_uri for support.

When an unsolicited NOTIFY is constructed, the From header is parsed, the
voicemail extension from the endpoint is substituted for the user, and the
result placed in the Message-Account field in the body.

When a subscribed NOTIFY is constructed, the subscription dialog local uri
is parsed, the voicemail_extension from the aor (looked up from the
subscription resource name) is substituted for the user, and the result
placed in the Message-Account field in the body.

If no voicemail extension was defined, the Message-Account field is not added
to the NOTIFY body.

mwi_subscribe_replaces_unsolicited:
* Added mwi_subscribe_replaces_unsolicited to endpoint.

The previous behavior was to reject a subscribe if a previous internal
subscription for unsolicited MWI was found for the mailbox.  That remains the
default.  However, if there are mailboxes also set on the aor and the client
subscribes and mwi_subscribe_replaces_unsolicited is set, the existing internal
subscription is removed and replaced with the external subscription.  This
allows an admin to configure mailboxes on both the endpoint and aor and allows
the client to select which to use.

ASTERISK-25865 #close
Reported-by: Ross Beer

Change-Id: Ic15a9415091760539c7134a5ba3dc4a6a1217cea
2016-03-30 13:23:54 -05:00
George Joseph c948ce9651 sorcery/res_pjsip: Refactor for realtime performance
There were a number of places in the res_pjsip stack that were getting
all endpoints or all aors, and then filtering them locally.

A good example is pjsip_options which, on startup, retrieves all
endpoints, then the aors for those endpoints, then tests the aors to see
if the qualify_frequency is > 0.  One issue was that it never did
anything with the endpoints other than retrieve the aors so we probably
could have skipped a step and just retrieved all aors. But nevermind.

This worked reasonably well with local config files but with a realtime
backend and thousands of objects, this was a nightmare.  The issue
really boiled down to the fact that while realtime supports predicates
that are passed to the database engine, the non-realtime sorcery
backends didn't.

They do now.

The realtime engines have a scheme for doing simple comparisons. They
take in an ast_variable (or list) for matching, and the name of each
variable can contain an operator.  For instance, a name of
"qualify_frequency >" and a value of "0" would create a SQL predicate
that looks like "where qualify_frequency > '0'".  If there's no operator
after the name, the engines add an '=' so a simple name of
"qualify_frequency" and a value of "10" would return exact matches.

The non-realtime backends decide whether to include an object in a
result set by calling ast_sorcery_changeset_create on every object in
the internal container.  However, ast_sorcery_changeset_create only does
exact string matches though so a name of "qualify_frequency >" and a
value of "0" returns nothing because the literal "qualify_frequency >"
doesn't match any name in the objset set.

So, the real task was to create a generic string matcher that can take a
left value, operator and a right value and perform the match. To that
end, strings.c has a new ast_strings_match(left, operator, right)
function.  Left and right are the strings to operate on and the operator
can be a string containing any of the following: = (or NULL or ""), !=,
>, >=, <, <=, like or regex.  If the operator is like or regex, the
right string should be a %-pattern or a regex expression.  If both left
and right can be converted to float, then a numeric comparison is
performed, otherwise a string comparison is performed.

To use this new function on ast_variables, 2 new functions were added to
config.c.  One that compares 2 ast_variables, and one that compares 2
ast_variable lists.  The former is useful when you want to compare 2
ast_variables that happen to be in a list but don't want to traverse the
list.  The latter will traverse the right list and return true if all
the variables in it match the left list.

Now, the backends' fields_cmp functions call ast_variable_lists_match
instead of ast_sorcery_changeset_create and they can now process the
same syntax as the realtime engines.  The realtime backend just passes
the variable list unaltered to the engine.  The only gotcha is that
there's no common realtime engine support for regex so that's been noted
in the api docs for ast_sorcery_retrieve_by_fields.

Only one more change to sorcery was done...  A new config flag
"allow_unqualified_fetch" was added to reg_sorcery_realtime.
"no": ignore fetches if no predicate fields were supplied.
"error": same as no but emit an error. (good for testing)
"yes": allow (the default);
"warn": allow but emit a warning. (good for testing)

Now on to res_pjsip...

pjsip_options was modified to retrieve aors with qualify_frequency > 0
rather than all endpoints then all aors.  Not only was this a big
improvement in realtime retrieval but even for config files there's an
improvement because we're not going through endpoints anymore.

res_pjsip_mwi was modified to retieve only endpoints with something in
the mailboxes field instead of all endpoints then testing mailboxes.

res_pjsip_registrar_expire was completely refactored.  It was retrieving
all contacts then setting up scheduler entries to check for expiration.
Now, it's a single thread (like keepalive) that periodically retrieves
only contacts whose expiration time is < now and deletes them.  A new
contact_expiration_check_interval was added to global with a default of
30 seconds.

Ross Beer reports that with this patch, his Asterisk startup time dropped
from around an hour to under 30 seconds.

There are still objects that can't be filtered at the database like
identifies, transports, and registrations.  These are not going to be
anywhere near as numerous as endpoints, aors, auths, contacts however.

Back to allow_unqualified_fetch.  If this is set to yes and you have a
very large number of objects in the database, the pjsip CLI commands
will attempt to retrive ALL of them if not qualified with a LIKE.
Worse, if you type "pjsip show endpoint <tab>" guess what's going to
happen? :)  Having a cache helps but all the objects will have to be
retrieved at least once to fill the cache.  Setting
allow_unqualified_fetch=no prevents the mass retrieve and should be used
on endpoints, auths, aors, and contacts.  It should NOT be used for
identifies, registrations and transports since these MUST be
retrieved in bulk.

Example sorcery.conf:

[res_pjsip]
endpoint=config,pjsip.conf,criteria=type=endpoint
endpoint=realtime,ps_endpoints,allow_unqualified_fetch=error

ASTERISK-25826 #close
Reported-by: Ross Beer
Tested-by: Ross Beer

Change-Id: Id2691e447db90892890036e663aaf907b2dc1c67
2016-03-27 22:43:27 -05:00
Philip Correia e2853ae337 res_parking: Update parking documentation for dynamic parking lots.
* Remove duplicate res_parking.conf courtesytone config option
documentation.

ASTERISK-24596 #close
Reported by:  Philip Correia

ASTERISK-24605
Reported by:  Philip Correia
Patches:
      call_park_app_doc.patch (license #6672) patch uploaded by Philip Correia

Change-Id: I90a92a891c6494dc08173e675856afcc4764c5b5
2016-03-25 18:25:47 -05:00
Joshua Colp 62d98b5a7f Merge "res_pjsip/config_transport: Allow reloading transports." 2016-02-27 10:18:26 -06:00
zuul 170941990b Merge "chan_sip: Optionally supply fromuser/fromdomain in SIP dial string." 2016-02-25 17:56:42 -06:00
George Joseph ba8adb4ce3 res_pjsip/config_transport: Allow reloading transports.
The 'reload' mechanism actually involves closing the underlying
socket and calling the appropriate udp, tcp or tls start functions
again.  Only outbound_registration, pubsub and session needed work
to reset the transport before sending requests to insure that the
pjsip transport didn't get pulled out from under them.

In my testing, no calls were dropped when a transport was changed
for any of the 3 transport types even if ip addresses or ports were
changed. To be on the safe side however, a new transport option was
added (allow_reload) which defaults to 'no'.  Unless it's explicitly
set to 'yes' for a transport, changes to that transport will be ignored
on a reload of res_pjsip.  This should preserve the current behavior.

Change-Id: I5e759850e25958117d4c02f62ceb7244d7ec9edf
2016-02-19 18:57:55 -06:00
Walter Doekes c00082329e chan_sip: Optionally supply fromuser/fromdomain in SIP dial string.
Previously you could add [!dnid] to the SIP dial string to alter the To:
header. This change allows you to alter the From header as well.

SIP dial string extra options now look like this:

    [![touser[@todomain]][![fromuser][@fromdomain]]]

INCOMPATIBLE CHANGE: If you were using an exclamation mark in your To:
header, that is no longer possible.

ASTERISK-25803 #close

Change-Id: I2457e9ba7a89eb1da22084bab5a4d4328e189db7
2016-02-19 11:30:15 +01:00
George Joseph f8767a8804 res_pjproject: Add ability to map pjproject log levels to Asterisk log levels
Warnings and errors in the pjproject libraries are generally handled by
Asterisk.  In many cases, Asterisk wouldn't even consider them to be warnings
or errors so the messages emitted by pjproject directly are either superfluous
or misleading.  A good exampe of this are the level-0 errors pjproject emits
when it can't open a TCP/TLS socket to a client to send an OPTIONS.  We don't
consider a failure to qualify a UDP client an "ERROR", why should a TCP/TLS
client be treated any differently?

A config file for res_pjproject has bene added (pjproject.conf) and a new
log_mappings object allows mapping pjproject levels to Asterisk levels
(or nothing).  The defaults if no pjproject.conf file is found are the same
as those that were hard-coded into res_pjproject initially: 0,1 = LOG_ERROR,
2 = LOG_WARNING, 3,4,5 = LOG_DEBUG<level>

Change-Id: Iba7bb349c70397586889b8f45b8c3d6c6c8c3898
2016-02-18 16:30:29 -06:00
Joshua Colp fc0527eb4f Merge "pjsip/alembic: Add missing columns to system and registration" 2016-02-05 11:50:35 -06:00
Joshua Colp e541d9cf34 Merge topic 'ASTERISK-20987'
* changes:
  app_confbridge: Add ability to get the muted conference state.
  app_confbridge.c: Update CONFBRIDGE and CONFBRIDGE_INFO documentation.
  app_confbridge: Make non-admin users join a muted conference muted.
2016-02-05 11:49:15 -06:00
George Joseph 9b13ab6a63 pjsip/alembic: Add missing columns to system and registration
ps_systems needed disable_tcp_switch
ps_registrations needed line and endpoint

ASTERISK-25737 #close

Change-Id: Iaf9c2d69e62243d9fa53104c28c5339c47d4ac19
2016-02-04 14:23:45 -06:00
Sean Bright d83dba7099 res_rtp_asterisk: Allow ICE host candidates to be overriden
During ICE negotiation the IPs of the local interfaces are sent to the remote
peer as host candidates. In many cases Asterisk is behind a static one-to-one
NAT, so these host addresses will be internal IP addresses.

To help in hiding the topology of the internal network, this patch adds the
ability to override the host candidates by matching them against a
user-defined list of replacements.

Change-Id: I1c9541af97b83a4c690c8150d19bf7202c8bff1f
2016-02-03 17:06:20 -06:00
Joshua Colp 0de74fad55 AST-2016-001 http: Provide greater control of TLS and set modern defaults.
This change exposes the configuration of various aspects of the TLS
support and sets the default to the modern standards.

The TLS cipher is now set to the best values according to the
Mozilla OpSec team, different TLS versions can now be disabled, and
the cipher order can be forced to be that of the server instead of
the client.

ASTERISK-24972 #close

Change-Id: I0a10f2883f7559af5e48dee0901251dbf30d45b8
2016-02-03 15:10:16 -06:00
Richard Mudgett 12c93e8f81 app_confbridge: Make non-admin users join a muted conference muted.
ASTERISK-20987 #close
Reported by: hristo

Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38
2016-01-27 16:46:20 -06:00
George Joseph f19bf7a321 res_pjsip: Add res_pjproject dependency to samples
Since res_pjsip now depends on res_pjproject, this has been added to
basic-pbx modules.conf.

Change-Id: I42826597d5e10f08e518208860c44c96e52f1b2d
2016-01-27 13:23:10 -06:00
Mark Michelson 53570e2c6f Merge "chan_sip: option 'notifyringing' change and doc fix" 2016-01-21 15:22:53 -06:00
Daniel Journo eaf2b5052e Update version number in features.conf.sample
Update the version number in the comments from Asterisk 12 to Asterisk 12+

Change-Id: Ie692ac8cda3c993c3bf10f27f51a1cca3317ec7b
2016-01-16 20:02:43 +00:00
Daniel Journo 8182146e85 pjsip: Add option global/regcontext
Added new global option (regcontext) to pjsip. When set, Asterisk will
dynamically create and destroy a NoOp priority 1 extension
for a given endpoint who registers or unregisters with us.

ASTERISK-25670 #close
Reported-by: Daniel Journo

Change-Id: Ib1530c5b45340625805c057f8ff1fb240a43ea62
2016-01-13 11:42:20 -06:00
George Joseph a41aab477a pjsip_sdp_rtp: Add option endpoint/bind_rtp_to_media_address
On a system with multiple ip addresses in the same subnet, if a
transport is bound to a specific ip address and endpoint/media_address
 is set, the SIP/SDP will have the correct address in all fields but
the rtp stream MAY still originate from one of the other ip addresses,
most probably the "primary" ip address.  This happens because
 res_pjsip_sdp_rtp/create_rtp always calls ast_instance_new with
the "all" ip address (0.0.0.0 or ::).

The new option causes res_pjsip_sdp_rtp/create_rtp to call
ast_rtp_instance_new with the endpoint's media_address (if specified)
instead of the "all" address.  This causes the packets to originate from
the specified address.

ASTERISK-25632
ASTERISK-25637
Reported-by: Olivier Krief
Reported-by: Dan Journo

Change-Id: I3dfaa079e54ba7fb7c4fd1f5f7bd9509bbf8bd88
2016-01-11 18:41:31 -06:00
Ward van Wanrooij d4b10cfb3e chan_sip: option 'notifyringing' change and doc fix
In the sample sip.conf this is written with regard to notifyringing:
;notifyringing = no ; Control whether subscriptions already INUSE get sent
RINGING when another call is sent (default: yes)

However, this setting changes whether or not any RINGING indications are sent
to subscriptions. There is no separate configurable setting that allows
to control whether INUSE subscriptions also get sent RINGING. This is however
a useful option, to see (using BLF) if somebody else is able to handle an
incoming call or if everybody is busy.

This patch corrects the documentation for notifyringing (so the documentation
matches the functionality) and make notifyringing a tri-state option, by adding
the value 'notinuse' (in addition to 'yes' and 'no'). When notifyringing =
notinuse, only subscriptions that are not INUSE are sent the RINGING signal.

The default setting for notifyringing remains set to yes, so the default
behaviour is not affected.

ASTERISK-25558

Change-Id: I88f7036ee084bb3f43b74f15612695c6708f74aa
2015-12-26 16:24:09 +01:00
Dade Brandon ca394161cf app_amd: Correct maximum_number_of_words functionality & documentation
- The maximum_number_of_words was previously documented as being
the number of words that when exceeded, would result in the AMD
application returning that the audio represents a machine.

This was inconsistent with its actual functionality - it was
a number of words that when REACHED, would result in determination
as a machine.

This update corrects the functionality to match the previously
documented functionality.  This is a backwards incompatible change
in configuration file, and has been added to UPGRADE.txt as a result.

The sample configuration file and application defaults have been updated
so that the default value is now 2, which reflects the same default
functionality as previous versions.

- Update documentation for silence_threshold, which previously implied
that it was measuring time, rather than noise averages in the sample.

- Update the comments in amd.conf.sample.

ASTERISK-25639 #close
Change-Id: I4b1451e5dc9cb3cb06d59b6ab872f5275ba79093
2015-12-21 16:02:09 -08:00
Mark Michelson ed13732188 Confbridge: Add a user timeout option
This option adds the ability to specify a timeout, in seconds, for a
participant in a ConfBridge. When the user's timeout has been reached,
the user is ejected from the conference with the CONFBRIDGE_RESULT
channel variable set to "TIMEOUT".

The rationale for this change is that there have been times where we
have seen channels get "stuck" in ConfBridge because a network issue
results in a SIP BYE not being received by Asterisk. While these
channels can be hung up manually via CLI/AMI/ARI, adding some sort of
automatic cleanup of the channels is a nice feature to have.

ASTERISK-25549 #close
Reported by Mark Michelson

Change-Id: I2996b6c5e16a3dda27595f8352abad0bda9c2d98
2015-11-16 14:13:13 -06:00
Corey Farrell 40574a2ea3 chan_sip: Allow websockets to be disabled.
This patch adds a new setting "websockets_enabled" to sip.conf.
Setting this to false allows chan_sip to be used without causing
conflicts with res_pjsip_transport_websocket.

ASTERISK-24106 #close
Reported by: Andrew Nagy

Change-Id: I04fe8c4f2d57b2d7375e0e25826c91a72e93bea7
2015-11-03 08:53:00 -05:00
Kevin Harwell 691c0e0b31 res_pjsip_outbound_registration: registration stops due to fatal 4xx response
During outbound registration it is possible to receive a fatal (any permanent/
non-temporary 4xx, 5xx, 6xx) response from the registrar that is simply due
to a problem with the registrar itself. Upon receiving the failure response
Asterisk terminates outbound registration for the given endpoint.

This patch adds an option, 'fatal_retry_interval', that when set continues
outbound registration at the given interval up to 'max_retries' upon receiving
a fatal response.

ASTERISK-25485 #close

Change-Id: Ibc2c7b47164ac89cc803433c0bbe7063bfa143a2
2015-10-23 09:42:46 -05:00
Matt Jordan 2d7a4a3357 main/logger: Add log formatters and JSON structured logs
When Asterisk is part of a larger distributed system, log files are often
gathered using tools (such as logstash) that prefer to consume information
and have it rendered using other tools (such as Kibana) that prefer a
structured format, e.g., JSON. This patch adds support for JSON formatted
logs by adding support for an optional log format specifier in Asterisk's
logging subsystem. By adding a format specifier of '[json]':

full => [json]debug,verbose,notice,warning,error

Log messages will be output to the 'full' channel in the following
format:

{
  "hostname": Hostname or name specified in asterisk.conf
  "timestamp": Date/Time
  "identifiers": {
    "lwp": Thread ID,
    "callid": Call Identifier
  }
  "logmsg": {
    "location": {
      "filename": Name of the file that generated the log statement
      "function": Function that generated the log statement
      "line": Line number that called the logging function
    }
    "level": Log level, e.g., DEBUG, VERBOSE, etc.
    "message": Actual text of the log message
  }
}

ASTERISK-25425 #close

Change-Id: I8649bfedf3fb7bf3138008cc11565553209cc238
2015-09-29 07:28:01 -05:00
Joshua Colp 309dd2a409 pjsip: Add rtp_timeout and rtp_timeout_hold endpoint options.
This change adds support for the 'rtp_timeout' and 'rtp_timeout_hold'
endpoint options. These allow the channel to be hung up if RTP
is not received from the remote endpoint for a specified number of
seconds.

ASTERISK-25259 #close

Change-Id: I3f39daaa7da2596b5022737b77799d16204175b9
2015-07-24 12:43:43 -03:00
Mark Michelson a0c31c7a05 res_pjsip: Add rtp_keepalive to sample config file.
Change-Id: I5f62d0c5684f8b2335f9f8ac2d79ee04fbdafb19
2015-07-24 09:48:58 -05:00
Rusty Newton d02196448b Documentation: A couple of trivial fixes in sip.conf.sample and func_cdr.c
* In sip.conf.sample fix sentence where we said that WS or WSS are supported
   transports for use in an outbound register definition. They are not
   supported in that case.
 * In func_cdr.c made it clear that the Disable option for CDR_PROP can be used
   to enable CDR on a channel.

ASTERISK-24867 #close
Reported by: Rusty Newton

ASTERISK-24853 #close
Reported by: PSDK

Change-Id: I3d698bc6302b9d00a0a995b5c4ad9a42d69b48ca
2015-07-20 12:39:48 -05:00
Kevin Harwell 93ac45d3bd res_pjsip: Add option to force G.726 to be treated as AAL2 packed.
Some phones send g.726 audio packed for AAL2, which differs from what is
recommended by RFC 3351. If Asterisk receives audio formatted as such when
negotiating g.726 then it sounds a bit distorted. Added an option to
res_pjsip_endpoint that allows g.726 negotiated audio to be treated as g.726
AAL2 packed.

ASTERISK-25158 #close
Reported by: Steve Pitts

Change-Id: Ie7e21f75493d7fe53e75e12c971e72f5afa33615
2015-06-15 12:40:03 -05:00
Joshua Colp 87470f7d81 Merge "tcptls: Enable multiple TLS certificate chains (RSA+ECC+DSA) for server socket." 2015-05-15 09:38:57 -05:00
Alexander Traud 8f3f414d8c tcptls: Enable multiple TLS certificate chains (RSA+ECC+DSA) for server socket.
When a client connects to a server via SSL/TLS, the server commonly utilizes an
RSA key-pair. However, other such algorithms exist (i.e. DSA and ECDSA), and if
the server socket is configured with a certificate for either one of those, it
would lose its compatibility with RSA-only clients.

Now, the server socket can be configured with up to one RSA, ECDSA and DSA key
each. For example, if a client is not compatible with SHA-2 hashed certificates
like Nokia mobile phones, the server socket still can use RSA/SHA-1 for legacy
clients and ECDSA/SHA-2 for everyone else.

ASTERISK-24815 #close
Reported by: Alexander Traud
patches:
  tls_rsa_ecc_dsa.patch uploaded by Alexander Traud (License 6520)

Change-Id: Iada5e00d326db5ef86e0af7069b4dfa1b979da9a
2015-05-15 10:01:04 +02:00
Joshua Colp 2bbfcfc647 Merge "cdr_adaptive_odbc: Add ability to set character for quoted identifiers." 2015-05-14 05:28:16 -05:00
Joshua Colp 4e482bf901 Merge "cel_pgsql: Add support for setting schema" 2015-05-13 15:17:19 -05:00
Rusty Newton 5e361e1476 configs/basic-pbx: Modified main IVR to play new Allison prompt.
The main IVR was playing demo-congrats. I've switched it over to the
basic-pbx-ivr-main file that we added in core sounds 1.4.27. This prompt
has Allison prompting the user with the actual IVR menu.

ASTERISK-24892 #close

Change-Id: Ifb749616ff8e156a1031ddaddfcc9244767a095d
2015-05-08 14:47:51 -05:00
Richard Mudgett 7103b374ef chan_dahdi: Improve force_restart_unavailable_chans option description.
ASTERISK-25034
Reported by: Richard Mudgett

Change-Id: I1ff8f02124d2f4abd632a050da52c64285bb7f30
2015-05-06 16:12:00 -05:00
Rodrigo Ramírez Norambuena cb79b8ab80 cel_pgsql: Add support for setting schema
Add feature to set optional schema parameter on configuration file via
'schema' setting.

Fix query to get columns from table while considering schema. If in
the database there exists two tables with same name in distinct schemas
it will return an error when inserting record.

ASTERISK-24967 #close

Change-Id: I691fd2cbc277fcba10e615f5884f8de5d8152f2c
2015-05-05 07:59:12 -04:00
Rodrigo Ramírez Norambuena a24ce38e5e cdr_adaptive_odbc: Add ability to set character for quoted identifiers.
Added the ability to set the character to quote identifiers. This
allows adding the character at the start and end of table and column
names. This setting is configurable for cdr_adaptive_odbc via the
quoted_identifiers in configuration file cdr_adaptive_odbc.conf.

ASTERISK-25006

Change-Id: I0b9a56b79ca13a727a803d88ed3b8643e37632b8
2015-05-05 04:38:33 -04:00
Joshua Colp ddf9dcaad7 Merge "cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8" 2015-05-03 11:37:36 -05:00
Rodrigo Ramírez Norambuena 8886b724ae cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8
This patch adds a new option to cdr.conf, 'newcdrcolumns', that will handle CDR
columns added in Asterisk 1.8. The columns are:
 * peeraccount
 * linkedid
 * sequence
When enabled, the columns in the database entry will be populated with the data
from the CDR.

ASTERISK-24976 #close

Change-Id: I51a57063f4ae5e194a9d933a8df45dc8a4534f0b
2015-05-03 09:50:25 -05:00
Corey Farrell 6b208d8c3b Sample Configs: Fix syntax error in pjsip.conf
The sample pjsip.conf has a few comment lines that are missing the
semicolons at the start of the comment, causing the config to fail
load.

Change-Id: I776a38c916a7df7ee3e072fd0b21dbf4cc457352
2015-04-30 15:59:36 -05:00
Richard Mudgett 03c51cf525 chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option.
Some telco switches occasionally ignore ISDN RESTART requests.  The fix
for ASTERISK-19608 added an escape clause for B channels in the restarting
state if the telco ignores a RESTART request.  If the telco fails to
acknowledge the RESTART then Asterisk will assume the telco acknowledged
the RESTART on the second call attempt requesting the B channel by the
telco.  The escape clause is good for dealing with RESTART requests in
general but it does cause the next call for the restarting B channel to be
rejected if the telco insists the call must go on that B channel.

chan_dahdi doesn't really need to issue a RESTART request in response to
receiving a cause 44 (Requested channel not available) code.  Sending the
RESTART in such a situation is not required (nor prohibited) by the
standards.  I think chan_dahdi does this for historical reasons to deal
with buggy peers to get channels unstuck in a similar fashion as the
chan_dahdi.conf resetinterval option.

* Add the chan_dahdi.conf force_restart_unavailable_chans compatability
option that when disabled will prevent chan_dahdi from trying to RESTART
the channel in response to a cause 44 code.

ASTERISK-25034 #close
Reported by: Richard Mudgett

Change-Id: Ib8b17a438799920f4a2038826ff99a1884042f65
2015-04-30 10:24:57 -05:00
Corey Farrell 55a780d211 Git Conversion: Switch Non-C files to ASTERISK_REGISTER_FILE.
This switches files used to generate other sources to use the new
ASTERISK_REGISTER_FILE macro.

ASTERISK-25026 #close
Reported by: Corey Farrell

Change-Id: Ieb2537b83421cad07c8955e5f90c405ccf079740
2015-04-29 01:02:10 -04:00
Joshua Colp b2153f1f49 Merge "cdr/cdr_odbc.c: Added to record new columns add on CDR 1.8 Asterisk Version" 2015-04-28 06:55:30 -05:00
Corey Farrell 5c1d07baf0 Astobj2: Allow reference debugging to be enabled/disabled by config.
* The REF_DEBUG compiler flag no longer has any effect on code that uses
  Astobj2.  It is used to determine if reference debugging is enabled by
  default.  Reference debugging can be enabled or disabled in asterisk.conf.
* Caller information is provided in logger errors for ao2 bad magic numbers.
* Optimizes AO2 by merging internal functions with the public counterpart.
  This was possible now that we no longer require a dual ABI.

ASTERISK-24974 #close
Reported by: Corey Farrell

Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
2015-04-27 18:37:26 -04:00
Rodrigo Ramírez Norambuena 358080e86e cdr/cdr_odbc.c: Added to record new columns add on CDR 1.8 Asterisk Version
Add new column to INSERT new columns added in cdr 1.8 version. The columns are:
 * peeraccount
 * linkedid
 * sequence
This feature is configurable in cdr_odbc.conf using a new configuration
option, 'newcdrcolumns'.

ASTERISK-24976 #close

Change-Id: Ibe0c7540a88305c6012786f438a0813ad8b19127
2015-04-27 09:38:15 -05:00
George Joseph c6ed681638 res_pjsip: Add global option to limit the maximum time for initial qualifies
Currently when Asterisk starts initial qualifies of contacts are spread out
randomly between 0 and qualify_timeout to prevent network and system overload.
If a contact's qualify_frequency is 5 minutes however, that contact may be
unavailable to accept calls for the entire 5 minutes after startup.  So while
staggering the initial qualifies is a good idea, basing the time on
qualify_timeout could leave contacts unavailable for too long.

This patch adds a new global parameter "max_initial_qualify_time" that sets the
maximum time for the initial qualifies.  This way you could make sure that all
your contacts are initialy, randomly qualified within say 30 seconds but still
have the contact's ongoing qualifies at a 5 minute interval.

If max_initial_qualify_time is > 0, the formula is initial_interval =
min(max_initial_interval, qualify_timeout * random().  If not set,
qualify_timeout is used.

The default is "0" (disabled).

ASTERISK-24863 #close

Change-Id: Ib80498aa1ea9923277bef51d6a9015c9c79740f4
Tested-by: George Joseph <george.joseph@fairview5.com>
2015-04-16 16:44:45 -05:00
George Joseph 51886c68dc pjsip_options: Add qualify_timeout processing and eventing
This is the second follow-on to https://reviewboard.asterisk.org/r/4572/ and the
discussion at
http://lists.digium.com/pipermail/asterisk-dev/2015-March/073921.html

The basic issues are that changes in contact status don't cause events to be
emitted for the associated endpoint.  Only dynamic contact add/delete actions
update the endpoint.  Also, the qualify timeout is fixed by pjsip at 32 seconds
which is a long time.

This patch makes use of the new transaction timeout feature in r4585 and
provides the following capabilities...

1.  A new aor/contact variable 'qualify_timeout' has been added that allows the
user to specify the maximum time in milliseconds to wait for a response to an
OPTIONS message.  The default is 3000ms.  When the timer expires, the contact is
marked unavailable.

2.  Contact status changes are now propagated up to the endpoint as follows...
When any contact is 'Available', the endpoint is marked as 'Reachable'.  When
all contacts are 'Unavailable', the endpoint is marked as 'Unreachable'.  The
existing endpoint events are generated appropriately.

ASTERISK-24863 #close

Change-Id: Id0ce0528e58014da1324856ea537e7765466044a
Tested-by: Dmitriy Serov
Tested-by: George Joseph <george.joseph@fairview5.com>
2015-04-16 09:34:56 -05:00
Kevin Harwell 66f3fd0028 chan_sip: make progressinband default to no
After the "progressinband" value setting of "never" was updated to never send a
183 this separated its use from the "no" value. Since "never" was the default,
but most users probably expect "no" this patch updates the default for the
"progressinband" setting to "no."

ASTERISK-24835 #close
Reported by: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/4606/
........

Merged revisions 434654 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-10 21:06:23 +00:00
Matthew Jordan b3d01f1fbf channels/chan_iax2: Add a configuration parameter for call token expiration
This patch adds a new configuration parameter, 'calltokenexpiration', that
controls how long before an authentication call token is expired. The default
maintains the RFC specified 10 seconds. Setting it to a higher value may be
useful in lossy networks.

Review: https://reviewboard.asterisk.org/r/4588

ASTERISK-24939 #close
Reported by: Y Ateya
patches:
  ctoken_configuration.diff submitted by Y Ateya (License 6693)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-10 12:23:42 +00:00
Matthew Jordan 016fba12e2 cel_pgsl: Add support for GMT timestamps
This patch adds a new option to cel_pgsl, "usegmtime", which causes timestamps
to be logged in GMT.

Review: https://reviewboard.asterisk.org/r/4571/

ASTERISK-23186 #close
Reported by: Rodrigo Ramirez Norambuena
patches:
  cel_pgsql.c_add_usegmtime2.patch submitted by Rodrigo Ramirez Norambuena (License 6577)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08 11:35:53 +00:00
Jonathan Rose b56592e3ae SAC: Add conferencing extensions and configuration
Review: https://reviewboard.asterisk.org/r/4504/
........

Merged revisions 433656 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-27 22:26:30 +00:00
Rusty Newton c21e2e45a8 configs/basic-pbx - Super Awesome Company example configs Phase 1, Patch 2
Example configuration files for a "basic PBX" deployment for the fictitious
Super Awesome Company. Details at https://reviewboard.asterisk.org/r/4488/
and https://wiki.asterisk.org/wiki/display/AST/Super+Awesome+Company

Patch 4488 includes all functionality needed for SAC's outside connectivity
and some externally accessed features, as well as outbound dialing.

Reported by: Malcolm Davenport
Tested by: Rusty Newton

Review: https://reviewboard.asterisk.org/r/4488/
........

Merged revisions 433624 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-27 21:21:05 +00:00
Joshua Colp abf3e40902 dns: Add core DNS API + unit tests and res_resolver_unbound module + unit tests.
This change adds an abstracted core DNS API which resembles the API described
here[1]. The API provides a pluggable mechanism for resolvers and also a
consistent view for records. Both synchronous and asynchronous queries are
supported.

This change also adds a res_resolver_unbound module which uses the libunbound
library to provide resolution.

Unit tests have also been written for all of the above to confirm the API and
functionality.

ASTERISK-24834 #close
Reported by: Matt Jordan

ASTERISK-24836 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/4474/
Review: https://reviewboard.asterisk.org/r/4512/

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+DNS+API


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-25 12:32:26 +00:00
Richard Mudgett 4c2fc5b811 chan_pjsip: Add "rpid_immediate" option to prevent unnecessary "180 Ringing" messages.
Incoming PJSIP call legs that have not been answered yet send unnecessary
"180 Ringing" or "183 Progress" messages every time a connected line
update happens.  If the outgoing channel is also PJSIP then the incoming
channel will always send a "180 Ringing" or "183 Progress" message when
the outgoing channel sends the INVITE.

Consequences of these unnecessary messages:

* The caller can start hearing ringback before the far end even gets the
call.

* Many phones tend to grab the first connected line information and refuse
to update the display if it changes.  The first information is not likely
to be correct if the call goes to an endpoint not under the control of the
first Asterisk box.

When connected line first went into Asterisk in v1.8, chan_sip received an
undocumented option "rpid_immediate" that defaults to disabled.  When
enabled, the option immediately passes connected line update information
to the caller in "180 Ringing" or "183 Progress" messages as described
above.

* Added "rpid_immediate" option to prevent unnecessary "180 Ringing" or
"183 Progress" messages.  The default is "no" to disable sending the
unnecessary messages.

ASTERISK-24781 #close
Reported by: Richard Mudgett

Review: https://reviewboard.asterisk.org/r/4473/
........

Merged revisions 433338 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-24 19:41:36 +00:00
Kevin Harwell aef7278af6 res_pjsip: Allow configuration of endpoint identifier query order
This patch fixes previously reverted code that caused binary incompatibility
problems with some modules. And like the original patch it makes sure that
no matter what order the endpoint identifier modules were loaded, priority is
given based on the ones specified in the new global 'endpoint_identifier_order'
option.

ASTERISK-24840
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/4489/
........

Merged revisions 433028 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-17 18:22:20 +00:00
Matthew Jordan dc752f515b apps/app_amd: Document maximum_word_length option; fix AMDCAUSE documentation
This patch corrects the documentation for the AMD application. Specifically:
* It documents the maximum_word_length option, which limits the maximum allowed
  length of a single utterance.
* It clarifies the AMDCAUSE values MAXWORDS and MAXWORDLENGTH. MAXWORDLENGTH
  was documented as MAXWORDS, while MAXWORDS was undocumented.

Thanks to the issue reporter, Frank DiGennaro, for pointing out the issues.

ASTERISK-19470 #close
Reported by: Frank DiGennaro
........

Merged revisions 432918 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432920 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-14 00:24:52 +00:00
Kevin Harwell d42c6adb1a Revert - res_pjsip: Allow configuration of endpoint identifier query order
Due to a break in binary compatibility with some other modules these changes
are being reverted until the issue can be resolved.

ASTERISK-24840
Reported by: Mark Michelson
........

Merged revisions 432868 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-13 14:55:44 +00:00
Kevin Harwell 1ce529d30e res_pjsip: allow configuration of endpoint identifier query order
It's possible to have a scenario that will create a conflict between endpoint
identifiers. For instance an incoming call could be identified by two different
endpoint identifiers and the one chosen depended upon which identifier module
loaded first. This of course causes problems when, for example, the incoming
call is expected to be identified by username, but instead is identified by ip.
This patch adds a new 'global' option to res_pjsip called
'endpoint_identifier_order'. It is a comma separated list of endpoint
identifier names that specifies the order by which identifiers are processed
and checked.

ASTERISK-24840 #close
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/4455/
........

Merged revisions 432638 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-09 16:13:40 +00:00
Rusty Newton e484140aed configs/basic-pbx - Super Awesome Company example configs Phase 1, Patch 1
Example configuration files for a "basic PBX" deployment for the fictitious
Super Awesome Company. Details at https://reviewboard.asterisk.org/r/4379/
and https://wiki.asterisk.org/wiki/display/AST/Super+Awesome+Company

Reported by: Malcolm Davenport
Tested by: Rusty Newton

Review: https://reviewboard.asterisk.org/r/4379/
........

Merged revisions 432301 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-25 23:49:21 +00:00
Joshua Colp 55eb8fc068 pjsip: Remove "contact" type from pjsip.conf.sample
The "contact" object is not meant to be configured from the pjsip.conf
configuration file. It is meant to be created as a result of a registration
and stored elsewhere.

ASTERISK-24085 #close
Reported by: Rusty Newton
........

Merged revisions 431860 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-15 19:01:44 +00:00
George Joseph 49161d8df8 res_pjsip_config_wizard: Add ability to auto-create hints.
Looking at the Super Awesome Company sample reminded me that creating hints is 
just plain gruntwork.  So you can now have the pjsip conifg wizard auto-create 
them for you.

Specifying 'hint_exten' in the wizard will create 
'exten => <hint_exten>,hint/PJSIP/<wizard_id>'
in whatever is specified for 'hint_context'.

Specifying 'hint_application' in the wizard will create
'exten => <hint_exten>,1,<hint_application>'
in whatever is specified for 'hint_context'.

The default for 'hint_context' is the endpoint's context.
There's no default for 'hint_application'.  If not specified, no app is added.
There's no default for 'hint_exten'.  If not specified, neither the hint itself 
nor the application will be created.

Some may think this is the slippery slope to users.conf but hints are a basic 
necessity for phones unlike voicemail, manager, etc that users.conf creates.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4383/
........

Merged revisions 431643 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-10 23:17:17 +00:00
Ashley Sanders 6a76740b83 HTTP: For httpd server, need option to define server name for security purposes
Added a new config property [servername] to the http.conf file; updated the http server to use the new property when sending responses, for showing http status through the CLI and when reporting status through the 'httpstatus' webpage. In this version, [servername] is uncommented by default.

ASTERISK-24316 #close
Reported By: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/4374/
........

Merged revisions 431471 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-30 17:21:50 +00:00
Richard Mudgett e4738a59eb CHANNEL(peer), chan_iax2, res_fax, SNMP agent: Fix deadlock from reaching across a bridge.
Calling ast_channel_bridge_peer() cannot be done while holding any channel
locks.  The reported issue hit the deadlock in chan_iax2, but an audit of
the ast_channel_bridge_peer() calls found three more locations where the
same deadlock can occur.

* Made CHANNEL(peer), res_fax, and the SNMP agent not call
ast_channel_bridge_peer() with any channel locked.  For CHANNEL(peer) I
had to rework the logic to not hold the channel lock.

* Made chan_iax2 no longer call ast_channel_bridge_peer().  It was done
for legacy reasons that no longer apply.

* Removed the iax.conf forcejitterbuffer option.  It is now always enabled
when the jitterbuffer option is enabled.  If you put a jitter buffer on a
channel it will be on the channel.

ASTERISK-24600 #close
Reported by: Jeff Collell

Review: https://reviewboard.asterisk.org/r/4342/
........

Merged revisions 430817 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-20 16:59:30 +00:00
Mark Michelson 023fa0f9e8 Add support for the ca_list_path option for PJSIP transports.
This allows for a path to be specified that has a collection of CA
certificates in it.

ASTERISK-24575 #close
Reported by cloos
Patches:
	pj-ca-path-trunk.diff uploaded by cloos (License #5956)

Review: https://reviewboard.asterisk.org/r/4344
........

Merged revisions 430709 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-16 21:46:09 +00:00
Matthew Jordan aa7e06f797 configs/samples/features.conf.sample: Document attended transfer DTMF options
The sample config was missing the configuration options for DTMF attended
transfer completion scenarios. The configuration options 'atxferabort',
'atxfercomplete', 'atxferthreeway', and 'atxferswap' are now documented in the
appropriate configuration file.

ASTERISK-24678 #close
Reported by: Niklas Larsson
patches:
  features.conf.sample.diff uploaded by Niklas Larsson (License 5068)
........

Merged revisions 430526 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-12 18:28:50 +00:00
Kinsey Moore 77ee23210d res_fax: Add T.38 negotiation timeout option
This change makes the T.38 negotiation timeout configurable via
't38timeout' in res_fax.conf or FAXOPT(t38timeout). It was previously
hard coded to be 5000 milliseconds.

This change also handles T.38 switch failures by aborting the fax since
in the case where this can happen, both sides have agreed to switch to
T.38 and Asterisk is unable to do so.

Review: https://reviewboard.asterisk.org/r/4320/
........

Merged revisions 430415 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 430416 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-09 14:53:09 +00:00
Kevin Harwell 91becf952a app_queue: Update sample conf documenation
Updated the queues.conf.sample file to explicitly state which channel queue
variables are propagated to.

ASTERISK-24267
Reported by: Mitch Claborn
........

Merged revisions 430126 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 430127 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-24 21:28:14 +00:00
Matthew Jordan b79a4a464f app_confbridge: Add the ability to pass options/command to MixMonitor
This patch adds the ability to pass options and a command to MixMontor when
recording a conference using ConfBridge.

New options are -

* record_options: Options to MixMontor, eg: m(), W() etc.
* record_command: The command to execute when recording is over.
* record_file_timestamp: Append the start time to the file name.

These options can also be used with the CONFBRIDGE function, e.g.,
Set(CONFBRIDGE(bridge,record_command)=/path/to/command ^{MIXMONITOR_FILENAME}))

Review: https://reviewboard.asterisk.org/r/4023

ASTERISK-24351 #close
Reported by: Gareth Palmer
patches:
  record_command-428838.patch uploaded by Gareth Palmer (License 5169)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-22 02:35:05 +00:00
George Joseph 39b54a21dc res_pjsip_config_wizard: Allow streamlined config of common pjsip scenarios
res_pjsip_config_wizard
------------------
 * This is a new module that adds streamlined configuration capability for
   chan_pjsip.  It's targetted at users who have lots of basic configuration
   scenarios like 'phone' or 'agent' or 'trunk'.  Additional information
   can be found in the sample configuration file at
   config/samples/pjsip_wizard.conf.sample.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4190/
........

Merged revisions 429592 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-15 17:08:24 +00:00
Matthew Jordan 1106e8fd0f main/stasis: Allow subscriptions to use a threadpool for message delivery
Prior to this patch, all Stasis subscriptions would receive a dedicated
thread for servicing published messages. In contrast, prior to r400178
(see review https://reviewboard.asterisk.org/r/2881/), the subscriptions
shared a thread pool. It was discovered during some initial work on Stasis
that, for a low subscription count with high message throughput, the
threadpool was not as performant as simply having a dedicated thread per
subscriber.

For situations where a subscriber receives a substantial number of messages
and is always present, the model of having a dedicated thread per subscriber
makes sense. While we still have plenty of subscriptions that would follow
this model, e.g., AMI, CDRs, CEL, etc., there are plenty that also fall into
the following two categories:
* Large number of subscriptions, specifically those tied to endpoints/peers.
* Low number of messages. Some subscriptions exist specifically to coordinate
  a single message - the subscription is created, a message is published, the
  delivery is synchronized, and the subscription is destroyed.
In both of the latter two cases, creating a dedicated thread is wasteful (and
in the case of a large number of peers/endpoints, harmful). In those cases,
having shared delivery threads is far more performant.

This patch adds the ability of a subscriber to Stasis to choose whether or not
their messages are dispatched on a dedicated thread or on a threadpool. The
threadpool is configurable through stasis.conf.

Review: https://reviewboard.asterisk.org/r/4193

ASTERISK-24533 #close
Reported by: xrobau
Tested by: xrobau
........

Merged revisions 428681 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 428687 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01 17:59:21 +00:00
Olle Johansson d663e045f5 sip.conf.sample - note that media_address does not change listen address, just the SDP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21 13:59:45 +00:00
Joshua Colp 7f8b7ace72 res_pjsip_sdp_rtp: Add support for optimistic SRTP.
Optimistic SRTP is the ability to enable SRTP but not have it be
a fatal requirement. If SRTP can be used it will be, if not it won't be.
This gives you a better chance of using it without having your sessions
fail when it can't be.

Encrypt all the things!

Review: https://reviewboard.asterisk.org/r/3992/
........

Merged revisions 428222 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19 12:50:47 +00:00
Mark Michelson 2e750db120 Allow for transferer to retry when dialing an invalid extension.
This allows for a configurable number of attempts for a transferer
to dial an extension to transfer the call to. For Asterisk 13, the
default values are such that upgrading between versions will not
cause a behaivour change. For trunk, though, the defaults will be
changed to be more user-friendly.

Review: https://reviewboard.asterisk.org/r/4167
........

Merged revisions 428145 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17 16:58:52 +00:00
Joshua Colp d0523b4b3c chan_sip: Add support for setting DTLS configuration in the general section.
Configuration of DTLS in the general section will be applied to any users
or peers. If configuration exists at their level it overrides the general
section values.

ASTERISK-24128 #close
Reported by: Michael K.
patches:
  dtls_default_settings.patch submitted by Michael K. (license 6621)

Review: https://reviewboard.asterisk.org/r/3867/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15 16:31:24 +00:00
Jonathan Rose df2090b931 Documentation: Revise explanation of cdr.conf option 'Unanswered'
ASTERISK-24279 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/4109/
........

Merged revisions 427901 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 427902 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-14 18:12:05 +00:00
Mark Michelson 69f29e627f Make the disable_tcp_switch PJSIP system object enabled by default.
Testing has shown repeatedly that PJSIP's default behavior of switching
automatically to TCP for large messages can cause issues. The most common
issues are that devices that we are communicating with do not handle the
switch to TCP gracefully, thus causing situations such as broken calls or
broken subscriptions. Now, in order to have this behavior happen, you must
opt into it. The sample file has been updated to warn that enabling the
TCP switch behavior may cause issues for you, so use at your own risk.
........

Merged revisions 427334 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-05 19:53:29 +00:00
Joshua Colp d159885e50 res_pjsip_outbound_registration: Add virtual line support.
Virtual line support establishes a relationship between messages
related to an outbound registration and a local endpoint. This is
accomplished by attaching a parameter to the Contact of the outbound
registration and looking for it on any received requests. If the
parameter exists and can be matched to an outbound registration
the configured endpoint is associated with the request.

Review: https://reviewboard.asterisk.org/r/2964/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-04 12:03:35 +00:00
Richard Mudgett 33f0251b6c res_pjsip: Add disable_tcp_switch option.
When a packet exceeds the MTU, pjproject will switch from UDP to TCP.  In
some circumstances (on some networks), this can cause some issues with
messages not getting sent to the correct destination - and can also cause
connections to get dropped due to quirks in pjproject deciding to
terminate TCP connections with no messages.

While fixing the routing/messaging issues is important, having a
configuration option in Asterisk that tells pjproject to not switch over
to TCP would be useful.  That way, if some glitch is discovered on some
other network/site, we can at least disable the behavior until a fix is
put into place.

AFS-197 #close

Review: https://reviewboard.asterisk.org/r/4137/
........

Merged revisions 427129 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 427130 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-03 18:22:59 +00:00
Joshua Colp ac091d4184 chan_pjsip: Add support for passing hold and unhold requests through.
This change adds an option, moh_passthrough, that when enabled will pass
hold and unhold requests through using a SIP re-invite. When placing on
hold a re-invite with sendonly will be sent and when taking off hold a
re-invite with sendrecv will be sent. This allows remote servers to handle
the musiconhold instead of the local Asterisk instance being responsible.

Review: https://reviewboard.asterisk.org/r/4103/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-03 14:45:01 +00:00
Scott Griepentrog 28173ddf05 pjsip: clarify tls cert and key file usage
A question arose as to whether a .pem file
could be provided in place of the .crt and
.key files in a PJSIP TLS configuration. I
tested this and discovered that although a
cert will be read from the pem file, a key
will not, and thus the priv_key_file entry
is still required. This update to the fine
documentation clarifies the option usage.

AST-1448 #close
Review: https://reviewboard.asterisk.org/r/4129/
Reported by: John Bigelow
........

Merged revisions 426928 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 426930 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-31 16:41:06 +00:00
Malcolm Davenport 1fe22c411d ASTERISK-23512, correct inaccurate comment in manager.conf.sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-28 18:09:32 +00:00
Malcolm Davenport 684b8762a9 ASTERISK-24419, fix incorrect syntax for setting language in extensions.conf.sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-28 13:13:16 +00:00
Jonathan Rose b8f687f27c Sample Configurations: make 'pjsip reload' reload all reloadable pjsip modules
AST-1432 #close
Reported by: John Bigelow
........

Merged revisions 425905 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-17 22:45:27 +00:00
Joshua Colp 0d0e38a0e1 res_pjsip_keepalive: Add runtime configurable keepalive module for connection-oriented transports.
This change adds a module which is configurable using the keep_alive_interval setting in the
global section that will send a CRLF keep alive to all active connection-oriented transports at
the provided interval. This is useful because it can help keep connections open through NATs.
This functionality also exists within PJSIP but can not be controlled at runtime and requires
recompiling it.

Review: https://reviewboard.asterisk.org/r/4084/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-17 13:17:58 +00:00
George Joseph c6837c236f res_pjsip_phoneprov_provider: Provides pjsip integration with res_phoneprov
This module allows res_pjsip to integrate with res_phoneprov.  It handles
the pjsip 'phoneprov' object type.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3976/
........

Merged revisions 425007 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425008 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 20:55:50 +00:00
George Joseph cc595f7353 res_phoneprov: Refactor phoneprov to allow pluggable config providers
This patch makes res_phoneprov more modular so other modules (like pjsip)
can provide configuration information instead of res_phoneprov relying solely
on users.conf and sip.conf.  To accomplish this a new ast_phoneprov public API
is now exposed which allows config providers to register themselves, set
defaults (server profile, etc) and add user extensions.

* ast_phoneprov_provider_register registers the provider and provides callbacks
  for loading default settings and loading users.
* ast_phoneprov_provider_unregister clears the defaults and users.
* ast_phoneprov_add_extension should be called once for each user/extension
  by the provider's load_users callback to add them.
* ast_phoneprov_delete_extension deletes one extension.
* ast_phoneprov_delete_extensions deletes all extensions for the provider.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3970/
........

Merged revisions 424963 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424964 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 17:46:23 +00:00
Kinsey Moore b1f8eba178 PJSIP: Restore functional default for callerid_privacy
The pjsip config option default fixups from r424263 altered the
functional default from "allowed_not_screened" to "allowed". This
change restores the functional default value when none is provided.
........

Merged revisions 424426 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424427 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 13:59:09 +00:00
Richard Mudgett 2b0777c017 res_pjsip: Make transport cipher option accept a comma separated list of cipher names.
Improvements to the res_pjsip transport cipher option.

* Made the cipher option accept a comma separated list of OpenSSL cipher
names.  Users of realtime will be glad if they have more than one name to
list.

* Added the CLI command 'pjsip list ciphers' so a user can know what
OpenSSL names are available for the cipher option.

* Updated the cipher option online XML documentation to specify what is
expected for the value.

* Updated pjsip.conf.sample to not indicate that ALL is acceptable since
ALL does not imply a preference order for the ciphers and PJSIP does not
simply pass the string to OpenSSL for interpretation.

ASTERISK-24199 #close
Reported by: Joshua Colp

Review: https://reviewboard.asterisk.org/r/4018/
........

Merged revisions 424393 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424394 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02 21:55:37 +00:00
Scott Griepentrog aa5458d6ab res_pjsip: document use of rewrite_contact in sample conf
Without setting rewrite_contact, an invite to an endpoint
behind NAT will not reach it - unless the endpoint itself
uses STUN or TURN to discover it's public URI.  Thus, the
use of this should be in the sample documentation.

Review: https://reviewboard.asterisk.org/r/4036/
........

Merged revisions 424337 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424338 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02 13:36:01 +00:00
Joshua Colp adba2a8d7f res_pjsip: Add 'dtls_fingerprint' option to configure DTLS fingerprint hash.
During the latest update to DTLS-SRTP support the ability to configure
the hash used for fingerprints was added. This gave us two supported ones:
SHA-1 and SHA-256. The default was accordingly updated to SHA-256.
Unfortunately this configuration ability was not exposed within res_pjsip.
This change adds a dtls_fingerprint option that controls it.

#SIPit31
........

Merged revisions 424290 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424291 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 16:39:45 +00:00
Kinsey Moore 4d2c7c23f8 PJSIP: Handle defaults properly
This updates the code behind PJSIP configuration options with custom
handlers to deal with the assigned default values properly where it
makes sense and adjusting the default value where it doesn't. Before
applying this patch, there were several cases where the default value
for an option would prevent that config section from loading properly.

Reported by: Thomas Thompson
Review: https://reviewboard.asterisk.org/r/4019/
........

Merged revisions 424263 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424266 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 12:28:05 +00:00
Walter Doekes d172d84fe1 musiconhold: Add preferchannelclass=no option to prefer app class.
The new option 'preferchannelclass' is added to musiconhold.conf. If yes
(the default) the CHANNEL(musicclass) is preferred when choosing the
hold music. If it is no, the class suggested by the application that
calls the MoH (e.g. the Queue() app) gets preferred (new behaviour).

This way you set a different hold-music from the Queue-music by setting
both the CHANNEL(musicclass) and the queue-context musicclass.

ASTERISK-24276 #close
Reported by: Kristian Høgh
Patches:
  app_override_channel_moh.patch uploaded by Kristian Høgh (License #6639)

Review: https://reviewboard.asterisk.org/r/4010/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-25 20:49:04 +00:00
Walter Doekes a62fedf0cb chan_sip: Clarify that sipdebug=yes cannot be undone by the CLI.
Document it in sip.conf.

ASTERISK-24249 #close
Reported by: Avinash Mohod

Review: https://reviewboard.asterisk.org/r/3926/
........

Merged revisions 423066 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 423067 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 423068 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 423069 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-14 15:54:22 +00:00
Walter Doekes 9c1f34c7e9 musiconhold: Add sort=randstart, and deprecate old stuff.
- adds sort=randstart (next to sort=, sort=random, sort=alpha)
- combines duplicate moh option parsing code into a single function
- adds deprecationwarnings for application=r to sort randomly
- adds deprecationwarnings for random=yes to sort randomly
- removes invisible code that was supposed to stay until 1.8 

The sort=randstart works like sort=alpha, except we start at a random
position.

Review: https://reviewboard.asterisk.org/r/3991/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-14 15:41:58 +00:00
Mark Michelson baf99dffac Add note about configuring list_items on a single line.
........

Merged revisions 422855 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-08 18:04:01 +00:00
Mark Michelson 5ad0edacb6 Add sample configuration for resource lists.
On review /r/3977, it was recommended to note in the
sample configuration about the size limitation for
resource lists. However, since there was no section in
the sample configuration at all for resource list
subscriptions, I decided to make a separate commit
where I have added the necessary sample configuration
as well as the size limitation warning.
........

Merged revisions 422853 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-08 17:53:33 +00:00
Paul Belanger ef28cc0d43 chan_sip.c: Add 'rtpbindaddr' setting
Users now have the ability to bind the rtpengine instance to a specific IP
address.  For example, you want chan_sip (call control) on eth0 but rtp (media)
on eth1.

ASTERISK-24280 #close
Reported by: Paul Belanger
Tested by: Paul Belanger
Review: https://reviewboard.asterisk.org/r/3952/
Patches:
    rtpengine.diff uploaded by Paul Belanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-28 16:06:55 +00:00
Matthew Jordan add46fd27c app_queue: Add RealTime support for queue rules
This patch gives the optional ability to keep queue rules in RealTime. It is
important to note that with this patch:
 (a) Queue rules in RealTime are only examined on module load/reload
 (b) Queue rules are loaded both from the queuerules.conf file as well as the
     RealTime backend
To inform app_queue to examine RealTime for queue rules, a new setting has been
added to queuerules.conf's general section "realtime_rules". RealTime queue
rules will only be used when this setting is set to "yes".

The schema for the database table supports a rule_name, time, min_penalty, and
max_penalty columns. min_penalty and max_penalty can be relative, if a '-' or
'+' literal is provided. Otherwise, the penalties are treated as constants.

For example:
rule_name, time, min_penalty, max_penalty
'default', '10', '20', '30'
'test2', '20', '30', '55'
'test2', '25', '-11', '+1111'
'test2', '400', '112', '333'
'test3', '0', '4564', '46546'
'test_rule', '40', '15', '50'

which would result in :

Rule: default
 - After 10 seconds, adjust QUEUE_MAX_PENALTY to 30 and adjust
   QUEUE_MIN_PENALTY to 20
Rule: test2
 - After 20 seconds, adjust QUEUE_MAX_PENALTY to 55 and adjust
   QUEUE_MIN_PENALTY to 30
 - After 25 seconds, adjust QUEUE_MAX_PENALTY by 1111 and adjust
   QUEUE_MIN_PENALTY by -11
 - After 400 seconds, adjust QUEUE_MAX_PENALTY to 333 and adjust
   QUEUE_MIN_PENALTY to 112
Rule: test3
 - After 0 seconds, adjust QUEUE_MAX_PENALTY to 46546 and adjust
   QUEUE_MIN_PENALTY to 4564
Rule: test_rule
 - After 40 seconds, adjust QUEUE_MAX_PENALTY to 50 and adjust
   QUEUE_MIN_PENALTY to 15

If you use RealTime, the queue rules will be always reloaded on a module
reload, even if the underlying file did not change. With the option disabled,
the rules will only be reloaded if the file was modified.

Review: https://reviewboard.asterisk.org/r/3607/

ASTERISK-23823 #close
Reported by: Michael K
patches:
  app_queue.c_realtime_trunk.patch uploaded by Michael K (License 6621)
........

Merged revisions 420624 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 00:14:53 +00:00
Jason Parker 5ce4ad8031 app_voicemail: Add the ability to specify multiple email addresses.
ASTERISK-24045
Reported by: Jacob Barber
Review: https://reviewboard.asterisk.org/r/3833/
........

Merged revisions 420577 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-08 19:16:29 +00:00
Kinsey Moore f1036f40dc Stasis: Allow message types to be blocked
This introduces stasis.conf and a mechanism to prevent certain message
types from being published. Internally, this works by preventing the
chosen message types from being created which ensures that those
message types can never be published. This patch also adjusts message
publishers such that message payloads are not created if the related
message type is not available.

ASTERISK-23943 #close
Review: https://reviewboard.asterisk.org/r/3823/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 12:55:28 +00:00
Matthew Jordan fc0fecb476 configs: Move sample config files into a subdirectory of configs
This moves all samples configs from configs/ to configs/samples. This allows
for additional sets of sample configuration files to be added in the future.

Review: https://reviewboard.asterisk.org/r/3804/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 21:17:28 +00:00
Matthew Jordan fd94fea599 res_pjsip: Support setting a default accountcode on endpoints
Most channel drivers let you specify a default accountcode to be set on
channels associated with a particular peer/endpoint/object. Prior to this
patch, chan_pjsip/res_pjsip did not support such a setting.

This patch adds a new setting to the res_pjsip endpoint object, 'accountcode'.
When a channel is created that is associated with an endpoint with this value
set, the channel will automatically have its accountcode property set to the
value configured for the endpoint.

Review: https://reviewboard.asterisk.org/r/3724/

ASTERISK-24000 #close
Reported by: Matt Jordan
........

Merged revisions 418756 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-16 14:03:51 +00:00
Matthew Jordan 03e9c598e5 cel_pgsql, cdr_pgsql, res_config_pgsql: Add PostgreSQL application_name support
This patch adds support for the PostgreSQL application_name connection setting.
When the appropriate PostgreSQL module's configuration is set with an
application name, the name will be passed to PostgreSQL on connection and
displayed in the database's pg_stat_activity view, as well as in CSV logs. This
aids in managing which applications/servers are connected to a PostgreSQL
database, as well as tracing the activity of those connections.

Review: https://reviewboard.asterisk.org/r/3591

ASTERISK-23737 #close
Reported by: Gergely Domodi
patches:
  pgsql_application_name.patch uploaded by Gergely Domodi (License 6610)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-16 13:55:36 +00:00
Richard Mudgett 4339183c3e Actually delete the removed files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-14 01:45:01 +00:00
Corey Farrell 6461d90d8a Remove files left behind on removal of h323, jingle and jabber.
This change removes h323.conf.sample, jingle.h, jabber.h left behind by r3698.

Review: https://reviewboard.asterisk.org/r/3755/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-13 05:05:49 +00:00
Matthew Jordan 97834718c2 Remove many deprecated modules
Billing records are fair,
To get paid is quite bright,
You should really use ODBC;
Good-bye cdr_sqlite.

Microsoft did once push H.323,
Hell, we all remember NetMeeting.
But try to compile chan_h323 now
And you will take quite a beating.

The XMPP and SIP war was fierce,
And in the distant fray
Was birthed res_jabber/chan_jingle;
But neither to stay.

For everyone did care and chase what Google professed.
"Free Internet Calling" was what devotees cried,
But Google did change the specs so often
That the developers were happy the day chan_gtalk died.

And then there was that odd application
Dedicated to the Polish tongue.
app_saycountpl was subsumed by Say;
One could say its bell was rung.

To read and parse a file from the dialplan
You could (I guess) use an application.
app_readfile did fill that purpose, but I think
A function is perhaps better in its creation.

Barging is rude, I'm not sure why we do it.
Inwardly, the caller will probably sigh.
But if you really must do it,
Don't use app_dahdibarge, use ChanSpy.

We all despise the sound of tinny robots
It makes our queues so cold.
To control such an abomination
It's better to not use Wait/SetMusicOnHold.

It's often nice to know properties of a channel
It makes our calls right
We have a nice function called CHANNEL
And so SIPCHANINFO is sent off into the night.

And now things get odd;
Apparently one could delimit with a colon
Properties from the SIPPEER function!
Commas are in; all others are done.

Finally, a word on pipes and commas.
We're sorry. We can't say it enough.
But those compatibility options in asterisk.conf;
To maintain them forever was just too tough.

This patch removes:

* cdr_sqlite
* chan_gtalk
* chan_jingle
* chan_h323
* res_jabber
* app_saycountpl
* app_readfile
* app_dahdibarge

It removes the following applications/functions:

* WaitMusicOnHold
* SetMusicOnHold
* SIPCHANINFO

It removes the colon delimiter from the SIPPEER function.

Finally, it also removes all compatibility options that were configurable from
asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems.

Review: https://reviewboard.asterisk.org/r/3698/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-04 13:26:37 +00:00
Richard Mudgett 3bd495a688 chan_dahdi: Add inband_on_setup_ack compatibility option.
The new inband_on_setup_ack option causes Asterisk to assume inband audio
may be present when a SETUP_ACKNOWLEDGE message is received.

Q.931 Section 5.1.3 says that in scenarios with overlap dialing, when a
dialtone is sent from the network side, progress indicator 8 "Inband info
now available" MAY be sent to the CPE if no digits were received with the
SETUP.  It is thus implied that the ie is mandatory if digits came with
the SETUP and dialtone is needed.  This option should be enabled, when the
network sends dialtone and you want to hear it, but the network doesn't
send the progress indicator when needed.

NOTE: For Q.SIG setups this option should be enabled when outgoing overlap
dialing is also enabled because Q.SIG does not send the progress indicator
with the SETUP ACK.

The commit -r413714 (AST-1338) which causes this issue was dealing with a
SIP-to-ISDN interoperability issue.

This commit is a merge of the two patches indicated below.

ASTERISK-23897 #close
Reported by: Pavel Troller
Patches:
      pri-4.diff (license #6302) patch uploaded by Pavel Troller
      jira_asterisk_23897_v11.patch (license #5621) patch uploaded by rmudgett

Review: https://reviewboard.asterisk.org/r/3633/
........

Merged revisions 417956 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 417957 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 417958 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 22:22:36 +00:00
Richard Mudgett dbec5e0d8d HTTP: Add persistent connection support.
Persistent HTTP connection support is needed due to the increased usage of
the Asterisk core HTTP transport and the frequency at which REST API calls
are going to be issued.

* Add http.conf session_keep_alive option to enable persistent
connections.

* Parse and discard optional chunked body extension information and
trailing request headers.

* Increased the maximum application/json and
application/x-www-form-urlencoded body size allowed to 4k.  The previous
1k was kind of small.

* Removed a couple inlined versions of ast_http_manid_from_vars() by
calling the function.  manager.c:generic_http_callback() and
res_http_post.c:http_post_callback()

* Add missing va_end() in ast_ari_response_error().

* Eliminated unnecessary RAII_VAR() use in http.c:auth_create().

ASTERISK-23552 #close
Reported by: Scott Griepentrog

Review: https://reviewboard.asterisk.org/r/3691/
........

Merged revisions 417880 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 17:16:55 +00:00
Joshua Colp 6e60f5d317 Recorded merge of revisions 417677 from http://svn.asterisk.org/svn/asterisk/branches/11
........
res_rtp_asterisk: Add SHA-256 support for DTLS and perform DTLS negotiation on RTCP.

This change fixes up DTLS support in res_rtp_asterisk so it can accept and provide
a SHA-256 fingerprint, so it occurs on RTCP, and so it occurs after ICE negotiation
completes. Configuration options to chan_sip and chan_pjsip have also been added to
allow behavior to be tweaked (such as forcing the AVP type media transports in SDP).

ASTERISK-22961 #close
Reported by: Jay Jideliov

Review: https://reviewboard.asterisk.org/r/3679/
Review: https://reviewboard.asterisk.org/r/3686/
........

Merged revisions 417678 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-30 19:51:28 +00:00
Matthew Jordan 365ae7523b res_http_websocket: Close websocket correctly and use careful fwrite
When a client takes a long time to process information received from Asterisk,
a write operation using fwrite may fail to write all information. This causes
the underlying file stream to be in an unknown state, such that the socket
must be disconnected. Unfortunately, there are two problems with this in
Asterisk's existing websocket code:
1. Periodically, during the read loop, Asterisk must write to the connected
   websocket to respond to pings. As such, Asterisk maintains a reference to
   the session during the loop. When ast_http_websocket_write fails, it may
   cause the session to decrement its ref count, but this in and of itself
   does not break the read loop. The read loop's write, on the other hand,
   does not break the loop if it fails. This causes the socket to get in a
   'stuck' state, preventing the client from reconnecting to the server.
2. More importantly, however, is that the fwrite in ast_http_websocket_write
   fails with a large volume of data when the client takes awhile to process
   the information. When it does fail, it fails writing only a portion of
   the bytes. With some debugging, it was shown that this was failing in a
   similar fashion to ASTERISK-12767. Switching this over to ast_careful_fwrite
   with a long enough timeout solved the problem.

Note that this version of the patch, unlike r417310 in Asterisk 11, exposes
configuration options beyond just chan_sip's sip.conf. Configuration options
to configure the write timeout have also been added to pjsip.conf and ari.conf.

#ASTERISK-23917 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3624/
........

Merged revisions 417310 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 417311 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 12:21:14 +00:00
George Joseph cc4178bf25 Update extensions.lua.sample with naming conflict guidance.
The sample extensions.lua was causing pbx_lua to fail to load when parsing
'app.goto("default", "s", 1)' because in Lua 5.2, 'goto' is now a reserved
word.  This patch adds guidance to extensions.lua.sample and changed
'app.goto("default", "s", 1)' to 'app.['goto']("default", "s", 1)'. 

ASTERISK-23844 #close
Reported by: rnewton
Tested by: gtjoseph
Review: https://reviewboard.asterisk.org/r/3627/
 
........

Merged revisions 416581 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 416582 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-18 17:20:13 +00:00
Richard Mudgett 0c896d8b9b chan_dahdi: Adds support for major update to libss7.
* SS7 support now requires libss7 v2.0 or later.  The new libss7 is not
backwards compatible.

* Added SS7 support for connected line and redirecting.

* Most SS7 CLI commands are reworked as well as new SS7 commands added.
See online CLI help.

* Added several SS7 config option parameters described in
chan_dahdi.conf.sample.

* ISUP timer support reworked and now requires explicit configuration.
See ss7.timers.sample.

Special thanks to Kaloyan Kovachev for his support and persistence in
getting the original patch by adomjan updated and ready for release.

SS7-27 #close
Reported by: adomjan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-16 18:27:51 +00:00
Richard Mudgett 4ca5745dbe AST-2014-007: Fix DOS by consuming the number of allowed HTTP connections.
Simply establishing a TCP connection and never sending anything to the
configured HTTP port in http.conf will tie up a HTTP connection.  Since
there is a maximum number of open HTTP sessions allowed at a time you can
block legitimate connections.

A similar problem exists if a HTTP request is started but never finished.

* Added http.conf session_inactivity timer option to close HTTP
connections that aren't doing anything.  Defaults to 30000 ms.

* Removed the undocumented manager.conf block-sockets option.  It
interferes with TCP/TLS inactivity timeouts.

* AMI and SIP TLS connections now have better authentication timeout
protection.  Though I didn't remove the bizzare TLS timeout polling code
from chan_sip.

* chan_sip can now handle SSL certificate renegotiations in the middle of
a session.  It couldn't do that before because the socket was non-blocking
and the SSL calls were not restarted as documented by the OpenSSL
documentation.

* Fixed an off nominal leak of the ssl struct in
handle_tcptls_connection() if the FILE stream failed to open and the SSL
certificate negotiations failed.

The patch creates a custom FILE stream handler to give the created FILE
streams inactivity timeout and timeout after a specific moment in time
capability.  This approach eliminates the need for code using the FILE
stream to be redesigned to deal with the timeouts.

This patch indirectly fixes most of ASTERISK-18345 by fixing the usage of
the SSL_read/SSL_write operations.

ASTERISK-23673 #close
Reported by: Richard Mudgett
........

Merged revisions 415841 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 415854 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 415896 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 17:00:08 +00:00
Rusty Newton 4e292ea3af configs/cli_aliases.conf: Two new aliases, plus enhancements for context names.
Changed naming of included alias templates to avoid confusion between version names. For example, asterisk12 was for asterisk 1.2, so I changed it to asterisk_1dot2, so that later we can use asterisk_12 for Asterisk 12.

Added alias for "features reload" to the template for Asterisk 11 style syntax template, as features reload was removed in 12, but you can still do "module reload features"

Added alias for "pjsip reload" to the friendly template. It is shorter than "module reload res_pjsip.so" and if some are like me; I constantly forget that reloading chan_pjsip doesn't parse config. Remembering "pjsip reload" is just easier.

ASTERISK-23654 #close
ASTERISK-23654 #comment Fixed by adding two new aliases and enhancements for context names.

Review: https://reviewboard.asterisk.org/r/3572/
........

Merged revisions 415301 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-06 12:49:38 +00:00
Rusty Newton 812f33d222 pjsip.conf: privkey_file should be priv_key_file, mediaencryption=yes should be mediaencryption=sdes
privkey_file was missed in the snake case update. An example included an invalid value for the mediaencryption option.
........

Merged revisions 414780 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 20:53:05 +00:00
Igor Goncharovskiy d3433771c9 Introducing changes proposed to chan_unistim driver:
1) Added the unistim.conf variable dtmf_duration which can select the DTMF playback duration from 0ms to 150ms (0 is off and is the new default)
2) Enabled the transmission of month names, which are sent with the date and changed the dateformat variable to accept the values 0-3 as per the UNISTIM standard (2 & 3 match the previous 1 & 2 formats).
3) Enabled the "Mute" packet so muting microphone works as expected and microphone muted for all calls while LED light on
4) Changed Duree to Timer on i2004 display

(closes issue ASTERISK-23592)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-28 07:43:33 +00:00
Jonathan Rose ae21162a69 chan_sip: Add sendrpid trust options
In r411189, some behavior was changed which made sendrpid behavior
act in a more trusting manner by sending full user data for peers
set with private caller presence in P-Asserted-Identity headers.
Since this changed long time expected behaviors, we decided to pull
that patch when that was pointed out by the community. Instead, this
patch provides a trust_id_outbound setting which will expose the data
per RFC-3325 if set to 'yes' and simply not send the PAI/RPID headers
at all if set to 'no'. By default trust_id_outbound will be set to
'legacy' which will preserve the behavior prior to these patches.
Extra special thanks to Walter Doekes for providing advice and
feedback.

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski

Review: https://reviewboard.asterisk.org/r/3447/
........

Merged revisions 412744 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 412746 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 412747 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 16:20:32 +00:00
Jonathan Rose cc4a0a7fc9 Reverting r411189 so that it can be put up for public review
---
  r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines

  chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

  Prior to this patch, the P-Asserted-Identity header would include anonymous
  caller id information which seems to go against the point of the
  P-Asserted-Identity header. Now the real caller ID information will be
  included in this header. Also, no privacy header would be included.
  This patch adds 'Privacy: id' to outgoing SIP messages that include the
  P-Asserted-Identity header.

  (closes issue AST-1301)
---
........

Merged revisions 412328 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 412329 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 412330 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 16:13:35 +00:00
Richard Mudgett 03beadb6e9 internal_timing: Remove the option and always make it enabled if a timing module is loaded.
The masquerade supertest frequently fails because either the local channel
chain doesn't completely optimize out or the DTMF handshake doesn't
completely get accross.  Local channel optimization requires frames
flowing to trigger when optimization can happen.  When optimization
happens the media frame that triggered the optimization is dropped.
Sending DTMF requires frames to flow in the other direction for timing
purposes while sending nothing.  If internal timing is not enabled when
MOH is playing, Asterisk switches to received timing when an audio frame
is received.  With optimization dropping media frames and MOH not sending
frames unless it receives frames, occasionaly there are no more frames
being passed and the test fails.

* The asterisk command line -I option and the asterisk.conf
internal_timing option are removed.  Asterisk now always uses internal
timing when needed if any timing module is loaded.  The issue
ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken
if other internal timing modules besides DAHDI are used.  The
ast_read_generator_actions() now only does received timing if it has no
choice for frame generators like MOH, silence, and playback streaming.

* Cleaned up some code dealing with frame generators in
ast_deactivate_generator(), generator_write_format_change(),
ast_activate_generator(), and ast_channel_stop_silence_generator().

* Removed ast_internal_timing_enabled(), AST_OPT_FLAG_INTERNAL_TIMING, and
ast_opt_internal_timing.

ASTERISK-22846 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3414/
........

Merged revisions 411715 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 411716 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 411717 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 19:19:55 +00:00
Mark Michelson eefcb79bfb Prevent duplicate sorcery wizards from being applied to sorcery object types.
This commit contains several changes to sorcery:

1) Application of sorcery configuration based on module name is automatically performed
when sorcery is opened for a module.
2) Sorcery will not attempt to apply the same wizard to an object type more than once.
3) Sorcery gives more exact results when attempting to apply a wizard, whether as the
default or based on configuration.

Sorcery unit tests still pass for me after making these changes.

Review: https://reviewboard.asterisk.org/r/3326
........

Merged revisions 411159 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-02 18:57:29 +00:00
Matthew Jordan ef0c9fe4d8 res_hep/res_hep_pjsip: Add a HEPv3 capture agent module and a logger for PJSIP
This patch adds the following:
(1) A new module, res_hep, which implements a generic packet capture agent for
the Homer Encapsulation Protocol (HEP) version 3. Note that this code is based
on a patch provided by Alexandr Dubovikov; I basically just wrapped it up,
added configuration via the configuration framework, and threw in a
taskprocessor.
(2) A new module, res_hep_pjsip, which forwards all SIP message traffic that
passes through the res_pjsip stack over to res_hep for encapsulation and
transmission to a HEPv3 capture server.

Much thanks to Alexandr for his Asterisk patch for this code and for a *lot*
of patience waiting for me to port it to 12/trunk. Due to some dithering on
my part, this has taken the better part of a year to port forward (I still
blame CDRs for the delay).

ASTERISK-23557 #close

Review: https://reviewboard.asterisk.org/r/3207/
........

Merged revisions 411534 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 18:32:50 +00:00
Jonathan Rose fa3a2f8eca chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.

(closes issue AST-1301)
........

Merged revisions 411189 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 411190 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 411193 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 16:15:12 +00:00
Mark Michelson eba91d2a98 Revert changes to sorcery that accidentally got committed.
These changes were still up for review and have not been approved
yet. I must have had the changes in my working copy when making
a different change.
........

Merged revisions 410696 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 19:35:17 +00:00
Mark Michelson d44aefeef4 Fix stuck channel in ARI through the introduction of synchronous bridge actions.
Playing back a file to a channel in an ARI bridge would attempt to wait until
the playback concluded before returning. The method used involved signaling the
waiting thread in the ARI custom playback function.

The problem with this is that there were some corner cases that were not accounted for:
* If a bridge channel could not be found, then we never would attempt the playback but
  would still attempt to wait for the playback to complete.
* If the bridge playfile action failed to queue, we would still attempt to wait for the
  playback to complete.
* If the bridge playfile action were queued but some circumstance caused the playback
  not to occur (the bridge dies, the channel is removed from the bridge), then we would
  never be notified.

The solution to this is to move the waiting logic into the bridge code. A new bridge
API function is added to queue a synchronous action on a bridge. The waiting thread
is notified when the queued frame has been freed, either due to an error occurring
or due to successful playback. As a failsafe, the waiting thread has a 10 minute
timeout just in case there is a frame leak somewhere.

Review: https://reviewboard.asterisk.org/r/3338
........

Merged revisions 410673 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 17:22:12 +00:00
Corey Farrell 3ee8cf6efb res_fax: Comment out default settings from res_fax.conf.
Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/
........

Merged revisions 409052 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409053 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 409054 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:08:03 +00:00
Rusty Newton 23b142d5c8 configs/voicemail.conf.sample - Make mailcmd sample text more explicit
Made the wording a bit more explicit. Didn't really change the meaning.
........

Merged revisions 408876 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 408877 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 408878 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:44:53 +00:00
Kinsey Moore 75edef52e0 ConfBridge: Correct prompt playback target
Currently, when the first marked user enters the conference that
contains waitmarked users, a prompt is played indicating that the user
is being placed into the conference. Unfortunately, this prompt is
played to the marked user and not the waitmarked users which is not
very helpful.

This patch changes that behavior to play a prompt stating
"The conference will now begin" to the entire conference after adding
and unmuting the waitmarked users since the design of confbridge is not
conducive to playing a prompt to a subset of users in a conference in
an asynchronous manner.

(closes issue PQ-1396)
Review: https://reviewboard.asterisk.org/r/3155/
Reported by: Steve Pitts
........

Merged revisions 407857 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407858 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 16:01:37 +00:00
Richard Mudgett 6f38887cb7 chan_iax2: Block unnecessary control frames to/from the wire.
Establishing an IAX2 call between Asterisk v1.4 and v1.8 (or later)
results in an unexpected call disconnect.  The problem happens because
newer values in the enum ast_control_frame_type are not consistent between
the branch versions of Asterisk.

For example:
1) v1.4 calls v1.8 (or later) using IAX2

2) v1.8 answers and sends a connected line update control frame.  (on v1.8
AST_CONTROL_CONNECTED_LINE = 22)

3) v1.4 receives the control frame as an end-of-q (on v1.4
AST_CONTROL_END_OF_Q = 22)

4) v1.4 disconnects the call once the receive queue becomes empty.

Several things are done by this patch to fix the problem and attempt to
prevent it from happening again in the future:

* Added a warning at the definition of enum ast_control_frame_type about
how to add new control frame values.

* Made block sending and receiving control frames that have no reason to
go over the wire.

* Extended the connectedline iax.conf parameter to also include the
redirecting information updates.

* Updated the connectedline iax.conf parameter documentation to include a
notice that the parameter must be "no" when the peer is an Asterisk v1.4
instance.

(closes issue AST-1302)

Review: https://reviewboard.asterisk.org/r/3174/
........

Merged revisions 407678 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 407727 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407729 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 18:29:49 +00:00
Tzafrir Cohen 1d2d01e08d indications.conf: add stutter tone; end properly
* If the "stutter" (voicemail indication) tone is indeed a stutter tone,
  and it ends with a constant tone, make sure that it is the dial tone.
  This was done for India (in), Mexico (mx) and the Philippines (ph).
* If no "stutter" tone exists for a country, provide one. This was done for
  Spain (es), Malaysia (my) and Venezuela (ve).

Review: https://reviewboard.asterisk.org/r/3158/
........

Merged revisions 407622 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 407623 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407624 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 13:15:55 +00:00
Rusty Newton b196e9c117 configs/pjsip.conf.sample: Configuration section naming in pjsip.conf.sample needs a little clarification
There is a bit of nuance to how you name things in pjsip.conf. This is a documentation patch to at least clear it up a little for users.

Review: https://reviewboard.asterisk.org/r/3180/
........

Merged revisions 407587 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06 19:58:27 +00:00
Richard Mudgett 12668b6659 tcptls.c: Made TLS handle a certificate chain file.
Thanks to Guillaume Martres for doing the necessary research to validate
the change.

(closes issue ASTERISK-17727)
Reported by: LN
Patches:
      use_certificate_chain.patch (license #5864) patch uploaded by st
      documente_certificate_chain.patch (license #6576) patch uploaded by Guillaume Martres
........

Merged revisions 407272 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 407273 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407274 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04 18:16:09 +00:00
Kevin Harwell 10e38fb10c res_pjsip: Config option to enable PJSIP logger at load time.
Added a "debug" configuration option for res_pjsip that when set to "yes"
enables SIP messages to be logged.  It is specified under the "system" type.
Also added an alembic script to add the option to realtime.

(closes issue ASTERISK-23038)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/3148/
........

Merged revisions 407036 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:15:47 +00:00
Russell Bryant e7b20b1c91 queues.conf.sample Fix documented default for persistentmembers
Closes issue ASTERISK-22662
........

Merged revisions 406860 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 406861 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 406862 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-29 00:44:59 +00:00
Walter Doekes cc42229f26 manager: The eventfilter= option now takes an extended regex.
In pre-trunk versions (...12) it accepts a basic regex, which is
confusing because all other regexes in asterisk are of the
extended kind.

Review: https://reviewboard.asterisk.org/r/3147/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 08:17:22 +00:00
Walter Doekes 9a88cc33f8 manager: Clarify eventfilter documentation. Textual changes only.
Review: https://reviewboard.asterisk.org/r/3133/
........

Merged revisions 406079 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 406080 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 406081 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 21:08:00 +00:00
Rusty Newton f6647d2362 Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027
Fixes typos of "transfered" instead of "transferred" in various code. Fixes incorrect gosub param help text for app_queue.
Fixes Asterisk man pages containing unquoted minus signs. Adds note about the "textsupport" option in sip.conf.sample.

(issue ASTERISK-23061)
(issue ASTERISK-23028)
(issue ASTERISK-23046)
(issue ASTERISK-23027)
(closes issue ASTERISK-23061)
(closes issue ASTERISK-23028)
(closes issue ASTERISK-23046)
(closes issue ASTERISK-23027)
Reported by: Eugene, Jeremy Laine, Denis Pantsyrev
Patches:
 transferred.patch uploaded by Jeremy Laine (license 6561)
 hyphen.patch uploaded by Jeremy Laine (license 6561)
 sip.conf.sample.patch uploaded by Eugene (license 6360)
........

Merged revisions 405791 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 405792 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405829 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 17:16:14 +00:00
Kevin Harwell a48798ce95 res_fax: check_modem_rate() returned incorrect rate for V.27
According to the new standard for V.27 and V.32 they are able to transmit
at a bit rate of 4,800 or 9,600.  The check_mode_rate function needed to be
updated to reflect this.  Also, because of this change the default 'minrate'
value was updated to be 4800.

(closes issue ASTERISK-22790)
Reported by: Paolo Compagnini
Patches:
     res_fax.txt uploaded by looserouting (license 6548)
........

Merged revisions 405656 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 405693 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405694 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 19:13:05 +00:00
Richard Mudgett 828f339a9c verbosity: Fix performance of console verbose messages.
The per console verbose level feature as previously implemented caused a
large performance penalty.  The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version.  If the new
rasterisk connects to an older Asterisk version then the root console
verbose level is always affected by the "core set verbose" command of the
remote console even though it may appear to only affect the current
console.  If an older version of rasterisk connects to the new version
then the "core set verbose" command will have no effect.

* Fixed the verbose performance by not generating a verbose message if
nothing is going to use it and then filtered any generated verbose
messages before actually sending them to the remote consoles.

* Split the "core set debug" and "core set verbose" CLI commands to remove
the per module verbose support that cannot work with the per console
verbose level.

* Added a silent option to the "core set verbose" command.

* Fixed "core set debug off" tab completion.

* Made "core show settings" list the current console verbosity in addition
to the root console verbosity.

* Changed the default verbose level of the 'verbose' setting in the
logger.conf [logfiles] section.  The default is now to once again follow
the current root console level.  As a result, using the AMI Command action
with "core set verbose" could again set the root console verbose level and
affect the verbose level logged.

(closes issue AST-1252)
Reported by: Guenther Kelleter

Review: https://reviewboard.asterisk.org/r/3114/
........

Merged revisions 405431 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405432 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 18:14:02 +00:00
Richard Mudgett 9fa171e547 External MWI core support.
* The core external MWI resource provides for MWI message counts
persistence using sorcery.  With sorcery, the user is able to configure
which sorcery wizzard backend to use if the default astdb is not desired.

* The core external MWI resoruce provides some debugging CLI commands
enabled by defining MWI_DEBUG_CLI.

The debugging CLI commands are:
"mwi delete all",
"mwi delete like <regex>",
"mwi delete mailbox <mailbox>",
"mwi list all",
"mwi list like <regex>",
"mwi show mailbox <mailbox>", and
"mwi update mailbox <mailbox> [<new> [<old>]]".

(closes issue AFS-43)

Review: https://reviewboard.asterisk.org/r/3061/
........

Merged revisions 404952 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 17:45:25 +00:00
Kevin Harwell 821ab51381 res_pjsip: add 'set_var' support on endpoints
Added a new 'set_var' option for ast_sip_endpoint(s).  For each variable
specified that variable gets set upon creation of a pjsip channel involving
the endpoint.

(closes issue ASTERISK-22868)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/3095/
........

Merged revisions 404663 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-02 19:08:19 +00:00
Tzafrir Cohen 82eb03b915 chan_dahdi: enable ignore_failed_channels by default
If ignore_failed_channels is set to "true" for a channel, the channel
will continue to be configured even if configuring it has failed.

This allows Asterisk to start before all the DAHDI initialization is
done and thus not force the starting order dahdi -> asterisk.

Review: https://reviewboard.asterisk.org/r/3063/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-23 16:38:43 +00:00
Rusty Newton 06b577f7dc Documentation: Updates for info about NAT-related settings and fixes for pjsip.conf.sample
Added another NAT example to pjsip.conf.sample. We had a few mentions of NAT configuration throughout the sample, but I added another for a little bit more clarity.

Additionally many pjsip options were affected by the change to snake case, so I fixed any instances of those options in pjsip.conf.

I regenerated the config option list (at the bottom of the file) from a new xml config doc dump, so all the snake case changes should be reflected there, as well as any other changes to those options.

(issue ASTERISK-23004)
(closes issue ASTERISK-23004)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3086/
........

Merged revisions 404405 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 17:22:27 +00:00
Richard Mudgett e4803bbd9e Voicemail: Remove mailbox identifier format (box@context) assumptions in the system.
This change is in preparation for external MWI support.

Removed code from the system for normal mailbox handling that appends
@default to the mailbox identifier if it does not have a context.  The
only exception is the legacy hasvoicemail users.conf option.  The legacy
option will only work for app_voicemail mailboxes.  The system cannot make
any assumptions about the format of the mailbox identifer used by
app_voicemail.

chan_sip and chan_dahdi/sig_pri had the most changes because they both
tried to interpret the mailbox identifier.  chan_sip just stored and
compared the two components.  chan_dahdi actually used the box
information.

The ISDN MWI support configuration options had to be reworked because
chan_dahdi was parsing the box@context format to get the box number.  As a
result the mwi_vm_boxes chan_dahdi.conf option was added and is documented
in the chan_dahdi.conf.sample file.

Review: https://reviewboard.asterisk.org/r/3072/
........

Merged revisions 404348 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19 16:52:43 +00:00
Alexandr Anikin 86b5e11607 Introduce new config option 'aniasdni'. If yes then asterisk set dialed number as own id back to the caller
on incoming h.323 calls. Option can be set globally or per user section.

(closes issue ASTERISK-22020)
Reported by: Ross Beer



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 19:36:39 +00:00
David M. Lee 27f37f6e3d Changed the default for live_dangerously to no
........

Merged revisions 404006 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17 14:41:59 +00:00
David M. Lee 744556c01d security: Inhibit execution of privilege escalating functions
This patch allows individual dialplan functions to be marked as
'dangerous', to inhibit their execution from external sources.

A 'dangerous' function is one which results in a privilege escalation.
For example, if one were to read the channel variable SHELL(rm -rf /)
Bad Things(TM) could happen; even if the external source has only read
permissions.

Execution from external sources may be enabled by setting
'live_dangerously' to 'yes' in the [options] section of asterisk.conf.
Although doing so is not recommended.

Also, the ABI was changed to something more reasonable, since Asterisk
12 does not yet have a public release.

(closes issue ASTERISK-22905)
Review: http://reviewboard.digium.internal/r/432/
........

Merged revisions 403913 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 403917 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 403959 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16 19:11:51 +00:00
Kevin Harwell c602b086ed res_pjsip_messaging: send message to a default outbound endpoint
In some cases messages need to be sent to a direct URI (sip:<ip address>). This
patch adds in that support by using a default outbound endpoint.  When sending
messages, if no endpoint can be found then the default one is used.

To facilitate this a new default_outbound_endpoint option was added to the
globals section for pjsip.conf.

Review: https://reviewboard.asterisk.org/r/2944/
........

Merged revisions 403680 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 20:24:50 +00:00
Kevin Harwell 1c45a32ee8 res_pjsip: convert configuration settings names to snake case
Renamed, where appropriate, the configuration options for chan/res_pjsip to use
snake case (compound words separated by an underscore).  For example, faxdetect
will become fax_detect, recordofffeature will become record_off_feature, etc...

Review: https://reviewboard.asterisk.org/r/3002/
........

Merged revisions 403022 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 17:27:55 +00:00
Jonathan Rose 7950118e18 Confbridge: Add option to review the recording similar to announce_join_leave
Review: https://reviewboard.asterisk.org/r/3008/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-15 22:38:52 +00:00
Jonathan Rose bf5492abd2 security_events: Push out security events over AMI events
Security Events will now be written to any listener of the new 'security' class

Review: https://reviewboard.asterisk.org/r/2998/
........

Merged revisions 402584 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 19:33:48 +00:00
Richard Mudgett 0721b1de83 config: Allow ConfBridge DTMF menus to have '#' as the first digit.
ConfBridge allows custom DTMF menus to be created in the confbridge.conf
file by assigning a DTMF key sequence to a sequence of actions as follows:

DTMF-sequence = action,action...

Unfortunately, the normal config file processing code interprets an
initial '#' character as starting a directive such as #include.

* Add the ability to escape the first non-blank character in a config line
so the '#' character can be used without triggering the directive
processing code.

(closes issue AFS-2)
(closes issue ASTERISK-22478)
Reported by: Nicolas Tanski
Patches:
      jira_asterisk_22478_v11.patch (license #5621) patch uploaded by rmudgett (modified)

Review: https://reviewboard.asterisk.org/r/2969/
........

Merged revisions 402407 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402416 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-02 01:15:11 +00:00
Michael L. Young 4ca92e3b8a chan_iax2: Fix Binding To Multiple Addresses Again
When reworking chan_iax2 for IPv6, the ability to bind to multiple addresses
was removed by mistake.  This patch restores this functionality and adds notes
about IPv6 addresses in the sample config.

(closes issue ASTERISK-22741)
Reported by: Joshua Colp
Tested by: Michael L. Young
Patches:
    asterisk-22741-fix-binding-multiple-addr.diff
                                     uploaded by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2945/
........

Merged revisions 401488 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-23 02:36:01 +00:00
Richard Mudgett 2127848d6c chan_dahdi: Add config support for hwgain settings.
* Add hwtxgain and hwrxgain config options to chan_dahdi.conf with
documentation in chan_dahdi.conf.sample.

(closes issue ASTERISK-22429)
Reported by: Jaco Kroon
Patches:
      jira_asterisk_22429_hwgain_trunk.patch (license #5621) patch uploaded by rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-14 22:52:42 +00:00
Richard Mudgett f87086b374 app_confbridge: Can now set the language used for announcements to the conference.
ConfBridge now has the ability to set the language of announcements to the
conference.  The language can be set on a bridge profile in
confbridge.conf or by the dialplan function
CONFBRIDGE(bridge,language)=en.

(closes issue ASTERISK-19983)
Reported by: Jonathan White
Patches:
      M19983_rev2.diff (license #5138) patch uploaded by junky (modified)
Tested by: rmudgett
........

Merged revisions 400741 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 400742 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 20:18:37 +00:00
Jonathan Rose 44bd543181 chan_pjsip: Add alembic scripts for generating db tables for PJSIP
Also updates sample configurations for sorcery and extconfig to
demonstrate how to use databases created by that alembic script.

(closes issue ASTERISK-22133)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2892/
........

Merged revisions 400532 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 18:13:37 +00:00
Jonathan Rose 8fbe62f5df configuration samples: Pull all parking related stuff out of features.conf
This patch also adds documentation for parking from features.conf to
res_parking.conf
........

Merged revisions 400205 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 21:40:36 +00:00
David M. Lee 2de42c2a25 Multiple revisions 399887,400138,400178,400180-400181
........
  r399887 | dlee | 2013-09-26 10:41:47 -0500 (Thu, 26 Sep 2013) | 1 line
  
  Minor performance bump by not allocate manager variable struct if we don't need it
........
  r400138 | dlee | 2013-09-30 10:24:00 -0500 (Mon, 30 Sep 2013) | 23 lines
  
  Stasis performance improvements
  
  This patch addresses several performance problems that were found in
  the initial performance testing of Asterisk 12.
  
  The Stasis dispatch object was allocated as an AO2 object, even though
  it has a very confined lifecycle. This was replaced with a straight
  ast_malloc().
  
  The Stasis message router was spending an inordinate amount of time
  searching hash tables. In this case, most of our routers had 6 or
  fewer routes in them to begin with. This was replaced with an array
  that's searched linearly for the route.
  
  We more heavily rely on AO2 objects in Asterisk 12, and the memset()
  in ao2_ref() actually became noticeable on the profile. This was
  #ifdef'ed to only run when AO2_DEBUG was enabled.
  
  After being misled by an erroneous comment in taskprocessor.c during
  profiling, the wrong comment was removed.
  
  Review: https://reviewboard.asterisk.org/r/2873/
........
  r400178 | dlee | 2013-09-30 13:26:27 -0500 (Mon, 30 Sep 2013) | 24 lines
  
  Taskprocessor optimization; switch Stasis to use taskprocessors
  
  This patch optimizes taskprocessor to use a semaphore for signaling,
  which the OS can do a better job at managing contention and waiting
  that we can with a mutex and condition.
  
  The taskprocessor execution was also slightly optimized to reduce the
  number of locks taken.
  
  The only observable difference in the taskprocessor implementation is
  that when the final reference to the taskprocessor goes away, it will
  execute all tasks to completion instead of discarding the unexecuted
  tasks.
  
  For systems where unnamed semaphores are not supported, a really
  simple semaphore implementation is provided. (Which gives identical
  performance as the original taskprocessor implementation).
  
  The way we ended up implementing Stasis caused the threadpool to be a
  burden instead of a boost to performance. This was switched to just
  use taskprocessors directly for subscriptions.
  
  Review: https://reviewboard.asterisk.org/r/2881/
........
  r400180 | dlee | 2013-09-30 13:39:34 -0500 (Mon, 30 Sep 2013) | 28 lines
  
  Optimize how Stasis forwards are dispatched
  
  This patch optimizes how forwards are dispatched in Stasis.
  
  Originally, forwards were dispatched as subscriptions that are invoked
  on the publishing thread. This did not account for the vast number of
  forwards we would end up having in the system, and the amount of work it
  would take to walk though the forward subscriptions.
  
  This patch modifies Stasis so that rather than walking the tree of
  forwards on every dispatch, when forwards and subscriptions are changed,
  the subscriber list for every topic in the tree is changed.
  
  This has a couple of benefits. First, this reduces the workload of
  dispatching messages. It also reduces contention when dispatching to
  different topics that happen to forward to the same aggregation topic
  (as happens with all of the channel, bridge and endpoint topics).
  
  Since forwards are no longer subscriptions, the bulk of this patch is
  simply changing stasis_subscription objects to stasis_forward objects
  (which, admittedly, I should have done in the first place.)
  
  Since this required me to yet again put in a growing array, I finally
  abstracted that out into a set of ast_vector macros in
  asterisk/vector.h.
  
  Review: https://reviewboard.asterisk.org/r/2883/
........
  r400181 | dlee | 2013-09-30 13:48:57 -0500 (Mon, 30 Sep 2013) | 28 lines
  
  Remove dispatch object allocation from Stasis publishing
  
  While looking for areas for performance improvement, I realized that an
  unused feature in Stasis was negatively impacting performance.
  
  When a message is sent to a subscriber, a dispatch object is allocated
  for the dispatch, containing the topic the message was published to, the
  subscriber the message is being sent to, and the message itself.
  
  The topic is actually unused by any subscriber in Asterisk today. And
  the subscriber is associated with the taskprocessor the message is being
  dispatched to.
  
  First, this patch removes the unused topic parameter from Stasis
  subscription callbacks.
  
  Second, this patch introduces the concept of taskprocessor local data,
  data that may be set on a taskprocessor and provided along with the data
  pointer when a task is pushed using the ast_taskprocessor_push_local()
  call. This allows the task to have both data specific to that
  taskprocessor, in addition to data specific to that invocation.
  
  With those two changes, the dispatch object can be removed completely,
  and the message is simply refcounted and sent directly to the
  taskprocessor.
  
  Review: https://reviewboard.asterisk.org/r/2884/
........

Merged revisions 399887,400138,400178,400180-400181 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 18:55:27 +00:00
Kinsey Moore b44ce141e5 chan_sip: Allow Asterisk to retry after 403 on register
This adds a global option in chan_sip to allow it to continue
attempting registration if a 403 is received, clearing the cached nonce
and treating it as a non-fatal response. Normally, this would cause
registration attempts to that endpoint to stop.

This also adds a similar per-outbound-registration option to chan_pjsip
which allows the retry interval to be altered for 403 responses to
REGISTER requests.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874/
Reported by: Rudi
........

Merged revisions 400137 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 400140 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 400141 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 15:57:11 +00:00
Matthew Jordan a1d56da32a res_pjsip_notify: Add documentation
We forgot to add documentation for res_pjsip_notify, which would prevent it
from being loaded. Whoops.

This patch also updates res_pjsip_notify to use pjsip_notify.conf, which now
has its own sample file in the configs directory as well.

Review: https://reviewboard.asterisk.org/r/2835/
........

Merged revisions 400121 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28 22:57:17 +00:00
Sean Bright 89b8ff5d78 Remove some trailing whitespace and steal revision 400000.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27 19:18:55 +00:00
Rusty Newton 7c346a31ef Documentation fix - waitfordialtone is not boolean, it's time in milliseconds
Changing text in chan_dahdi.conf sample to be accurate.

(issue ASTERISK-22308)
(closes issue ASTERISK-22308)
Reported By: Malcolm Davenport
........

Merged revisions 398880 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 398881 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398882 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 23:52:49 +00:00
Russell Bryant 9b3e0b095e Fix typo in confbridge.conf.sample
The denoise filter requires func_speex, not codec_speex.  Fix this in the
description of the denoise=yes option in confbridge.conf.
........

Merged revisions 398820 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398821 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 18:03:30 +00:00
Rusty Newton be219c9ec9 New pjsip.conf.sample
(issue ASTERISK-22145)
(closes issue ASTERISK-22145)
Reported By: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2811/
........

Merged revisions 398147 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 20:37:54 +00:00
Matthew Jordan 449afdd9e8 Revert r394939 due to (numerous) objections
The patch from ASTERISK-21965 was committed perhaps a bit too hastily. Walter
and Tzafrir have pointed out numerous issues with the approach and have
propsed an alternative in r/2757. Since it's not a time critical issue and
is not worth holding up the release of 12 for it, I've gone ahead and reverted
r394939 from 12/trunk and re-opened ASTERISK-21965.
........

Merged revisions 397938 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 20:22:08 +00:00
Kinsey Moore d12c79f78f Update CEL sample config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 13:18:51 +00:00
Walter Doekes 33ec719645 Add "autoframing" option to sip.conf.sample and h323.conf.sample.
The autoframing option was added to chan_sip.c in r43243 (mogorman,
2006-09-19 01:32:57), but never made its way into the sample configs.

Review: https://reviewboard.asterisk.org/r/2768/
........

Merged revisions 396994 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 396995 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 11:48:57 +00:00
Richard Mudgett 0c44ee3be3 Update features.conf.sample atxferdropcall option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15 19:13:34 +00:00
Kinsey Moore f6c7e6355e Fix remnants of the pjsip renaming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31 13:31:55 +00:00
Mark Michelson 735b30ad71 The large GULP->PJSIP renaming effort.
The general gist is to have a clear boundary between old SIP stuff
and new SIP stuff by having the word "SIP" for old stuff and "PJSIP"
for new stuff. Here's a brief rundown of the changes:

* The word "Gulp" in dialstrings, functions, and CLI commands is now
  "PJSIP"
* chan_gulp.c is now chan_pjsip.c
* Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*"
* All files that were "res_sip*" are now "res_pjsip*"
* The "res_sip" directory is now "res_pjsip"
* Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*"
* The configuration file is now "pjsip.conf" instead of "res_sip.conf"
* The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP"
* CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as
the starting word instead of "sip"



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30 18:14:50 +00:00
Kinsey Moore d8956f690e Rename everything Stasis-HTTP to ARI
This renames all files and API calls from several variants of
Stasis-HTTP to ARI including:
* Stasis-HTTP -> ARI
* STASIS_HTTP -> ARI
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

Review: https://reviewboard.asterisk.org/r/2706/
(closes issue ASTERISK-22136)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-27 23:11:02 +00:00
Matthew Jordan bb955e37fb Provide proper ring tone in indications.conf for Malaysia
The ring tone provided in the sample indications.conf was incorrect. This patch
modifies the sample ring tone to be what it should:
  ring = 425/400,0/200,425/400,0/2000

This brings it in line with the tone definition in DAHDI 2.7.0. (zonedata.c)

(closes issue ASTERISK-21997)
Reported by: Filip Jenicek
patches:
  malaysia_ring.patch uploaded by phill (License 6277)
........

Merged revisions 394940 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 394941 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:17:17 +00:00
Matthew Jordan 54803338b4 Always install safe_asterisk; add configuration file support
This patch modifies the behavior of safe_asterisk in two ways:
(1) It modifies the Asterisk Makefile such that safe_asterisk is always
    installed on a 'make install'. This was done as bugfixes in the
    safe_asterisk script were not applied in previous version of Asterisk
    without first removing the old version of the script.
(2) In order to keep a newly installed version of safe_asterisk from impacting
    local modifications, a new config file - safe_asterisk.conf.sample - has
    been provided. Settings that were previously modified in safe_asterisk can
    be set there instead.

(closes issue ASTERISK-21965)
Reported by: Jeremy Kister
patches:
  safe_asterisk.patch uploaded by jkister (License 6232)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:12:00 +00:00
Matthew Jordan 75e83bdbab Document connectedline parameter for chan_iax2
The connectedline parameter for a chan_iax2 peer was undocumented. This patch
documents the options in the sample configuration file.

(closes issue ASTERISK-21953)
Reported by: Birger "WIMPy" Harzenetter
........

Merged revisions 394886 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 394890 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:26:31 +00:00
Richard Mudgett d43b17a872 Replace chan_agent with app_agent_pool.
The ill conceived chan_agent is no more.  It is now replaced by
app_agent_pool.

Agents login using the AgentLogin() application as before.  The
AgentLogin() application no longer does any authentication.
Authentication is now the responsibility of the dialplan.  (Besides, the
authentication done by chan_agent did not match what the voice prompts
asked for.)

Sample extensions.conf
[login]
; Sample agent 1001 login
; Set COLP for in between calls so the agent does not see the last caller COLP.
exten => 1001,1,Set(CONNECTEDLINE(all)="Agent Waiting" <1001>)
; Give the agent DTMF transfer and disconnect features when connected to a caller.
same => n,Set(CHANNEL(dtmf-features)=TX)
same => n,AgentLogin(1001)
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

[caller]
; Sample caller direct connect to agent 1001
exten => 800,1,AgentRequest(1001)
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

; Sample caller going through a Queue to agent 1001
exten => 900,1,Queue(agent_q)
same => n,Hangup()

Sample queues.conf
[agent_q]
member => Local/800@caller,,SuperAgent,Agent:1001

Under the hood operation overview:
1) Logged in agents wait for callers in an agents holding bridge.
2) Caller requests an agent using AgentRequest()
3) A basic bridge is created, the agent is notified, and caller joins the
   basic bridge to wait for the agent.
4) The agent is either automatically connected to the caller or must ack
   the call to connect.
5) The agent is moved from the agents holding bridge to the basic bridge.
6) The agent and caller talk.
7) The connection is ended by either party.
8) The agent goes back to the agents holding bridge.

To avoid some locking issues with the agent holding bridge, I needed to
make some changes to the after bridge callback support.  The after bridge
callback is now a list of requested callbacks with the last to be added
the only active callback.  The after bridge callback for failed callbacks
will always happen in the channel thread when the channel leaves the
bridging system or is destroyed.

(closes issue ASTERISK-21554)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2657/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-15 23:20:55 +00:00
David M. Lee 684481b74c Change ARI user config to use a type field
When I initially wrote the configuration support for ARI users, I
determined the section type by a category prefix (i.e., [user-admin]).

This is neither idiomatic Asterisk configuration, nor is it really
that user friendly. This patch replaces the category prefix with a
type field in the section, which is much cleaner.

Review: https://reviewboard.asterisk.org/r/2664/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11 14:39:55 +00:00
Russell Bryant 0bfe2d4cc4 astobj2-ify the SLA code
The SLA code within app_meetme was written before asotbj2 had been
merged into Asterisk.  Worse, support for reloads did not exist at first
and was added later as a bolt-on feature.  I knew at the time that
reloading was not safe at all while SLA was in use, so the reload would
be queued up to execute when the system was idle.  Unfortunately, this
approach was still prone to errors beyond the fact that this was the
only place in Asterisk where configuration was not reloaded
instantly when requested.

This patch converts various SLA objects to be reference counted objects
using astobj2.  This allows reloads to be processed while the system is
in use.  The code ensures that the objects will not disappear while one
of the other threads is using them.  However, they will be immediately
removed from the global trunk and station containers so no new calls
will use them if removed from configuration.

Review: https://reviewboard.asterisk.org/r/2581/
........

Merged revisions 393928 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 393929 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 01:56:15 +00:00
Richard Mudgett 02f55a36a0 Revert accidental overcommit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 23:57:37 +00:00
Richard Mudgett b4e9a3fc2f Add BUGBUG note for ASTERISK-22009
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 23:55:53 +00:00
David M. Lee c4adaf9106 Configuration for Stasis threadpool
The appropriate settings for the Stasis threadpool is very system
specific, depending upon both workload and system configuration.

This patch adds a stasis.conf file which can be used to configure the
key attributes of the threadpool for the Stasis message bus.

(closes issue ASTERISK-21280)
Review: https://reviewboard.asterisk.org/r/2651/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 17:20:43 +00:00
David M. Lee 9ba976b19c ARI authentication.
This patch adds authentication support to ARI.

Two authentication methods are supported. The first is HTTP Basic
authentication, as specified in RFC 2617[1]. The second is by simply
passing the username and password as an ?api_key query parameter
(which allows swagger-ui[2] to authenticate more easily).

ARI usernames and passwords are configured in the ari.conf file
(formerly known as stasis_http.conf). The user may be set to
`read_only`, which will prohibit the user from issuing POST, DELETE,
etc. Also, the user's password may be specified in either plaintext,
or encrypted using the crypt() function.

Several other notes about the patch.

 * A few command line commands for seeing ARI config and status were
   also added.
 * The configuration parsing grew big enough that I extracted it to
   its own file.

 [1]: http://www.ietf.org/rfc/rfc2617.txt [2]:
 https://github.com/wordnik/swagger-ui

(closes issue ASTERISK-21277)
Review: https://reviewboard.asterisk.org/r/2649/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:33:13 +00:00
Jonathan Rose f306dbd841 bridge_features: Support One touch Monitor/MixMonitor
In addition to porting those features, they now enjoy greater feature parity
with one another. Specifically, AutoMixMon now has a start and stop
message that can be specified with TOUCH_MIXMONITOR_MESSAGE_START and
TOUCH_MIXMONITOR_MESSAGE_STOP.

(closes issue ASTERISK-21553)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2620/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01 16:01:24 +00:00
Kinsey Moore 909ee4bfb9 Refactor extraneous channel events
This change removes JitterBufStats, ChannelReload, and ChannelUpdate
and refactors the following events to travel over Stasis-Core:
* LocalBridge
* DAHDIChannel
* AlarmClear
* SpanAlarmClear
* Alarm
* SpanAlarm
* DNDState
* MCID
* SIPQualifyPeerDone
* SessionTimeout

Review: https://reviewboard.asterisk.org/r/2627/
(closes issue ASTERISK-21476)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01 13:16:09 +00:00
Joshua Colp 77002bc377 Merge in current pimp_my_sip work, including:
1. Security events
2. Websocket support
3. Diversion header + redirecting support
4. An anonymous endpoint identifier
5. Inbound extension state subscription support
6. PIDF notify generation
7. One touch recording support (special thanks Sean Bright!)
8. Blind and attended transfer support
9. Automatic inbound registration expiration
10. SRTP support
11. Media offer control dialplan function
12. Connected line support
13. SendText() support
14. Qualify support
15. Inband DTMF detection
16. Call and pickup groups
17. Messaging support

Thanks everyone!

Side note: I'm reminded of the song "How Far We've Come" by Matchbox Twenty.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 14:03:22 +00:00
Matthew Jordan c2e29abcbf Add announce-to-first-user option for app_queue
In r386792, the ability to play prompts to the first caller in a call queue was
added. While this is arguably a bug fix for those who expect the first caller
to continue receiving prompts while the agent is dialed, it has the side effect
of preventing the first caller from hearing the agent immediately upon
bridging. This may not be a problem for those who really want this option, but
for those who didn't care whether or not the first caller in queue heard their
position, it was an issue.

This patch disables the ability for the first caller in the queue to hear
prompts and adds a new option, announce-to-first-user, to queues.conf. Those
who the behavior can enable it by setting this value to True.

Note that if we ever implement the ability to have the prompts be stopped
upon bridging, this option can be removed.

(closes issue ASTERISK-21782)
Reported by: Remi Quezada
........

Merged revisions 391215 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 391241 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 14:36:15 +00:00
Jason Parker a2d02edca5 Make app_queue AMI events more consistent. Give Join/Leave more useful names.
This also removes the eventwhencalled and eventmemberstatus configuration
options.  These events can just be filtered via manager.conf blacklists.

(closes issue ASTERISK-21469)
Review: https://reviewboard.asterisk.org/r/2586/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 19:51:19 +00:00
Richard Mudgett bad8caa8c6 Reimplement bridging and DTMF features related channel variables in the bridging core.
* The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer
channel driver specific.  If the channel variable is set on the
transferrer channel, the sound will be played to the target of an attended
transfer.

* The channel variable BRIDGEPEER becomes a comma separated list of peers
in a multi-party bridge.  The BRIDGEPEER value can have a maximum of 10
peers listed.  Any more peers in the bridge will not be included in the
list.  BRIDGEPEER is not valid in holding bridges like parking since those
channels do not talk to each other even though they are in a bridge.

* The channel variable BRIDGEPVTCALLID is only valid for two party bridges
and will contain a value if the BRIDGEPEER's channel driver supports it.

* The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and
is removed.  The more useful DYNAMIC_WHO_ACTIVATED gives the channel name
that activated the dynamic feature.

* The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are
set only on the channel executing the dynamic feature.  Executing a
dynamic feature on the bridge peer in a multi-party bridge will execute it
on all peers of the activating channel.

(closes issue ASTERISK-21555)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2582/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 22:46:54 +00:00
Richard Mudgett 3d63833bd6 Merge in the bridge_construction branch to make the system use the Bridging API.
Breaks many things until they can be reworked.  A partial list:
chan_agent
chan_dahdi, chan_misdn, chan_iax2 native bridging
app_queue
COLP updates
DTMF attended transfers
Protocol attended transfers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21 18:00:22 +00:00
Damien Wedhorn 01d6e8dbc9 Add call forward no answer to skinny and cleanup general callfwd handling.
CallforwardNoAnswer uses a sched to determine when to forward the call. 
Defaults to 20secs but configurable in skinny.conf.

Adds dialType to each subchannel structure to be used to differentiate
between normal dials that result in a call being placed (default) and
other uses for the skinny_dialer (such as cfwd digit collection).
Restructured all cfwd handling to use this new arrangement.

(closes issue ASTERISK-21292)
Reported by: wedhorn
Tested by: myself
Patches: 
    skinny-callfwdnoans03.diff uploaded by wedhorn (license 5019)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-18 23:20:53 +00:00
David M. Lee 946eb5ede0 Example of how to use the Stasis message bus
In order to get people familiar with the Stasis message bus, it would
be useful to have something of a tutorial. Since I'm not clever enough
to think of some cool integration we could do with Twitter, I settled
for something that might actually be useful.

This patch adds a res_statsd.so module, which implements a basic
statsd[1] client. Statsd is a very simple statistics gathering server,
which can publish its results to a backend graphing engine, like
Graphite[2]. There are several different Statsd server
implementations[3], so you can pick what works best for your
environment.

The actual example of how to use the Stasis message bus is in
res_chan_stats.so. This module demonstrates how to use subscriptions
and the message router by monitoring messages and posting channels
stats to the statsd server.

A wiki page walking through res_chan_stats.so is forthcoming.

 [1]: https://github.com/etsy/statsd/
 [2]: http://graphite.readthedocs.org/en/latest/
 [3]: http://joemiller.me/2011/09/21/list-of-statsd-server-implementations/

Review: https://reviewboard.asterisk.org/r/2460/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-26 20:05:15 +00:00
Joshua Colp 8c1f423cf7 Don't bind to anything in the sample configuration so we don't clash with chan_sip on a "make samples" right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-25 21:32:48 +00:00
Mark Michelson 74f2318051 Merge the pimp_my_sip branch into trunk.
The pimp_my_sip branch is being merged at this point because
it offers basic functionality, and from an API standpoint, things
are complete.

SIP work is *not* feature-complete; however, with the completion
of the SUBSCRIBE/NOTIFY API, all APIs (except a PUBLISH API) have
been created, and thus it is possible for developers to attempt
to create new SIP work.

API documentation can be found in the doxygen in the code, but
usability documentation is still lacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-25 18:25:31 +00:00
David M. Lee 1c21b8575b This patch adds a RESTful HTTP interface to Asterisk.
The API itself is documented using Swagger, a lightweight mechanism for
documenting RESTful API's using JSON. This allows us to use swagger-ui
to provide executable documentation for the API, generate client
bindings in different languages, and generate a lot of the boilerplate
code for implementing the RESTful bindings. The API docs live in the
rest-api/ directory.

The RESTful bindings are generated from the Swagger API docs using a set
of Mustache templates.  The code generator is written in Python, and
uses Pystache. Pystache has no dependencies, and be installed easily
using pip. Code generation code lives in rest-api-templates/.

The generated code reduces a lot of boilerplate when it comes to
handling HTTP requests. It also helps us have greater consistency in the
REST API.

(closes issue ASTERISK-20891)
Review: https://reviewboard.asterisk.org/r/2376/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-22 14:58:53 +00:00
Richard Mudgett 13e2aae2ef Fix 'pri intense debug span' alias.
........

Merged revisions 385313 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-11 16:53:21 +00:00
Rusty Newton 98f2318559 Modified the list of keys for the driver backends for sake of sample clarity
Added a line showing the mapping of "mysql" to res_config_mysql available in add-ons. We used "mysql" as an example driver key in the sample, but didn't show what module it mapped too. Also added a subtitle above the list of keys for driver backends.
........

Merged revisions 385047 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 385048 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 23:38:08 +00:00
Richard Mudgett 6a25d49296 chan_dahdi: Change inband_on_proceeding option default to no/disabled.
(issue ASTERISK-21151)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 20:27:11 +00:00
Richard Mudgett 79818112fd chan_dahdi: Add inband_on_proceeding compatibility option.
The new inband_on_proceeding option causes Asterisk to assume inband audio
may be present when a PROCEEDING message is received.

Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
attached to the B channel at this time without explicitly sending the
progress indicator ie informing the CPE side to attach to the B channel
for audio.  However, some non-compliant ISDN switches send a PROCEEDING
without the progress indicator ie indicating inband audio is available and
assume that the CPE device has connected the media path for listening to
ringback and other messages.

ASTERISK-17834 which causes this issue was dealing with a non-compliant
network switch.

(closes issue ASTERISK-21151)
Reported by: Gianluca Merlo
Tested by: rmudgett
........

Merged revisions 384685 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 384689 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-03 20:20:09 +00:00
David M. Lee 641fc7ea54 Sample config file for stasis-core.
(issue ASTERISK-20887)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 16:42:05 +00:00
Matthew Jordan 8d5c36c9bb Add RFC 3327 Path header support to chan_sip
This patch adds support for RFC 3327 "Path" headers. This can be enabled in
sip.conf using the 'supportpath' setting, either on a global basis or on a
peer basis. This setting enables Asterisk to route outgoing out-of-dialog
requests via a set of proxies by using a pre-loaded route-set defined by the
Path headers in the REGISTER request. This patch also adds Realtime support
for dynamically updating the Path information for a peer.

A huge thank-you to Klaus Darillion and Olle E Johansson for their efforts
in writing this patch.

Review: https://reviewboard.asterisk.org/r/2235/
Review: https://reviewboard.asterisk.org/r/991/

(closes issue ASTERISK-16884)
Reported by: klaus3000
Tested by: klaus3000, oej, mjordan
patches:
  path-1.8.0-patch.txt uploaded by klaus3000 (License 5054)
  oolong-path-support-trunk in team branch by oej (License 5267)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-05 13:14:43 +00:00
Matthew Jordan 33e4c6115f Ensure that the default bridge/user profiles are always available
ConfBridge and Page require that there always be a default bridge and user
profile available. While properties of the default profiles can be overriden
in the configuration file, removing them can create situations where neither
application can function properly.

This patch ensures that if an administrator removes the profiles from the
confbridge.conf configuration file, the profiles are added upon load.
Documentation clarifying this has been added to the confbridge.conf.sample file.

Review: https://reviewboard.asterisk.org/r/2356/

(closes issue AST-1115)
Reported by: John Bigelow
Tested by: John Bigelow
........

Merged revisions 382066 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 15:26:16 +00:00
Damien Wedhorn 0d553eece8 Add serviceURL stuff to skinny.
Patch adds all the packet and structure stuff to skinny to enable setting 
service URLs in skinny, such as corporate directories.

This stuff is only relevant during load/unload as when activated. Also 
some minor changes removing duplicated counting of addons and speedials in 
handle_skinny_show_devices.

Review: https://reviewboard.asterisk.org/r/2321/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19 06:54:23 +00:00
Walter Doekes d4d1d10307 Remove "registertrying" and add "rtp_engine" from/to sip.conf.sample
The "registertrying" option was removed in r343220. The "rtp_engine"
option was added in r186078 but erroneously named "engine" in the sample.
Note that there is no global sip setting for a different engine.
........

Merged revisions 381668 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 381669 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18 20:31:56 +00:00
Matthew Jordan d04ab3c645 Add CLI configuration documentation
This patch allows a module to define its configuration in XML in source, such
that it can be parsed by the XML documentation engine. Documentation is
generated in a two-pass approach:

1. The documentation is first generated from the XML pulled from the source
2. The documentation is then enhanced by the registration of configuration
   options that use the configuration framework

This patch include configuration documentation for the following modules:
 * chan_motif
 * res_xmpp
 * app_confbridge
 * app_skel
 * udptl

Two new CLI commands have been added:
 * config show help - show configuration help by module, category, and item
 * xmldoc dump - dump the in-memory representation of the XML documentation to
   a new XML file.

Review: https://reviewboard.asterisk.org/r/2278
Review: https://reviewboard.asterisk.org/r/2058

patches:
  on review 2058 uploaded by twilson



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 13:38:12 +00:00
Jonathan Rose 1a70d513f1 Call Parking: Set PARKINGLOT and PARKINGSLOT variables on all parked calls
These two variables were previously not being set when comebacktoorigin=yes
and the example configs seemed to imply that they should be. Since there
is no harm in this and since calls that are sent back to origin are capable
of continuing in the dialplan, this seemed like a no-brainer. Also it
supports some bridging tests I've been working on.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-08 17:36:23 +00:00
Damien Wedhorn 44872e797c Reset skinny vmexten and immeddial char on reload.
Make skinny reset vmexten and immeddial to '\0' on reload to ensure that
it is set to '\0' if the appropriate item is removed/commented in 
skinny.conf. Also small fix re immeddial char in skinny.conf and add
immedial setting to skinny show settings.

(closes issue ASTERISK-21037)
Reported by: snuffy
Tested by: snuffy, myself
Patches: 
    immed_dial_fix.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 06:55:02 +00:00
Russell Bryant dfdf3d9909 Add queue_log_realtime_use_gmt option to logger.conf
Add an option that lets you specify that the timestamps going into the realtime
queue log should be in GMT instead of local time.

Review: https://reviewboard.asterisk.org/r/2287/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28 01:50:54 +00:00
Joshua Colp 3fa4278a31 Merge the sorcery data access layer API.
Sorcery is a unifying data access layer which provides a pluggable mechanism to allow
object creation, retrieval, updating, and deletion using different backends (or wizards).

This is a fancy way of saying "one interface to rule them all" where them is configuration,
realtime, and anything else that comes along.

Review: https://reviewboard.asterisk.org/r/2259/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25 14:01:04 +00:00
Damien Wedhorn e9446501c9 Add force dial keys to skinny.
Adds a dial softkey when the device is in DAFD. The softkey is greyed (unusable) 
until a possible dialplan match is entered. Code includes updating 
transmit_selectsoftkeys to allow the use of a button mask. Also add option
to use # or * as a dial now button. Original patch by snuffy cleaned up by myself.

Review: https://reviewboard.asterisk.org/r/2277/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25 05:49:54 +00:00
Richard Mudgett 8ed2c74fe3 app_queue: Fix multiple calls to a queue member that is in only one queue.
When ringinuse=no queue members can receive more than one call if these
calls happen at nearly the same time.

* Fix so a queue member does not receive more than one call from a queue.

NOTE: This fix does not prevent multiple calls to a member if the member
is in more than one queue.

* Did some refactoring to eliminate some code redundancy.

(issue ASTERISK-16115)
Reported by: nik600
Patches:
      jira_asterisk_16115_single_q_v1.8.patch (license #5621) patch uploaded by rmudgett
      Modified

* Revert the -r341580 and -r341599 changes adding the queues.conf
check_state_unknown option as it was added in an attempt to fix this
problem.  The fix did not need to be optional.  The fix should not have
tried to explicitly set the device state.  Setting the device state by
something other than the device introduces a race condition.  I also could
not see how the change would be effective other than delaying the
app_queue code long enough for the device state to propagate to app_queue.
........

Merged revisions 378663 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 378683 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 378687 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-08 23:44:26 +00:00
Tilghman Lesher 7739ed9989 Add aliases to the Directory.
This is an interesting feature that allows additional strings to be used to
search the Directory, primarily intended to be used with nicknames, but could
be used with affiliations and the like.  Because the name field is used in
more than one place (such as email notifications), it is important that these
additional strings not be placed in the name field, but be specified
separately.

Review: https://reviewboard.asterisk.org/r/2244/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 16:04:11 +00:00
Brent Eagles ab894d5af9 This change adds a SIP peer configuration feature to allow the peer's
configured codecs to take precedence on an outgoing call.

This change introduces a new peer configuration property named
'ignore_requested_pref' that causes the requested codec to be ignored when
determining the preferred codec for an outgoing call leg. The consequence is
that Asterisk's usual efforts to prefer avoiding transcoding can be overridden
on a peer-by-peer basis where appropriate. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 15:22:27 +00:00
Joshua Colp 898ca023d5 Tweak extension used for incoming calls received on Motif.
Based on feedback from numerous individuals this patch tweaks incoming calls
to first look for an extension with the name of the endpoint. If no such extension
exists the call will silently fall back to the "s" extension as it previously
did.
........

Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-01 00:47:42 +00:00
Joshua Colp 866d968149 Remove a fixed size limitation for producing SDP and change how ICE support is disabled by default.
With ICE support enabled in chan_sip and a large number of interfaces on the system it was
possible for the produced SDP to be truncated due to some fixed size buffers. These buffers
have now been changed so they will dynamically grow as needed.

ICE support is now also enabled by default in res_rtp_asterisk to provide a smoother experience
for chan_motif users where it is required. To maintain the previous behavior in chan_sip it is
no longer enabled by default there.

(closes issue ASTERISK-20643)
Reported by: coopvr
........

Merged revisions 376130 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-11 17:15:47 +00:00
Jonathan Rose d4a357b82f chan_sip: Fix a bug causing SIP reloads to remove all entries from the registry
A regression was introduced in chan_sip by changes to sip reload introduced by
r349097. That patch moved peer purging from the beginning of the reload to
after the general configuration was finished. This patch fixes that by undoing
the repositioning of the original peer purging code and using a similar
function after performing general configuration that purges only autocreated
peers that were created when persist mode isn't enabled.

(closes issue ASTERISK-20611)
Reported by: Alisher
Review: https://reviewboard.asterisk.org/r/2171/
........

Merged revisions 375575 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-01 15:03:04 +00:00
Pedro Kiefer 8b34dc8192 Adds new formats to app_alarmreceiver, ALAW calls support and enhanced protection.
Commiting this on behalf of Kaloyan Kovachev (license 5506).
AlarmReceiver now supports the following DTMF signaling types:
 - ContactId
 - 4x1
 - 4x2
 - High Speed
 - Super Fast
We are also auto-detecting which signaling is being received. So support for
those protocols should work out-the-box. Correctly identify ALAW / ULAW calls.
Some enhanced protection for broken panels and malicious callers where added.

(closes issue ASTERISK-20289)
Reported by: Kaloyan Kovachev

Review: https://reviewboard.asterisk.org/r/2088/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17 19:02:46 +00:00
Richard Mudgett 3e1d2917bb dahdi.conf.sample: Add description for "buffers" setting.
This contains an edited version of the patch originally created by John
Bigelow.

(closes issue ASTERISK-14435)
Reported by: John Bigelow
Patches:
      buffers.patch (license #5091) patch uploaded by John Bigelow
      0001-dahdi.conf.sample-Add-description-for-buffers-settin.patch (license #5417) patch uploaded by Shaun Ruffell
      Modified
........

Merged revisions 374727 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374728 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374729 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 22:31:09 +00:00
Matthew Jordan 3620fcff36 Disable ICE support by default
Since there are a number of legacy devices out there that fail to handle ICE
candidates properly (which is a nice way of saying something much uglier),
disable it by default.

Support for ICE candidates can be enabled in rtp.conf using the icesupport
setting.
........

Merged revisions 374676 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08 20:39:26 +00:00
Alec L Davis 90f8c90b10 dsp.c User Configurable DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END
Instead of a recompile, allow values to be adjusted in dsp.conf

For binary distributions allows easy adjustment for wobbly GSM calls, and other reasons.

Defaults to DTMF_HITS_TO_BEGIN=2 and DTMF_MISSES_TO_END=3

(closes issue ASTERISK-17493)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2144/
........

Merged revisions 374479 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374481 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374485 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 20:21:36 +00:00
Alec L Davis 4af961a03a dsp.c User configuration of DTMF_NORMAL_TWIST and DTMF_REVERSE_TWIST values
Asterisk's DTMF Specifications are based on AT&T specs, which may not be compatible in other countries.

Various countries have different specifications for the maximum power level differences
between the DTMF low group and high group of frequencies.

Power level difference between frequencies for different Administrations/RPOAs
 NTT        = Max. 5 dB
 AT&T       = 4dB(reverse) to 8dB(normal)
 Danish     = Max. 6 dB
 Australian = Max. 10 dB
 Brazilian  = Max. 9 dB
 ETSI       = Max. 6 dB from ETSI ES 201 235-3 V1.3.1 (2006-03)

Now allow 4 variables to be individually configured in dsp.conf, with reasonable min/max of 2dB to 20dB.
Default is AT&T specifications

Add's the following variables to dsp.conf
;dtmf_normal_twist=6.31 
;dtmf_reverse_twist=2.51 
;relax_dtmf_normal_twist=6.31 
;relax_dtmf_reverse_twist=3.98 


(closes issue ASTERISK-20442)
Reported by: tbsky
Tested by: tbsky,alecdavis

alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2141/
........

Merged revisions 374384 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374385 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374386 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-04 04:50:16 +00:00
Mark Michelson 2b56626b43 Remove dead code and documentation for nonexistent feature.
multiplelogin was removed from chan_agent back in 1.6.0 when
AgentCallbackLogin() was removed.

(closes issue AST-948)
reported by Steve Pitts
........

Merged revisions 373768 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373769 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373770 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 22:57:56 +00:00
Terry Wilson b7233b18eb Properly handle UAC/UAS roles for SIP session timers
The SIP session timer mechanism contains a mandatory 'refresher' parameter
(included in the Session-Expires header) which is used in the session timer
offer/answer signaling within a SIP Invite dialog. It looks like asterisk is
interpreting the uac resp. uas role only as the initial role of client and
server (caller is uac, callee is uas). The standard rfc 4028 however assigns
the client role to the ((RE)-Invite) requester, the server role to the
((RE)-Invite) responder.

This patch has Asterisk track the actual refresher as "us" or "them" as opposed
to relying on just the configured "uas" or "uac" properties.

(closes issue AST-922)
Reported by: Thomas Airmont

Review: https://reviewboard.asterisk.org/r/2118/
........

Merged revisions 373652 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373665 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373690 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 19:08:02 +00:00
Kinsey Moore d7085e431f Fix documentation for default username in res_odbc
This was previously stated to be "root", but is actually the name of
the context if unspecified.

(closes issue ASTERISK-20258)
Reported by: Stefan x
........

Merged revisions 373578 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373579 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373580 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-25 13:29:37 +00:00
Brent Eagles f787f4219a res_rtp_asterisk: Make TURN and STUN server configurations consistent.
This patch removes the turnport configuration property and changes the
turnaddr property to be a combined host[:port] configuration string. The
patch also modifies the documentation in the example configuration to
reflect the property changes and adds some additional text indicating how
the STUN port is configured.

(closes issue ASTERISK-20344)
Reported by: beagles
Tested by: beagles
Review: https://reviewboard.asterisk.org/r/2111/
........

Merged revisions 373403 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-24 12:42:19 +00:00
Matthew Jordan ca0e96ae19 Add queue monitoring hints
This patch adds support for hints on a queue.  Hints can be added using
the nomenclature 'Queue:name', where name is the name of the queue being
monitored.

This nifty feature was done by Alec Davis.

Review: https://reviewboard.asterisk.org/r/1619

Reported by: Alec Davis
Tested by: alecdavis
patches:
  review1619.diff2 by alecdavis (license 585)
........

Merged revisions 373235 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:44:26 +00:00
Joshua Colp e8380afc8a Add support for DTLS-SRTP to res_rtp_asterisk and chan_sip.
As mentioned on the review for this, WebRTC has moved towards choosing
DTLS-SRTP as the mechanism for key exchange for SRTP. This commit adds
support for this but makes it available for normal SIP clients as well.

Testing has been done to ensure that this introduces no regressions with
existing behavior and also that it functions as expected.

Review: https://reviewboard.asterisk.org/r/2113/
........

Merged revisions 373229 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:27:28 +00:00
Alec L Davis 67ca3b9126 app_queue: Support an 'agent available' hint
Sets INUSE when no free agents, NOT_INUSE when an agent is free.  

modifes handle_statechange() scan members loop to scan for a free agent
and updates the Queue:queuename_avial devstate.

Previously exited early if the member was found in the queue.

Now Exits later when both a member was found, and a free agent was found.


alecdavis (license 585)
Reported by: Alec Davis
Tested by: alecdavis

Review: https://reviewboard.asterisk.org/r/2121/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-19 22:33:12 +00:00
Jonathan Rose 1a79c9c182 logger: Add rotatestrategy option of 'none' which does not perform rotations
With this option in use, it may be necessary to regulate your log files
externally.

(closes issue ASTERISK-20189)
Reported by: Jaco Kroon
Patches:
    asterisk-logger-norotate-trunk.patch uploaded by Jaco Kroon (license 5671)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-12 17:13:02 +00:00
Darren Sessions 7e46e4d17b LDAP Realtime Peers Cannot Register
Prior to 1.8, it was not necessary for an explicit "type" to be set for an
asterisk LDAP realtime peer. Now the routine find_peer actually checks the
type field during registration and fails to find the peer if it is not set.

The attached patch makes the realtime type equal whatever type is being 
searched for if the type is 0 upon return from routine build_peer. 

(closes issue ASTERISK-17222)
Reported by: John Covert
Patch by: David Vossel
Tested by: Darren Sessions

Review: https://reviewboard.asterisk.org/r/2095/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05 14:12:11 +00:00
Mark Michelson 44d854938b Fix misleading documentation in agents.conf.sample regarding ackcall usage.
The documentation made it sound as if the DTMF acknowledgment was needed
at the time the agent logs in, rather than when the agent is called. This
is likely a relic from the days when there were multiple ways of logging
in agents.

(closes issue AST-962)
reported by Steve Pitts
........

Merged revisions 371787 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371789 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 371790 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 21:51:47 +00:00
Mark Michelson 4b50e3f1ee Fix incorrectly documented option in queues.conf
sharedlastcall defaults to "no" not "yes"

(closes issue AST-979)
reported by Steve Pitts
........

Merged revisions 371747 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371748 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 371750 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-27 17:52:16 +00:00
Matthew Jordan 5c4578f4ad Add named callgroups/pickupgroups
This patch adds named calledgroups/pickupgroups to Asterisk.  Named groups are
implemented in parallel to the existing numbered callgroup/pickupgroup
implementation.  However, unlike the existing implementation, which is limited
to a maximum of 64 defined groups, the number of defined groups allowed for
named callgroups/pickupgroups is effectively unlimited.

Named groups are configured with the keywords "namedcallgroup" and
"namedpickupgroup".  This corresponds to the numbered group definitions of
"callgroup" and "pickupgroup".  Note that as the implementation of named groups
coexists with the existing numbered implementation, a defined named group of
"4" does not equate to numbered group 4.

Support for the named groups has been added to the SIP, DAHDI, and mISDN channel
drivers.

Review: https://reviewboard.asterisk.org/r/2043

Uploaded by:
	Guenther Kelleter(license #6372)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07 12:46:36 +00:00
Mark Michelson 4377d511ae Add headers from SIPAddHeader to outbound REFER requests.
This is a patch from kkm from review board.

This is useful for adding headers to REFER requests that
emanate from a Transfer() dialplan application call.

This also fixes some uses of the Referred-by header, removing
an extra set of angle brackets.

I've modified the reporter's original patch to not require
any additions to the sip_refer header and to just remove the
referred_by_name from sip_refer since it is no longer needed
or used.

(closes Issue ASTERISK-17639)
reported by Kirill Katsnelson
Patches:
	019059-sip-refer-addheaders-trunk-353549.diff
	uploaded by Kirill Katsnelson (license #5845)

Review: https://reviewboard.asterisk.org/r/1159



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 22:28:16 +00:00
Mark Michelson 58f281a670 Add "setvar" option to manager.conf.
With this option set, channel variables can be set on
every manager originate. The Variable header can still
be used to set additional channel variables for individual
calls if desired.

This work was completed by Olle Johansson on review board.
I have applied the review feedback and am committing it in
order to get this into trunk before Asterisk 11 is branched.

Review: https://reviewboard.asterisk.org/r/1412



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 21:21:57 +00:00
Mark Michelson a28e6fc7bd Add separate configuration options for subscription and registration minexpiry and maxexpiry.
This offers more fine-grained control over how long subscriptions last without negatively
affecting the expiration range for registrations.

Uploaded by:
	Guenther Kelleter(license #6372)

Review: https://reviewboard.asterisk.org/r/2051



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-23 21:10:54 +00:00
Joshua Colp 4d6b524b61 Prevent multiple local candidates from being added with the same information and add support for disabling ICE on a per-peer basis.
(closes issue ASTERISK-20088)
Reported by: wimpy

Review: https://reviewboard.asterisk.org/r/2044/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-22 17:03:24 +00:00
Jonathan Rose ded09e3682 named_acl: Remove systemname option from acl.conf, use asterisk.conf value
Review: https://reviewboard.asterisk.org/r/2057/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19 20:37:10 +00:00
Igor Goncharovskiy 9278b5e51e Added option 'interdigit_timer' to unistim.conf to make able controll hardcoded dial timeout constant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-18 07:17:00 +00:00
Joshua Colp e938737570 Add support for SIP over WebSocket.
This allows SIP traffic to be exchanged over a WebSocket connection which is useful for rtcweb.

Review: https://reviewboard.asterisk.org/r/2008


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-16 12:35:04 +00:00
Terry Wilson a7dfafdc56 Handle deprecated (aliased) option names with the config options api
Add a simple way to register "deprecated" option names that alias to a
different "current" name.

Review: https://reviewboard.asterisk.org/r/2026/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-12 21:43:09 +00:00
Jonathan Rose 10afdf3a2a Named ACLs: Introduces a system for creating and sharing ACLs
This patch adds Named ACL functionality to Asterisk. This allows system
administrators to define an ACL and refer to it by a unique name. Configurable
items can then refer to that name when specifying access control lists.
It also includes updates to all core supported consumers of ACLs. That includes
manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk
by Olle E. Johansson and provides a subset of the Named ACL functionality
implemented in that branch. For more information on this feature, see acl.conf
and/or the Asterisk wiki.

Review: https://reviewboard.asterisk.org/r/1978/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-11 18:33:36 +00:00
Joshua Colp 04504e80a3 Document that multiple endpoints using the same connection is not supported.
(closes issue ASTERISK-20104)
Reported by: Malcolm Davenport


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-09 18:54:43 +00:00
Jason Parker b1cd995273 Add Digium phones context to sip_notify sample config.
This makes it so that they can be reconfigured remotely.

(closes issue ASTERISK-19910)
........

Merged revisions 369818 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 369819 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-09 17:07:06 +00:00
Joshua Colp a3fa37b8cf Add a new unified Jingle, Google Jingle, and Google Talk channel driver written from scratch called chan_motif.
This channel driver is a replacement for both chan_gtalk and chan_jingle but adds additional features not found in either.
These features include full configuration reload, video, full codec support, bidirectional cause code mapping, hold,
unhold, and ringing indication. It is also compliant with the current published Jingle and Google Jingle specifications.
The original Google Talk protocol is also supported for Google Voice interoperability.

You may ask yourself though where the name motif comes from... and I would say to you... music!

motif: a perceivable or salient recurring fragment or succession of notes

Sorta like a jingle!

Review: https://reviewboard.asterisk.org/r/1917/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-07 17:06:51 +00:00
Alexandr Anikin fa10f3f8a8 Added direct media support to ooh323 channel driver
options are documented in config sample
sample config rename to proper name - ooh323.conf

To change media address ooh323 send empty TCS if there was 
completed TCS exchange or send facility forwardedelements 
with new fast start proposal if not.
Then close transmit logical channels and renew TCS exchange.

If new fast start proposal is received then ooh323 stack call back
channel driver routine to change rtp address in the rtp instance.
If empty TCS is received then close transmit logical channels and
renew TCS exchange

Review: https://reviewboard.asterisk.org/r/1607/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-04 21:42:05 +00:00
Joshua Colp 213bbc169a Add a cleaned up drop-in replacement for res_jabber called res_xmpp. This provides the same externally facing functionality but is implemented differently internally.
This is currently not built by default but this will be changed once chan_jingle2 (insert actual name in your head when reading this after it has been merged)
is in the tree.

Review: https://reviewboard.asterisk.org/r/1983/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-02 14:06:19 +00:00
Joshua Colp 37256ea45d Add support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip.
Review: https://reviewboard.asterisk.org/r/1891/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-01 17:28:57 +00:00
Richard Mudgett ac35b92b62 Hangup handlers - Dialplan subroutines that run when the channel hangs up.
Hangup handlers are an alternative to the h extension.  They can be used
in addition to the h extension.  The idea is to attach a Gosub routine to
a channel that will execute when the call hangs up.  Whereas which h
extension gets executed depends on the location of dialplan execution when
the call hangs up, hangup handlers are attached to the call channel.  You
can attach multiple handlers that will execute in the order of most
recently added first.

(closes issue ASTERISK-19549)
Reported by: Mark Murawski
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/2002/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29 17:02:32 +00:00
Terry Wilson 1609fca6bb Add the ability to set flags via the config options api
Allows the setting of flags via the config options api.
For example, code like this:

#define OPT1 1 << 0
#define OPT2 1 << 1
#define OPT3 1 << 2

struct thing {
   unsigned int flags;
};

and a config like this:

[blah]
opt1=yes
opt2=no
opt3=yes

Review: https://reviewboard.asterisk.org/r/2004/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-28 01:12:06 +00:00
Mark Michelson 14a985560e Merge changes dealing with support for Digium phones.
Presence support has been added. This is accomplished by
allowing for presence hints in addition to device state
hints. A dialplan function called PRESENCE_STATE has been
added to allow for setting and reading presence. Presence
can be transmitted to Digium phones using custom XML
elements in a PIDF presence document.

Voicemail has new APIs that allow for moving, removing,
forwarding, and playing messages. Messages have had a new
unique message ID added to them so that the APIs will work
reliably. The state of a voicemail mailbox can be obtained
using an API that allows one to get a snapshot of the mailbox.
A voicemail Dialplan App called VoiceMailPlayMsg has been
added to be able to play back a specific message.

Configuration hooks have been added. Configuration hooks
allow for a piece of code to be executed when a specific
configuration file is loaded by a specific module. This is
useful for modules that are dependent on the configuration
of other modules.

chan_sip now has a public method that allows for a custom
SIP INFO request to be sent mid-dialog. Digium phones use
this in order to display progress bars when files are played.

Messaging support has been expanded a bit. The main
visible difference is the addition of an AMI action
MessageSend.

Finally, a ParkingLots manager action has been added in order
to get a list of parking lots.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04 20:26:12 +00:00
Terry Wilson 6016094db7 Add missing config for config API test
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01 18:20:44 +00:00
Terry Wilson d54717c39e Add new config-parsing framework
This framework adds a way to register the various options in a config
file with Asterisk and to handle loading and reloading of that config
in a consistent and atomic manner.

Review: https://reviewboard.asterisk.org/r/1873/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01 16:33:25 +00:00
Mark Michelson 463f9d729a Help mitigate potential reinvite glare scenarios.
When Asterisk servers are set up back-to-back, and
direct media is to be used betweeen endpoints, it is
fairly common for the two Asterisk servers to send
direct media reinvites to each other simultaneously.
This results in 491s and ACKs being exchanged between
the servers. While the media eventually gets set up
properly, the problem is that there can be a noticeable
delay for the streams to stabilize.

This patch adds a new directmedia option called "outgoing".
With this set, an immediate direct media reinvite will only
be sent if the call direction is outgoing. For incoming
dialogs, an immediate direct media reinvite will not be sent,
but further "reactionary" direct media reinvites may be sent.

Review: https://reviewboard.asterisk.org/r/1954



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01 13:04:32 +00:00
Jonathan Rose ec3b8a1f27 app_queue: Per Member ringinuse option and deprecation of ignorebusy
Adds a number of methods for controlling the setting of 'ringinuse'
which is basically the same concept as the old ignorebusy setting,
only now the per member setting always controls whether or not the
member is actually ringed while in use. A CLI command and a manager
action have been added to change a given queue member's ringinuse
option while Asterisk is running and the an argument has been added
for adding members with deliberately set ringinuse in queues.conf
Some effort has been made to ensure compatability with dialplans and
databases still referring to 'ignorebusy'.

(issue ASTERISK-19536)
reported by: Philippe Lindheimer
Review: https://reviewboard.asterisk.org/r/1919/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18 19:39:54 +00:00
Kinsey Moore b5a6de76fc Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE)
This is the starting point for the Asterisk 11: Who Hung Up work and provides
a framework which will allow channel drivers to report the types of hangup
cause information available in SIP_CAUSE without incurring the overhead of the
MASTER_CHANNEL dialplan function. The initial implementation only includes
cause generation for chan_sip and does not include cause code translation
utilities.

This change deprecates SIP_CAUSE and replaces its method of reporting cause
codes with the new framework. This change also deprecates the 'storesipcause'
option in sip.conf.

Review: https://reviewboard.asterisk.org/r/1822/
(Closes issue SWP-4221)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14 19:44:27 +00:00
Richard Mudgett 108f5fafd7 Improve FollowMe accept/decline DTMF string matching.
If you hit the wrong DTMF digit trying to accept/decline a FollowMe call,
you had to wait for the prompt to repeat to try again.

* Make FollowMe compare the last DTMF digits received to the
accept/decline matching strings.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-09 17:58:11 +00:00
Richard Mudgett d71d8ed995 Keep answered FollowMe calls until call accepted or last step times out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-09 02:35:29 +00:00
Joshua Colp ae1502be33 Add support for lightweight NAT keepalive.
If enabled using the keepalive option in sip.conf a small packet will be sent
at a regular interval to keep the NAT mapping open. This is lightweight as the
remote side does not need to parse and handle a SIP message.

(closes issue AST-783)
Review: https://reviewboard.asterisk.org/r/1756/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 20:24:45 +00:00
Olle Johansson 7aa0c3c64b Make it possible to change the minimum DTMF duration in asterisk.conf
Asterisk has a setting for the minimum allowed DTMF. If we get shorter
DTMF tones, these will be changed to the minimum on the outbound call
leg. 

(closes issue ASTERISK-19772)

Review: https://reviewboard.asterisk.org/r/1882/
Reported by: oej
Tested by: oej
Patches by: oej

Thanks to the reviewers.

1.8 branch for this patch: agave-dtmf-duration-asterisk-conf-1.8



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 09:32:21 +00:00
Richard Mudgett 47ccc7f5d6 Update membermacro and membergosub documentation in queues.conf.sample.
........

Merged revisions 362677 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 362678 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-19 21:01:07 +00:00
Richard Mudgett c7cb03a975 Add ability to ignore layer 1 alarms for BRI PTMP lines.
Several telcos bring the BRI PTMP layer 1 down when the line is idle.
When layer 1 goes down, Asterisk cannot make outgoing calls.  Incoming
calls could fail as well because the alarm processing is handled by a
different code path than the Q.931 messages.

* Add the layer1_presence configuration option to ignore layer 1 alarms
when the telco brings layer 1 down.  This option can be configured by span
while the similar DAHDI driver teignorered=1 option is system wide.  This
option unlike layer2_persistence does not require libpri v1.4.13 or newer.

Related to JIRA AST-598

JIRA ABE-2845
........

Merged revisions 362428 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 362429 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-18 16:41:17 +00:00
Richard Mudgett a35c7ba8e7 Add option to invoke the extensions.conf stdexten using the legacy macro method.
ASTERISK-18809 eliminated the legacy macro invocation of the stdexten in
favor of the Gosub method without a means of backwards compatibility.

(issue ASTERISK-18809)
(closes issue ASTERISK-19457)
Reported by: Matt Jordan
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1855/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-12 16:29:52 +00:00
Jonathan Rose 683eacb59a Change default value of 'ignorebusy' on Queue members so that behavior is more like 1.8
Prior to this patch, in order to restore that behavior, a function would have
to be used on the QueueMember to make the ringinuse option do anything, which
is pretty unreasonable.

(closes issue ASTERISK-19536)
reported by: Philippe Lindheimer
Review: https://reviewboard.asterisk.org/r/1860/
........

Merged revisions 361907 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-11 17:20:08 +00:00
Russell Bryant b2f7b0c649 Remove a few more files related to chan_usbradio and app_rpt.
........

Merged revisions 361380 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361381 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06 15:50:18 +00:00
Jonathan Rose 655a8d4420 Introducing the log message unique call identifiers feature
Log messages will now display a call number that they are tied to (ordered for calls
based on when they started). This feature is made to be minimally invasive without
requiring changes to many of the existing log messages. These IDs  won't show up for
verbose messages on CLI (but they will in log files) This is currently in phase II
of production, see more about this feature on the wiki --
https://wiki.asterisk.org/wiki/display/AST/Unique+Call-ID+Logging

Review: https://reviewboard.asterisk.org/r/1823/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 20:01:20 +00:00
Jonathan Rose d501c2ea2d undoing 360785 due to merging mistake
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 19:59:30 +00:00
Jonathan Rose bf994f0e04 Introducing the log message unique call identifiers feature
Log messages will now display a call number that they are tied to (ordered for calls
based on when they started). This feature is made to be minimally invasive without
requiring changes to many of the existing log messages. These IDs  won't show up for
verbose messages on CLI (but they will in log files) This is currently in phase II
of production, see more about this feature on the wiki --
https://wiki.asterisk.org/wiki/display/AST/Unique+Call-ID+Logging

Review: https://reviewboard.asterisk.org/r/1823/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 19:54:35 +00:00
Richard Mudgett a22b56235b Add ability for chan_dahdi ISDN to block connected line updates per span.
Added new chan_dahdi.conf colp_send option parameter to block connected
line updates per span.

(closes issue ASTERISK-17025)
Reported by: Michael Smith


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 21:18:31 +00:00
Igor Goncharovskiy c369a4416b Massive changes in chan_unistim channel driver. Include many fixes in channel driver operation and add additional functionality:
* Added ability to use multiple lines on phone, so for one device in configuration multiple lines can be defined, it allows to have multiple calls on one phone, callwaiting and switching between calls.
 * Added ability for translation on-screen menu to multiple languages. Tested on Russian languages.  Supported encodings: ISO 8859-1, ISO 8859-2, ISO 8859-4, ISO 8859-5, ISO 2022-JP. Language controlled by 'language' and on-screen menu of phone
 * Other described in CHANGES file

Testing done by issue tracker users: ibercom, scsiborg, idarwin, TeknoJuce, c0rnoTa. 
Tested on production system by Jonn Taylor (jonnt) using phone models: Nortel i2004, 1120E and 1140E.

(closes issue ASTERISK-16890)

Review: https://reviewboard.asterisk.org/r/1243/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-12 17:01:26 +00:00
Joshua Colp f5fda0eb74 Transition app_page to using app_confbridge internally for the conference bridge portion of paging. This also adds a new 'announcement' option to ConfBridge user profiles.
Review: https://reviewboard.asterisk.org/r/1754/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-10 20:06:46 +00:00
Terry Wilson 706f79d122 Handle numeric columns for eventtype properly in cel_odbc
Patch also implements correct handling of datetime2 and datetimeoffset new
datatypes in SQL Server 2008 and 2008 R2.

(closes issue ASTERISK-17548)

Review: https://reviewboard.asterisk.org/r/1160/
Review: https://reviewboard.asterisk.org/r/1804/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 21:28:55 +00:00
Terry Wilson deded253b3 Set snarkiness = 0 in cdr_adaptive_odbc.conf.sample
........

Merged revisions 358438 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358441 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 15:19:05 +00:00
Richard Mudgett a0f8821749 Add dialtone_detect option for analog incoming calls.
For analog lines, enables Asterisk to use dialtone detection per channel
if an incoming call was hung up before it was answered.  If dialtone is
detected, the call is hung up.
no:       Disabled. (Default)
yes:      Look for dialtone for 10000 ms after answer.
<number>: Look for dialtone for the specified number of ms after answer.
always:   Look for dialtone for the entire call.  Dialtone may return
          if the far end hangs up first.

dialtone_detect=yes
dialtone_detect=5000
dialtone_detect=always

(closes issue ASTERISK-19316)
Reported by: Jeremy Pepper
Patch by: Jeremy Pepper
Tested by: rmudgett,Jeremy Pepper

Review: https://reviewboard.asterisk.org/r/1737/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-06 01:56:10 +00:00
Sean Bright 1d9203eeef Tab to spaces and text change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 11:20:00 +00:00
Sean Bright 2d92c50ce3 Beef up the IAX2 sample configuration a bit and fix some formatting issues.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 16:19:53 +00:00
Jonathan Rose 0b988da21c Adding transport=udp to sample sip.conf - Also changes version of Asterisk 1.8 in UPGRADE
(issue ASTERISK-19352)
Reported by: jamicque
Patches:
	asterisk-19352-transport-warning-message-v1.patch uploaded by Michael L. Young (license 5026)
........

Merged revisions 357490 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 357497 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 22:31:24 +00:00
Kinsey Moore 1fac2fba4b Deprecated macro usage for connected line, redirecting, and CCSS
This commit adds GoSub alternatives to connected line, redirecting, and CCSS
macro hooks so that macro can finally be deprecated.  This also adds
deprecation warnings for those features when used and in documentation.

Review: https://reviewboard.asterisk.org/r/1760/
(closes issue SWP-4256)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 16:50:19 +00:00
Jonathan Rose 299dd5d4fc Adds an option to sip.conf that prevents diversion headers from being added.
send_diversion=no will prevent Diversion headers from being added to SIP
requests. This doesn't prevent Diversion from being added with dialplan
such as with SIPAddHeader.

(closes issue ASTERISK-16862)
Reported by: rsw686
Review: https://reviewboard.asterisk.org/r/1769/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 16:24:17 +00:00
Sean Bright 3816fdde94 Don't allow trunkfreq to be greater than 1000ms.
........

Merged revisions 355793 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 355794 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-17 22:03:56 +00:00
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

Review:  https://reviewboard.asterisk.org/r/1599/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 20:27:16 +00:00
Jason Parker 1cdff5b720 Don't enable sqlite3 CDRs by default in sample configs.
........

Merged revisions 355228 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 355229 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 15:58:15 +00:00
Richard Mudgett a955a4770f Fix reconnecting to pgsql database after connection loss.
There can only be one database connection in res_config_pgsql just like
res_config_sqlite.  If the connection is lost, the connection may not get
reestablished to the same database if the res_pgsql.conf and
extconfig.conf files are inconsistent.

* Made only use the configured database from res_pgsql.conf.

* Fixed potential buffer overwrite of last[] in config_pgsql().

(closes issue ASTERISK-16982)
Reported by: german aracil boned

Review: https://reviewboard.asterisk.org/r/1731/
........

Merged revisions 354953 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354959 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:25:41 +00:00
Terry Wilson e5c51ee44c Add auto_force_rport and auto_comedia NAT options
This patch adds the auto_force_rport and auto_comedia NAT options. It
also converts the nat= setting to a list of comma-separated combinable
options: no, force_rport, comedia, auto_force_rport, and auto_comedia.
nat=yes remains as an undocumented option equal to
"force_rport,comedia". The first instance of 'yes' or 'no' in the list
stops parsing and overrides any previously set options. If an auto_*
option is specified with its non-auto_ counterpart, the auto setting
takes precedence.

This patch builds upon the patch posted to ASTERISK-17860 by JIRA user
pedro-garcia.

(closes issue ASTERISK-17860)
Review: https://reviewboard.asterisk.org/r/1698/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09 18:14:39 +00:00
Russell Bryant 055a19e128 Replace res_ais with a new module, res_corosync.
This patch removes res_ais and introduces a new module, res_corosync.
The OpenAIS project is deprecated and is now just a wrapper around
Corosync.  This module provides the same functionality using the same
core infrastructure, but without the use of the deprecated components.

Technically res_ais could have been used with an AIS implementation other
than OpenAIS, but that is the only one I know of that was ever used.

Review: https://reviewboard.asterisk.org/r/1700/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-05 10:58:37 +00:00
Kinsey Moore 71a8457d53 Support schema selection in cdr_adaptive_odbc
Asterisk now supports using ODBC with databases where a single schema must be
selected.  Previously, INSERTs would fail because they did not take into
account extra fields cause by having multiple schemas.  This also corrects
some SQL resource leaks.

(closes issue ASTERISK-17106)
Patch-by: Alexander Frolkin
Patch-by: Tilgnman Lesher


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-03 16:50:49 +00:00
Mark Michelson 0f4489dc0f Fix TLS port binding behavior as well as reload behavior:
* Removes references to tlsbindport from http.conf.sample and manager.conf.sample
* Properly bind to port specified in tlsbindaddr, using the default port if specified.
* On a reload, properly close socket if the service has been disabled.

A note has been added to UPGRADE.txt to indicate how ports must be set for TLS.

(closes issue ASTERISK-16959)
reported by Olaf Holthausen

(closes issue ASTERISK-19201)
reported by Chris Mylonas

(closes issue ASTERISK-19204)
reported by Chris Mylonas

Review: https://reviewboard.asterisk.org/r/1709
........

Merged revisions 353770 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 353820 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02 18:55:05 +00:00
Richard Mudgett 797d633139 Remove inconsistency in CEL eventtype for user defined events.
The CEL eventtype field for ODBC and PGSQL backends should be USER_DEFINED
instead of the user defined event name supplied by the CELGenUserEvent
application.  If the field is output as a number, the user defined name
does not have a value and is always output as 21 for USER_DEFINED and the
userdeftype field would be required to supply the user defined name.

The following CEL backends (cel_odbc, cel_pgsql, cel_custom, cel_manager,
and cel_sqlite3_custom) can be independently configured to remove this
inconsistency.

* Allows cel_manager, cel_custom, and cel_sqlite3_custom to behave the
same way.

(closes issue ASTERISK-17189)
Reported by: Bryant Zimmerman

Review: https://reviewboard.asterisk.org/r/1669/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 17:42:15 +00:00
Jonathan Rose 973aeabf2d Redocuments sip types peer, user, friend in sip.conf.sample
There was faulty information in the sample config describing user as a synonym for friend
so it has been changed to better elaborate on the differences between the three entity
types.

(closes issue ASTERISK-15537)
Reported by: yarique
........

Merged revisions 352511 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 352512 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 16:42:55 +00:00
Jonathan Rose de09749470 Add an announcement option to music-on-hold - plays sound when put on hold/between songs
This is a feature patch which allows an 'announcement' option to be specified in
musiconhold.conf which should be set to the name of a sound. If a valid sound is
specified for this option, then it will be played on that music on hold class whenever
a channel bound to that class is put on hold as well as when Asterisk is able to detect
that a song has ended before starting the next song (excludes external players).

(closes ASTERISK-18977)
Reported by: Timo Teräs
Patches:
	asterisk-moh-announcement.diff uploaded by Timo Teräs (license 5409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 18:34:47 +00:00
Mark Michelson 778fa4abaf Various parking improvements.
* Adds per-parking lot options comebackcontext and comebackdialtime
* Makes comebacktoorigin settable per parking lot
* Sets a PARKER channel variable when comebacktoorigin is disabled

(closes issue ASTERISK-16643)
Reported by: Mitch Sharp (bluecrow76)
Patches:
asterisk-1.6.2.17.2-park-features-comebackcontext-consolidated-v3.diff by Mitch Sharp (bluecrow76) license 5231
with updates by me.

Review: https://reviewboard.asterisk.org/r/1674
Review: https://reviewboard.asterisk.org/r/963
Reviewed by Richard Mudgett



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 20:47:42 +00:00
Jonathan Rose ee4cf38a27 Adds pjmedia probation concepts to res_rtp_asterisk's learning mode.
In order to better handle RTP sources with strictrtp enabled (which is now default in 10)
using the learning mode to figure out new sources when they change is handled by checking
for a number of consecutive (by sequence number) packets received to an rtp struct
based on a new configurable value called 'probation'. Also, during learning mode instead
of liberally accepting all packets received, we now reject packets until a clear source
has been determined.

Review: https://reviewboard.asterisk.org/r/1663/
........

Merged revisions 351287 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351289 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 17:15:05 +00:00
Richard Mudgett 835067a526 Correct eventtype names in cel_odbc and cel_pgsql sample files
........

Merged revisions 350733 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350734 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 21:52:44 +00:00
Richard Mudgett 523c95e146 Add missing CEL logging fields to various CEL backends.
Multiple revisions 350555,350571

........
  r350555 | rmudgett | 2012-01-13 11:12:51 -0600 (Fri, 13 Jan 2012) | 12 lines
  
  Add missing CEL logging fields to various CEL backends.
  
  * Add missing eventextra to cel_psql.c and cel_odbc.c.
  
  * Add missing PeerAccount and EventExtra to cel_manager.c.
  
  * Add missing userdeftype support for cel_custom.conf.sample and
  cel_sqlite3_custom.conf.sample.
  
  (closes issue ASTERISK-17190)
  Reported by: Bryant Zimmerman
........
  r350571 | rmudgett | 2012-01-13 11:23:57 -0600 (Fri, 13 Jan 2012) | 8 lines
  
  Use compatible names for event extra data for various CEL backends.
  
  * Change eventextra to extra in cel_psql.c and cel_odbc.c.
  
  * Change EventExtra to Extra in cel_manager.c.
  
  (issue ASTERISK-17190)
........

Merged revisions 350555,350571 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350585 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 17:36:44 +00:00
Matthew Jordan b0243fb57c Allow overriding of IMAP server settings on a user by user basis
This patch allows the imapserver, imapport, and imapflags settings to be
overridden for any voicemail user.  It also documents the settings in
the sample voicemail.conf file, and updates the voicemail schema to
allow storage of those columns.

(closes issue ASTERISK-16489)
Reporter: Hubert Mickael
Tested by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1614/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 21:19:52 +00:00
Jonathan Rose 19a4928fee INFO/Record request configurable to use dynamic features
Adds two new options to SIP peers allowing them to specify features (dynamic or builtin)
to use when sending INFO/record requests. Recordonfeature activates whatever feature
is specified when recieving a record: on request while recordofffeature activates
whatever feature is specified when receiving a record: off request. Both of these
features can be disabled by setting the feature to an empty string.

(closes issue ASTERISK-16507)
Reported by: Jon Bright
Review: https://reviewboard.asterisk.org/r/1634/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 20:42:21 +00:00
Jonathan Rose 03596bcb47 chan_sip autocreatepeer=persist option for auto-created peers to survive reload
This patch moves destruction of sip peers to immediately after the general section of
sip.conf is read so that autocreatepeer setting can be read before deletion of peers.
If autocreatepeer=persist at reload, then peers created by the autocreatepeer setting
will be skipped when purging the current SIP peer list.

(closes ASTERISK-16508)
Reported by: Kirill Katsnelson
Patches:
	017797-kkm-persist-autopeers-1.8.patch uploaded by Kirill Katsnelson (license 5845)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 20:19:33 +00:00
Kevin P. Fleming d30a7ba3ce Correct two flaws in sip.conf.sample related to AST-2011-013.
* The sample file listed *two* values for the 'nat' option as being the default.
  Only 'force_rport' is the default.

* The warning about having differing 'nat' settings confusingly referred to both
  peers and users.
........

Merged revisions 348515 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........

Merged revisions 348516 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 348517 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-18 18:29:47 +00:00
Jonathan Rose 1b0741c7db Voicemail with the saycid option will now play a caller's name based on cid if available.
In order to check the availability of the caller's name, app_voicemail will check for an
audio file in <astspooldir>/recordings/callerids/
This change sets a precedent for where to put recordings of names. Currently the idea is
that recordings here could also be used for applications like confbridge and meetme to
find recorded names in this folder from callerid (when another recording isn't available)

(closes issue ASTERISK-18565)
Reporter: Russell Brown
Patches:
	r uploaded by Russel Brown (license 6182)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 22:00:37 +00:00
Jonathan Rose 480d46f92c Add and document PARKEDCALL variable set during timeout
PARKEDCALL variable tracks which parking lot the call was last parked in.  This can be
used afterwards for flow control when returntoorigin is set to off. I went ahead and
documented both this and the existing variable set during timeout (PARKINGSLOT) in
the sample features.conf since there was no prior mention of variables being set during
timeout.

(closes issue ASTERISK-16239)
Reported By: Clod Patry
Patches:
	M17503.diff uploaded by Clod Patry (license 5138)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 21:08:20 +00:00
Jonathan Rose c3f703330b Fix accidental use of tabs instead of spaces from previous features.conf.sample change
........

Merged revisions 348157 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 348158 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 20:37:11 +00:00
Jonathan Rose 2d0491d432 Document PARKINGSLOT variable in features.conf.sample
(issue ASTERISK-16239)
........

Merged revisions 348154 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 348155 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 20:32:40 +00:00
Matthew Jordan 9057aa20b6 Backed out core changes from r346391
During testing, it was discovered that there were a number of side effects
introduced by r346391 and subsequent check-ins related to it (r346429,
r346617, and r346655).  This included the /main/stdtime/ test 'hanging',
as well as the remote console option failing to receive the appropriate output
after a period of time.

I only backed out the changes to main/ and utils/, as this was adequate
to reverse the behavior experienced.

(issue ASTERISK-18974)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12 19:35:08 +00:00
Richard Mudgett e2597678b1 Update sample configs to put incoming calls into context public.
* Add warning about the SIP allowguest option in context public.

(closes issue ASTERISK-14122)
Reported by: Alec Davis
Review: https://reviewboard.asterisk.org/r/719/
........

Merged revisions 347953 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12 17:34:39 +00:00
Terry Wilson 980ab2d018 Add ASTSBINDIR to the list of configurable paths
This patch also makes astdb2sqlite3 and astcanary use the configured
directory instead of relying on $PATH.

(closes issue ASTERISK-18959)
Review: https://reviewboard.asterisk.org/r/1613/
........

Merged revisions 347344 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07 20:15:29 +00:00
Richard Mudgett 83cd844b82 Re-resolve the STUN address if a STUN poll fails for res_stun_monitor.
The STUN socket must remain open between polls or the external address
seen by the STUN server is likely to change.  However, if the STUN request
poll fails then the STUN server address needs to be re-resolved and the
STUN socket needs to be closed and reopened.

* Re-resolve the STUN server address and create a new socket if the STUN
request poll fails.

* Fix ast_stun_request() return value consistency.

* Fix ast_stun_request() to check the received packet for expected message
type and transaction ID.

* Fix ast_stun_request() to read packets until timeout or an associated
response packet is found.  The stun_purge_socket() hack is no longer
required.

* Reduce ast_stun_request() error messages to debug output.

* No longer pass in the destination address to ast_stun_request() if the
socket is already bound or connected to the destination.

(closes issue ASTERISK-18327)
Reported by: Wolfram Joost
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1595/
........

Merged revisions 346700 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 346701 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01 21:19:41 +00:00
Leif Madsen cb21847e03 Update queues.conf.sample documentation.
Update the documentation surrounding the use of MONITOR_EXEC to make it more clear
that it can be used for both Monitor() and MixMonitor() usage.

(closes issue ASTERISK-17413)
Reported by: David Woolley
Patches:
     issue18817_mixmonitor_queues_doc.diff by Michael L. Young (License #5026)
........

Merged revisions 346472 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 346473 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30 19:37:25 +00:00
Tilghman Lesher 77b670c4ab Allow each logging destination and console to have its own notion of the verbosity level.
Review: https://reviewboard.asterisk.org/r/1599


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 18:43:16 +00:00
Terry Wilson 32d0faac9c Default to nat=yes; warn when nat in general and peer differ
It is possible to enumerate SIP usernames when the general and user/peer
nat settings differ in whether to respond to the port a request is sent
from or the port listed for responses in the Via header. In 1.4 and 1.6.2,
this would mean if one setting was nat=yes or nat=route and the other was
either nat=no or nat=never. In 1.8 and 10, this would mean when one was
nat=force_rport and the other was nat=no.

In order to address this problem, it was decided to switch the default
behavior to nat=yes/force_rport as it is the most commonly used option
and to strongly discourage setting nat per-peer/user when at all possible.

For more discussion of the issue, please see:
  http://lists.digium.com/pipermail/asterisk-dev/2011-November/052191.html

(closes issue ASTERISK-18862)
Review: https://reviewboard.asterisk.org/r/1591/
........

Merged revisions 345776 from http://svn.asterisk.org/svn/asterisk/branches/1.4
........

Merged revisions 345800 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........

Merged revisions 345828 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 345830 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-21 21:09:59 +00:00
Matthew Jordan 279873e8eb Add admin toggle mute all and participant count menu options to app_confbridge
This patch adds two new menu features to app_confbridge, admin_toggle_menu_
participants and participant_count.  The admin action will globally mute /
unmute all non-admin participants on a converence, while the participant
count simply exposes the existing participant count function to the
conference bridge menu.

This also adds configuration options to change the sound played when the
conference is globally muted / unmuted, as well as the necessary config
hooks to place these functions in the DTMF menus.

(closes issue ASTERISK-18204)
Reported by: Kevin Reeves
Tested by: Matt Jordan
Patches:
  app_confbridge.c.patch.txt, conf_config_parser.c.patch.txt, 
  confbridge.h.patch.txt uploaded by Kevin Reeves (license 6281)

Review: https://reviewboard.asterisk.org/r/1518/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-17 18:09:13 +00:00
Richard Mudgett 113612b9d6 Restore SIP DTMF overlap dialing method.
The recent fix for ASTERISK-17288 to get RFC3578 SIP overlap support
working correctly removed a long standing ability to do overlap dialing
using DTMF in the early media phase of a call.

See ASTERISK-18702 it has a very good description of the issue.

I started with Pavel Troller's chan_sip.diff patch on issue
ASTERISK-18702.

* Added 'dtmf' enum value to sip.conf allowoverlap config option.  The new
option value causes the Incomplte application to not send anything with
chan_sip so the caller can supply more digits via DTMF.

* Renames SIP_GET_DEST_PICKUP_EXTEN_FOUND to SIP_GET_DEST_EXTEN_MATCHMORE
since that is what it really means.

* Fixed get_destination() inconsistency with the pickup extension
matching.

* Fixed initialization of PAGE3 of global_flags in reload_config().

(closes issue ASTERISK-18702)
Reported by: Pavel Troller

Review: https://reviewboard.asterisk.org/r/1517/

Review: https://reviewboard.asterisk.org/r/1582/
........

Merged revisions 345273 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 345275 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14 22:05:39 +00:00
Leif Madsen 02f886b5a2 Allow built in variables to be used with dynamic weights.
You can now use the built in variables , , and 
within a dynamic weight. For example, this could be useful when you want
to pass requested lookup number to the SHELL() function which could be
used to execute a script to dynamically set the weight of the result.

(Closes issue ASTERISK-13657)
Reported by: Joel Vandal
Tested by: Leif Madsen, Russell Bryant
Patches:
     asterisk-1.6-dundi-varhead.patch uploaded by Joel Vandal (License #5374)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07 21:58:14 +00:00
Leif Madsen 4b5702e52d Update documentation for leastrecent strategy.
In queues.conf.sample the leastrecent strategy was incorrectly described. Now updated
to reflect how the strategy actually checks peers.

(closes issue ASTERISK-17854)
Reported by: Sebastian Denz
Patches:
     queues.conf-doc_issue.patch (License #6139)
........

Merged revisions 343047 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 343048 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 18:11:12 +00:00
Walter Doekes b41b49ea0e Several fixes to the chan_sip dynamic realtime peer/user lookup
There were several problems with the dynamic realtime peer/user lookup
code. The lookup logic had become rather hard to read due to lots of
incremental changes to the realtime_peer function. And, during the
addition of the sipregs functionality, several possibilities for memory
leaks had been introduced. The insecure=port matching has always been
broken for anyone using the sipregs family. And, related, the broken
implementation forced those using sipregs to *still* have an ipaddr
column on their sippeers table.

Thanks Terry Wilson for comprehensive testing and finding and fixing
unexpected behaviour from the multientry realtime call which caused
the realtime_peer to have a completely unused code path.

This changeset fixes the leaks, the lookup inconsistenties and that
you won't need an ipaddr column on your sippeers table anymore (when
you're using sipregs). Beware that when you're using sipregs, peers
with insecure=port will now start matching!

(closes issue ASTERISK-17792)
(closes issue ASTERISK-18356)
Reported by: marcelloceschia, Walter Doekes
Reviewed by: Terry Wilson

Review: https://reviewboard.asterisk.org/r/1395
........

Merged revisions 342927 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 342929 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 21:02:56 +00:00
Walter Doekes 25ee5f83b5 Cleanup references to sipusers and sipfriends dynamic realtime families
Somewhere between 1.4 and 1.8 the sipusers family has become completely
unused. Before that, the sipfriends family had been obsoleted in favor
of separate sipusers and sippeers families. Apparently, they have been
merged back again into a single family which is now called "sippeers".

Reviewed by: irroot, oej, pabelanger

Review: https://reviewboard.asterisk.org/r/1523
........

Merged revisions 342869 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 342870 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 19:53:26 +00:00
Gregory Nietsky e2e6e511af Merged revisions 341599 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r341599 | irroot | 2011-10-20 20:20:08 +0200 (Thu, 20 Oct 2011) | 8 lines
  
  add documentation for check_state_unknown in configs/queues.conf.sample
  
  app_queue allows calls to members in a "Unknown" state to be treated as available
  setting check_state_unknown = yes will cause app_queue to query the channel driver
  to better determine the state this only applies to queues with ringinuse or ignorebusy
  set appropriately. 
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 18:27:29 +00:00
Jonathan Rose bd30e7abc4 Merged revisions 338719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r338719 | jrose | 2011-09-30 13:55:27 -0500 (Fri, 30 Sep 2011) | 9 lines
  
  Merged revisions 338718 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r338718 | jrose | 2011-09-30 13:54:30 -0500 (Fri, 30 Sep 2011) | 1 line
    
    Adds documentation for QueueMemberStatus event generation
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-30 18:59:01 +00:00
Terry Wilson 0ab04b53b5 Add autopausebusy and autopauseunavail queue options
Make it possible to autopause on a busy or unavailable response from
a device.

(closes issue ASTERISK-16112)
Reported by: jlpedrosa
Patches:
	autopausebusy.txt by twilson

Review: https://reviewboard.asterisk.org/r/1399/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-28 16:59:11 +00:00
Russell Bryant e734bccdcd Merged revisions 337775 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r337775 | russell | 2011-09-22 19:45:35 -0500 (Thu, 22 Sep 2011) | 18 lines
  
  Merged revisions 337774 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r337774 | russell | 2011-09-22 19:44:19 -0500 (Thu, 22 Sep 2011) | 11 lines
    
    Comment out entries in sample res_pktccops.conf.
    
    With these options enabled, they can cause Asterisk to freak out by
    SYN flooding a network and eating the CPU.  Obviously it would be good to
    fix the code so that this can't happen, but we can at least change the default
    configuration so it doesn't happen.
    
    This was reported downstream to the Fedora issue tracker:
    
        https://bugzilla.redhat.com/show_bug.cgi?id=658431
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-23 00:47:18 +00:00
Jonathan Rose 5982bdcb7c Merged revisions 337595,337597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r337595 | jrose | 2011-09-22 10:35:50 -0500 (Thu, 22 Sep 2011) | 12 lines
  
  Generate Security events in chan_sip using new Security Events Framework
  
  Security Events Framework was added in 1.8 and support was added for AMI to generate
  events at that time. This patch adds support for chan_sip to generate security events.
  
  (closes issue ASTERISK-18264)
  Reported by: Michael L. Young
  Patches:
       security_events_chan_sip_v4.patch (license #5026) by Michael L. Young
  Review: https://reviewboard.asterisk.org/r/1362/
........
  r337597 | jrose | 2011-09-22 10:47:05 -0500 (Thu, 22 Sep 2011) | 10 lines
  
  Forgot to svn add new files to r337595
  
  Part of Generating security events for chan_sip
  
  (issue ASTERISK-18264)
  Reported by: Michael L. Young
  Patches:
      security_events_chan_sip_v4.patch (License #5026) by Michael L. Young
  Reviewboard: https://reviewboard.asterisk.org/r/1362/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-22 16:35:20 +00:00
Gregory Nietsky 2bb0d456eb Merged revisions 337263 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r337263 | irroot | 2011-09-21 13:15:48 +0200 (Wed, 21 Sep 2011) | 1 line
  
  Whitespace fixup from SRTP patch
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-21 11:21:49 +00:00
Olle Johansson 7b08b2cf53 Merged revisions 337219 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r337219 | oej | 2011-09-21 11:32:50 +0200 (Ons, 21 Sep 2011) | 13 lines
  
  Make ast_pbx_run() not default to s@default if extension is not found
  
  Review: https://reviewboard.asterisk.org/r/1446/
  
  This is a bug - or architecture mistake - that has been in Asterisk for a 
  very long time. It was exposed by the AMI originate action and possibly
  some other applications. Most channel drivers checks if an extension
  exists BEFORE starting a pbx on an inbound call, so most calls will
  not depend on this issue.
  
  Thanks everyone involved in the review and on IRC and the mailing list
  for a quick review and all the feedback.

  (closes issue ASTERISK-18578)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-21 09:39:13 +00:00
Olle Johansson 2ae7ae00c8 Merged revisions 337178 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r337178 | oej | 2011-09-21 10:51:41 +0200 (Ons, 21 Sep 2011) | 14 lines
  
  Change strictrtp option to default to yes in the RTP module
  
  Suggested by Kapejod on Facebook
  
  Review: https://reviewboard.asterisk.org/r/1448/
  (closes issue ASTERISK-18587)
  
  Thanks for quick feedback to kpfleming and Tilghman
  --Denna och nedanstående rader kommer inte med i loggmeddelandet--
  
  M    CHANGES
  M    configs/rtp.conf.sample
  M    res/res_rtp_asterisk.c
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-21 09:06:22 +00:00
Gregory Nietsky 8493c46308 Merged revisions 336936 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r336936 | irroot | 2011-09-20 18:51:59 +0200 (Tue, 20 Sep 2011) | 14 lines
  
  
  Allow Setting Auth Tag Bit length Based on invite or config option
  
  Update the SIP SRTP API to allow use of 32 or 80 bit taglen.
  Curently only 80 bit is supported.
  
  The outgoing invite will use the taglen of the incoming invite preventing
  one-way audio.
  
  (Closes issue ASTERISK-17895)
  
  Review: https://reviewboard.asterisk.org/r/1173/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20 16:56:11 +00:00
Olle Johansson 404151ad65 New sip.conf option for setting default tonezone for channel or individual devices
Review: https://reviewboard.asterisk.org/r/1429/

(closes issue ASTERISK-18497)

Thanks to russellb for peer review.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12 13:57:57 +00:00
Terry Wilson 1fed068bae Add SQLite 3 realtime support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-11 17:09:36 +00:00
Tilghman Lesher f03bccdb4d Implement the '!' negation element to negate codecs directly in the allow keyword.
This permits the list of codecs to be specified in one configuration line,
instead of two or more, generally with the aim of either allowing all codecs
with the exception of a few or disallowing most but permitting a few.

Review: https://reviewboard.asterisk.org/r/1411/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 00:54:36 +00:00
Paul Belanger 39ac2e639f Merged revisions 334514 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r334514 | pabelanger | 2011-09-06 11:47:59 -0400 (Tue, 06 Sep 2011) | 6 lines
  
  authdebug is now disabled by default
  
  To enable this functionaility again set authdebug = yes in iax.conf
  
  Review: https://reviewboard.asterisk.org/r/1414/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-06 16:08:10 +00:00
Matthew Jordan 3b53a9cdb3 Merged revisions 332817 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r332817 | mjordan | 2011-08-22 13:15:51 -0500 (Mon, 22 Aug 2011) | 4 lines
  
  Review: https://reviewboard.asterisk.org/r/1364/
  
  This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined.  It also adds initial usage of this event to app_voicemail.  The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 19:19:44 +00:00
Jonathan Rose 901e275c4c Add option for logging congested calls as CONGESTION instead of NO_ANSWER in CDR
This patch adds a CDR option to cdr.conf that will allow CDR files to log calls ending
with congestion in a way that is unique from other unanswered calls.

(closes issue ASTERISK-14842)
Reported by: Alec Davis
Patches:
	cdr_congestion.diff.txt (License #5546) patch uploaded by Alec Davis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 17:05:14 +00:00
Richard Mudgett 265102faf8 Merged revisions 332265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332265 | rmudgett | 2011-08-17 11:01:29 -0500 (Wed, 17 Aug 2011) | 33 lines
  
  Merged revisions 332264 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332264 | rmudgett | 2011-08-17 10:51:08 -0500 (Wed, 17 Aug 2011) | 26 lines
    
    Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.
    
    France Telecom brings layer 2 and layer 1 down on BRI lines when the line
    is idle.  When layer 1 goes down Asterisk cannot make outgoing calls and
    the HA8 and HB8 cards also get IRQ misses.
    
    The inability to make outgoing calls is because the line is in red alarm
    and Asterisk will not make calls over a line it considers unavailable.
    The IRQ misses for the HA8 and HB8 card are because the hardware is
    switching clock sources from the line which just brought layer 1 down to
    internal timing.
    
    There is a DAHDI option for the B410P card to not tell Asterisk that layer
    1 went down so Asterisk will allow outgoing calls: "modprobe wcb4xxp
    teignored=1".  There is a similar DAHDI option for the HA8 and HB8 cards:
    "modprobe wctdm24xxp bri_teignored=1".  Unfortunately that will not clear
    up the IRQ misses when the telco brings layer 1 down.
    
    * Add layer 2 persistence option to customize the layer 2 behavior on BRI
    PTMP lines.  The new option has three settings: 1) Use libpri default
    layer 2 setting.  2) Keep layer 2 up.  Bring layer 2 back up when the peer
    brings it down.  3) Leave layer 2 down when the peer brings it down.
    Layer 2 will be brought up as needed for outgoing calls.
    
    JIRA AST-598
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 16:18:27 +00:00