]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
9 years agores_pjsip.c: Add check that timer actually got scheduled. 27/3027/1
Richard Mudgett [Wed, 6 Jan 2016 01:08:24 +0000 (19:08 -0600)] 
res_pjsip.c: Add check that timer actually got scheduled.

Change-Id: Iabaa2e5dccf0762c258101ea0eb1487cf6959ad1

9 years agoMerge "res_pjsip_session.c: Reorganize ast_sip_session_terminate()." into 13
zuul [Tue, 14 Jun 2016 18:36:44 +0000 (13:36 -0500)] 
Merge "res_pjsip_session.c: Reorganize ast_sip_session_terminate()." into 13

9 years agores_rtp_multicast.c: Fix warning message typo. 20/3020/1
Richard Mudgett [Mon, 13 Jun 2016 18:33:53 +0000 (13:33 -0500)] 
res_rtp_multicast.c: Fix warning message typo.

Change-Id: Ic9928208b9957e09866abe3d9649030942ec52b3

9 years agoMerge "chan_rtp: Backport changes from master." into 13
Joshua Colp [Mon, 13 Jun 2016 16:59:31 +0000 (11:59 -0500)] 
Merge "chan_rtp: Backport changes from master." into 13

9 years agoMerge "chan_rtp.c: Copy file from chan_multicast_rtp.c" into 13
Joshua Colp [Mon, 13 Jun 2016 16:59:19 +0000 (11:59 -0500)] 
Merge "chan_rtp.c: Copy file from chan_multicast_rtp.c" into 13

9 years agores_pjsip_session.c: Reorganize ast_sip_session_terminate(). 16/3016/1
Richard Mudgett [Fri, 12 Feb 2016 00:15:31 +0000 (18:15 -0600)] 
res_pjsip_session.c: Reorganize ast_sip_session_terminate().

Change-Id: I68a2128bcba4830985d2d441e70dfd1ac5bd712b

9 years agochan_rtp: Backport changes from master. 13/3013/1
Richard Mudgett [Fri, 10 Jun 2016 17:35:33 +0000 (12:35 -0500)] 
chan_rtp: Backport changes from master.

* Deprecate chan_multicast_rtp.

Change-Id: Ib5a45e58c75ee8abd0b4f9575379b5321feb853e

9 years agochan_rtp.c: Copy file from chan_multicast_rtp.c 12/3012/1
Richard Mudgett [Fri, 10 Jun 2016 21:13:04 +0000 (16:13 -0500)] 
chan_rtp.c: Copy file from chan_multicast_rtp.c

Change-Id: I1119b53f2152ab1cbec74b5be7ea44844dbda8ef

9 years agocore: Not the configured but granted number of possible file descriptors. 70/2970/3
Alexander Traud [Wed, 8 Jun 2016 11:15:15 +0000 (13:15 +0200)] 
core: Not the configured but granted number of possible file descriptors.

With CLI "core show settings", simply the parameter maxfiles of the file
asterisk.conf was shown. If that parameter was not set, nothing was displayed
although the environment might have set a default number itself. Or if maxfiles
were not granted (completely), still maxfiles was shown. Now, the maximum number
of possible file descriptors in the environment is shown.

ASTERISK-26097

Change-Id: I2df5c58863b5007b34b77adbe28b885dfcdf7e0b

9 years agoMerge "cel: Ensure only one dial status per channel exists." into 13
Joshua Colp [Fri, 10 Jun 2016 10:09:18 +0000 (05:09 -0500)] 
Merge "cel: Ensure only one dial status per channel exists." into 13

9 years agoMerge "res_pjsip_registrar.c: Eliminate rx REGISTER request race condition." into 13
Joshua Colp [Fri, 10 Jun 2016 01:25:22 +0000 (20:25 -0500)] 
Merge "res_pjsip_registrar.c: Eliminate rx REGISTER request race condition." into 13

9 years agoMerge "stasis: Add setting subscription congestion levels." into 13
Joshua Colp [Fri, 10 Jun 2016 01:25:15 +0000 (20:25 -0500)] 
Merge "stasis: Add setting subscription congestion levels." into 13

9 years agoMerge "sorcery: Add setting object type congestion levels." into 13
Joshua Colp [Fri, 10 Jun 2016 01:25:09 +0000 (20:25 -0500)] 
Merge "sorcery: Add setting object type congestion levels." into 13

9 years agoMerge "taskprocessors: Implement high/low water mark alerts." into 13
zuul [Fri, 10 Jun 2016 01:12:30 +0000 (20:12 -0500)] 
Merge "taskprocessors: Implement high/low water mark alerts." into 13

9 years agoMerge "res_pjsip_session: Use distributor serializer for incoming calls." into 13
zuul [Fri, 10 Jun 2016 01:12:28 +0000 (20:12 -0500)] 
Merge "res_pjsip_session: Use distributor serializer for incoming calls." into 13

9 years agoMerge "res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer."...
zuul [Fri, 10 Jun 2016 00:41:20 +0000 (19:41 -0500)] 
Merge "res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer." into 13

9 years agoMerge "res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions...
zuul [Fri, 10 Jun 2016 00:41:13 +0000 (19:41 -0500)] 
Merge "res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions." into 13

9 years agoMerge "pjsip_distributor.c: Consistently pick a serializer for messages." into 13
zuul [Thu, 9 Jun 2016 23:48:04 +0000 (18:48 -0500)] 
Merge "pjsip_distributor.c: Consistently pick a serializer for messages." into 13

9 years agoMerge "pjsip_distributor.c: Ignore messages until fully booted." into 13
zuul [Thu, 9 Jun 2016 23:47:07 +0000 (18:47 -0500)] 
Merge "pjsip_distributor.c: Ignore messages until fully booted." into 13

9 years agocel: Ensure only one dial status per channel exists. 72/2972/4
Joshua Colp [Tue, 7 Jun 2016 23:45:37 +0000 (20:45 -0300)] 
cel: Ensure only one dial status per channel exists.

CEL wrongly assumed that a channel would only have a single dial
event on it. This is incorrect. Particularly in a queue each
call attempt to a member will result in a dial event, adding
a new dial status in CEL without removing the old one. This
would cause the container to grow with only one dial status
being removed when the channel went away. The other dial status
entries would remain leaking memory.

This change fixes the memory leak by ensuring that only one dial
status will only ever exist for each channel.

The behavior during the scenario where multiple events are received
has also been improved. For failure cases the first failure will
be the dial status. If an answer dial status is received, though,
it will take priority and the dial status for the channel will be
answer.

Memory usage has also been decreased by storing the minimal
amount of information and the code has been cleaned up slightly.

ASTERISK-25262 #close

Change-Id: I5944eb923db17b6a0faa7317ff6abc9307c009fe

9 years agoMerge "chan_pjsip: Lock channel when checking for RTP changes." into 13
zuul [Thu, 9 Jun 2016 18:54:01 +0000 (13:54 -0500)] 
Merge "chan_pjsip: Lock channel when checking for RTP changes." into 13

9 years agochan_pjsip: Lock channel when checking for RTP changes. 03/3003/1
Mark Michelson [Thu, 9 Jun 2016 15:37:53 +0000 (10:37 -0500)] 
chan_pjsip: Lock channel when checking for RTP changes.

bridge_native_rtp can call into an RTP-capable channel driver in order
for the driver to update information about who the channel is
communicating with. For SIP channel drivers, this means deactivating
RTCP and sending a reinvite so that the endpoints can communicate
directly.

bridge_native_rtp does the right thing and has the channel locked when
calling into the channel driver. chan_pjsip can't alter session
properties in this thread, though. chan_pjsip queues a task on the
session serializer in order to update properties there.

The problem is that this queued task was not locking the channel. This
meant that the queued task could attempt to deactivate RTCP at the same
time that the channel thread was attempting to process an incoming RTCP
packet. This could lead to a crash.

This patch fixes the issue by locking the channel in the queued task
when altering RTP properties.

ASTERISK-26092 #close
Reported by Niklas Larsson

Change-Id: I3464e226a3c41f6b915f97891e07fa1599e2a159

9 years agobuild: Fix ast_sockaddr initialization to be more portable 79/2979/2
George Joseph [Thu, 9 Jun 2016 14:20:33 +0000 (08:20 -0600)] 
build:  Fix ast_sockaddr initialization to be more portable

A change to glibc 2.22 changed the order of the sockadddr_storage
members which caused the places where we do an initialization of
ast_sockaddr with '{ { 0, 0, } }' to fail compilation.  Those
initializers (which we shouldn't have been using anyway) have been
replaced with memsets.

Change-Id: Idd1b3b320903d8771bfe221f0b015685de628fa4

9 years agoMerge "astfd: Not maximum size of a single file but maximum file descriptors." into 13
zuul [Thu, 9 Jun 2016 13:21:35 +0000 (08:21 -0500)] 
Merge "astfd: Not maximum size of a single file but maximum file descriptors." into 13

9 years agoMerge "BuildSystem: Avoid 'ar cru' and use 'ar cr' instead." into 13
zuul [Thu, 9 Jun 2016 03:50:39 +0000 (22:50 -0500)] 
Merge "BuildSystem: Avoid 'ar cru' and use 'ar cr' instead." into 13

9 years agoMerge "res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded" into 13
Joshua Colp [Thu, 9 Jun 2016 00:03:05 +0000 (19:03 -0500)] 
Merge "res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded" into 13

9 years agoMerge "Fix #include poll.h and sys/cdefs.h" into 13
Joshua Colp [Wed, 8 Jun 2016 21:18:34 +0000 (16:18 -0500)] 
Merge "Fix #include poll.h and sys/cdefs.h" into 13

9 years agores_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded 75/2975/1
Matt Jordan [Wed, 8 Jun 2016 17:26:29 +0000 (12:26 -0500)] 
res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded

A crash can occur in res_hep_pjsip or res_hep_rtcp if res_hep has not
loaded and does not have a configuration file. Previously when this
occurred, checks were put in to see if the configuration was loaded
successfully. While this is a good idea - and has been added to the
offending function in res_hep - the reality is res_hep_pjsip and
res_hep_rtcp have no business running if res_hep isn't also running.

As such, this patch also adds a function to res_hep that returns whether
or not it successfully loaded. Oddly enough, ast_module_check returns
"everything is peachy" even if a module declined its load - so it cannot
be solely relied on. res_hep_pjsip and res_hep_rtcp now also check this
function to see if they should continue to load; if it fails, they
decline their load as well.

ASTERISK-26096 #close

Change-Id: I007e535fcc2e51c2ca48534f48c5fc2ac38935ea

9 years agoastfd: Not maximum size of a single file but maximum file descriptors. 66/2966/1
Alexander Traud [Wed, 8 Jun 2016 10:58:48 +0000 (12:58 +0200)] 
astfd: Not maximum size of a single file but maximum file descriptors.

With menuselect "DEBUG_FD_LEAKS" and CLI "core show fd", the maximum size of a
single file was shown. Now, the maximum number of possible file descriptors is
shown.

ASTERISK-26097

Change-Id: Icf98d145774b38cac144ca76d19eaef42ce659a3

9 years agoMerge "ari/resource_channels: Add 'formats' to channel create/originate" into 13
zuul [Wed, 8 Jun 2016 05:11:29 +0000 (00:11 -0500)] 
Merge "ari/resource_channels:  Add 'formats' to channel create/originate" into 13

9 years agoFix #include poll.h and sys/cdefs.h 63/2963/1
Timo Teräs [Thu, 2 Jun 2016 19:53:39 +0000 (22:53 +0300)] 
Fix #include poll.h and sys/cdefs.h

POSIX defines poll.h, sys/poll.h should not be used at is c-library
internal header which may or may not exist. Notable in musl it
generates warning of being incorrect. And add explict include of
sys/cdefs.h where needed.

Change-Id: I142930df53fe7585a06b854b6faddc5301e024be

9 years agores_pjsip_registrar.c: Eliminate rx REGISTER request race condition. 55/2955/3
Richard Mudgett [Sat, 4 Jun 2016 03:44:46 +0000 (22:44 -0500)] 
res_pjsip_registrar.c: Eliminate rx REGISTER request race condition.

This patch fixes a race condition processing received REGISTER requests
and their retransmissions caused by REGISTER requests being processed by
two threads.  The "sip_transaction Unable to register REGISTER transaction
(key exists)" message is a notable symptom of this issue.

This issue was more likely to happen before the pjsip/distributor
serializers were created.  Instead of steps one and two below placing the
REGISTER messages into the same pjsip/distributor they were placed in
random pjsip/default serializers.

1) REGISTER requests come in and get placed on the pjsip/distributor
serializer.

2) Before the first request is processed a retransmission comes in and is
placed on the same pjsip/distributor serializer.

3) The first request goes up the pjsip stack and is then shunted off to
the pjsip/aor/<aor> serializer.

4) Before the first request is completed processing in the pjsip/aor/<aor>
serializer, the second request goes up the pjsip stack and is also shunted
off to the pjsip/aor/<aor> serializer.

5) The first request completes processing and sends out its response.

6) The second request completes processing and tries to send out its
response but pjlib complains that the REGISTER transaction key already
exists.

7) Sadness ensues.

* The race is eliminated by removing the pjsip/aor/<aor> serializer and
continuing the processing in the pjsip/distributor serializer.  Now any
retransmissions queued in the pjsip/distributor serializer will be
processed after the first message is completely processed.

ASTERISK-26088 #close
Reported by:  Richard Mudgett

Change-Id: I842d714346088bf717ea27437f1dd85bff0bab5a

9 years agostasis: Add setting subscription congestion levels. 54/2954/3
Richard Mudgett [Fri, 3 Jun 2016 16:35:49 +0000 (11:35 -0500)] 
stasis: Add setting subscription congestion levels.

Stasis subscriptions and message routers create taskprocessors to process
the event messages.  API calls are needed to be able to set the congestion
levels of these taskprocessors for selected subscriptions and message
routers.

* Updated CDR, CEL, and manager's stasis subscription congestion levels
based upon stress testing.  Increased the congestion levels to reduce the
potential for bursty call setup/teardown activity from triggering the
taskprocessor overload alert.  CDRs in particular need an extra high
congestion level because they can take awhile to process the stasis
messages.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: Id0a716394b4eee746dd158acc63d703902450244

9 years agosorcery: Add setting object type congestion levels. 53/2953/3
Richard Mudgett [Thu, 2 Jun 2016 23:19:13 +0000 (18:19 -0500)] 
sorcery: Add setting object type congestion levels.

Sorcery creates taskprocessors for object types to process object observer
callbacks.  An API call is needed to be able to set the congestion levels
of these taskprocessors for selected object types.

* Updated PJSIP's contact and contact_status sorcery object type observer
default congestion levels based upon stress testing.  Increased the
congestion levels to reduce the potential for bursty register/unregister
and subscribe/unsubscribe activity from triggering the taskprocessor
overload alert.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I4542e83b556f0714009bfeff89505c801f1218c6

9 years agotaskprocessors: Implement high/low water mark alerts. 52/2952/3
Richard Mudgett [Thu, 2 Jun 2016 21:08:19 +0000 (16:08 -0500)] 
taskprocessors: Implement high/low water mark alerts.

When taskprocessors get backed up, there is a good chance that we are
being overloaded and need to defer adding new work to the system.

* Implemented a high/low water alert mechanism for modules to check if the
system is being overloaded and take appropriate action.  When a
taskprocessor is created it has default congestion levels set.  A
taskprocessor can later have those congestion levels altered for specific
needs if stress testing shows that the taskprocessor is a symptom of
overloading or needs to handle bursty activity without triggering an
overload alert.

* Add CLI "core show taskprocessor" low/high water columns.

* Fixed __allocate_taskprocessor() to not use RAII_VAR().  RAII_VAR() was
never a good thing to use when creating a taskprocessor because of the
nature of how its references needed to be cleaned up on a partial
creation.

* Made res_pjsip's distributor check if the taskprocessor overload alert
is active before placing a message representing brand new work onto a
distributor serializer.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I182f1be603529cd665958661c4c05ff9901825fa

9 years agores_pjsip_session: Use distributor serializer for incoming calls. 51/2951/2
Richard Mudgett [Fri, 27 May 2016 22:31:52 +0000 (17:31 -0500)] 
res_pjsip_session: Use distributor serializer for incoming calls.

We must continue using the serializer that the original INVITE came in on
for the dialog.  There may be retransmissions already enqueued in the
original serializer that can result in reentrancy and message sequencing
problems.

Outgoing call legs create the pjsip/outsess/<endpoint> serializers for
their dialogs.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I24d7948749c582b8045d5389ba3f6588508adbbc

9 years agores_pjsip_pubsub.c: Recreate subscriptions using distributor serializer. 50/2950/2
Richard Mudgett [Fri, 27 May 2016 21:28:39 +0000 (16:28 -0500)] 
res_pjsip_pubsub.c: Recreate subscriptions using distributor serializer.

* Resolves potential reentrancy problems if system restarted in the middle
of subscription message transactions.

* Fixes memory leak recreating persistent subscriptions when the
subscription resource tree could not be created.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I71e34d7ae8ed35a694f1030e820e2548c48697be

9 years agores_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions. 49/2949/2
Richard Mudgett [Fri, 27 May 2016 17:50:14 +0000 (12:50 -0500)] 
res_pjsip_pubsub.c: Use distributor serializer for incoming subscriptions.

We must continue using the serializer that the original SUBSCRIBE came in
on for the dialog.  There may be retransmissions already enqueued in the
original serializer that can result in reentrancy and message sequencing
problems.  The "sip_transaction Unable to register SUBSCRIBE transaction
(key exists)" message is a notable symptom of this issue.

Outgoing subscriptions still create the pjsip/pubsub/<endpoint>
serializers for their dialogs.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I18b00bb74a56747b2c8c29543a82440b110bf0b0

9 years agopjsip_distributor.c: Consistently pick a serializer for messages. 48/2948/2
Richard Mudgett [Thu, 26 May 2016 22:35:04 +0000 (17:35 -0500)] 
pjsip_distributor.c: Consistently pick a serializer for messages.

Incoming messages that are not part of a dialog or a recognized response
to one of our requests need to be sent to a consistent serializer.  Under
load we may be queueing retransmissions before we can process the original
message.  We don't need to throw these messages onto random serializers
and cause reentrancy and message sequencing problems.

* Created a pool of pjsip/distributor serializers that get picked by
hashing the call-id and remote tag strings of the received messages.

* Made ast_sip_destroy_distributor() destroy items in the reverse order of
creation.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I2ce769389fc060d9f379977f559026fbcb632407

9 years agopjsip_distributor.c: Ignore messages until fully booted. 47/2947/2
Richard Mudgett [Thu, 2 Jun 2016 17:51:31 +0000 (12:51 -0500)] 
pjsip_distributor.c: Ignore messages until fully booted.

We should not be processing any incoming messages until we are fully
booted.  We may not have dialplan or other needed configuration loaded
yet.

ASTERISK-26089 #close
Reported by: Scott Griepentrog

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I584aefb4f34b885a8927e1f13a2c64babd606264

9 years agoMerge "res_odbc: Implement a connection pool." into 13
zuul [Tue, 7 Jun 2016 17:09:19 +0000 (12:09 -0500)] 
Merge "res_odbc: Implement a connection pool." into 13

9 years agores_odbc: Implement a connection pool. 43/2943/3
Joshua Colp [Thu, 2 Jun 2016 17:04:45 +0000 (14:04 -0300)] 
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

9 years agores_srtp: Instead of libSRTP use OpenSSL as random source. 61/2961/1
Alexander Traud [Tue, 7 Jun 2016 10:45:34 +0000 (12:45 +0200)] 
res_srtp: Instead of libSRTP use OpenSSL as random source.

Since libSRTP 1.5, its Random Number Generator (RNG) is not maintained anymore.
Therefore, the symbol RAND_bytes is used instead of crypto_get_random.

ASTERISK-24436 #close

Change-Id: Iea0bae4d4e3c9aa0926ea442b6484b5159789d96

9 years agoBuildSystem: Avoid 'ar cru' and use 'ar cr' instead. 58/2958/1
Alexander Traud [Tue, 7 Jun 2016 07:16:02 +0000 (09:16 +0200)] 
BuildSystem: Avoid 'ar cru' and use 'ar cr' instead.

In several internal library projects, the files are archived with the help of
'ar cr'. Only the projects editline and the Objective Open H.323 stack
implementation in C (ooh323c) use 'ar cru' instead. Recently, some platforms
changed the default parameters of AR which creates "/usr/bin/ar: `u' modifier
ignored since `D' is the default (see `U')". For consistency and to avoid this
message all projects use 'ar cr' now.

ASTERISK-26091 #close

Change-Id: I710a9b1c01c1b5a1931a646098c044c8161ead40

9 years agoMerge "core/dial: New channel variable FORWARDERNAME" into 13
zuul [Mon, 6 Jun 2016 12:27:30 +0000 (07:27 -0500)] 
Merge "core/dial: New channel variable FORWARDERNAME" into 13

9 years agoari/resource_channels: Add 'formats' to channel create/originate 17/2917/3
George Joseph [Fri, 27 May 2016 19:49:42 +0000 (13:49 -0600)] 
ari/resource_channels:  Add 'formats' to channel create/originate

If you create a local channel and don't specify an originator channel
to take capabilities from, we automatically add all audio formats to
the new channel's capabilities. When we try to make the channel
compatible with another, the "best format" functions pick the best
format available, which in this case will be slin192.  While this is
great for preserving quality, it's the worst for performance and
overkill for the vast majority of applications.

In the absense of any other information, adding all formats is the
correct thing to do and it's not always possible to supply an
originator so a new parameter 'formats' has been added to the channel
create/originate functions. It's just a comma separated list of formats
to make availalble for the channel. Example: "ulaw,slin,slin16".
'formats' and 'originator' are mutually exclusive.

To facilitate determination of format names, the format name has been
added to "core show codecs".

ASTERISK-26070 #close

Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b

9 years agoalembic: Fix migration. 30/2930/1
Joshua Colp [Thu, 2 Jun 2016 09:59:06 +0000 (06:59 -0300)] 
alembic: Fix migration.

The 81b01a191a46_pjsip_add_contact_reg_server.py script was attempting
to use UniqueConstraint and failing. It was not imported and after
importing it also continued to fail.

I've changed the script to use the explicit name of the constraint
instead.

Change-Id: I2438b0be90b7ce583b47dd27983c0c1a02cea5b9

9 years agoMerge "pjsip_distributor.c: Use correct rdata info access method (Part 2)." into 13
Joshua Colp [Thu, 2 Jun 2016 00:40:06 +0000 (19:40 -0500)] 
Merge "pjsip_distributor.c: Use correct rdata info access method (Part 2)." into 13

9 years agoMerge "logging,cdr,cel: Fix stringfield memory leak." into 13
zuul [Wed, 1 Jun 2016 21:11:33 +0000 (16:11 -0500)] 
Merge "logging,cdr,cel: Fix stringfield memory leak." into 13

9 years agoMerge "pjproject_bundled: Move to pjproject 2.5" into 13
zuul [Wed, 1 Jun 2016 20:12:19 +0000 (15:12 -0500)] 
Merge "pjproject_bundled:  Move to pjproject 2.5" into 13

9 years agologging,cdr,cel: Fix stringfield memory leak. 27/2927/1
Richard Mudgett [Wed, 1 Jun 2016 18:57:53 +0000 (13:57 -0500)] 
logging,cdr,cel: Fix stringfield memory leak.

The stringfields refactor to allow adding stringfields to the end of a
structure (f6f4cf459f43f072604927209b39646f84aaa2e2) exposed some
incomplete cleanup code by some stringfield users.

The most noticeable leaker is the logging system where there is a leak for
every log message generated.

ASTERISK-26078 #close
Reported by:  Etienne Lessard
Patches:
      jira_asterisk_26078_v13.patch (license #5621) patch uploaded
      by Richard Mudgett

Change-Id: If6a08b31336b492c3de6f9dfd07c447f8d5a8782

9 years agocore/dial: New channel variable FORWARDERNAME 05/2905/3
Alexei Gradinari [Wed, 25 May 2016 15:34:42 +0000 (11:34 -0400)] 
core/dial: New channel variable FORWARDERNAME

Added a new channel variable FORWARDERNAME which indicates which
channel was responsible for a forwarding requests received on dial attempt.

Fixed a bug in the app_queue: FORWARD_CONTEXT is not used.

ASTERISK-26059 #close

Change-Id: I34e93e8c1b5e17776a77b319703c48c8ca48e7b2

9 years agopjsip_distributor.c: Use correct rdata info access method (Part 2). 24/2924/1
Richard Mudgett [Tue, 31 May 2016 18:02:15 +0000 (13:02 -0500)] 
pjsip_distributor.c: Use correct rdata info access method (Part 2).

The pjproject doxygen for rdata->msg_info.info says to call
pjsip_rx_data_get_info() instead of accessing the struct member directly.
You need to call the function mostly because the function will generate
the struct member value if it is not already setup.

Change-Id: I4d519385a577f3e9d9193a88125e493cf17fa799

9 years agoMerge "res_pjsip_mwi_body_generator: Re-order the body items" into 13
zuul [Tue, 31 May 2016 17:39:45 +0000 (12:39 -0500)] 
Merge "res_pjsip_mwi_body_generator:  Re-order the body items" into 13

9 years agoMerge "res_pjsip: add "via_addr", "via_port", "call_id" to contact" into 13
Joshua Colp [Tue, 31 May 2016 12:41:43 +0000 (07:41 -0500)] 
Merge "res_pjsip: add "via_addr", "via_port", "call_id" to contact" into 13

9 years agoMerge "res_pjsip: Add clarifying documentation to PJSIP_HEADER help text" into 13
zuul [Tue, 31 May 2016 12:17:16 +0000 (07:17 -0500)] 
Merge "res_pjsip: Add clarifying documentation to PJSIP_HEADER help text" into 13

9 years agoMerge "res_pjsip: chatty verbose messages" into 13
zuul [Tue, 31 May 2016 11:18:51 +0000 (06:18 -0500)] 
Merge "res_pjsip: chatty verbose messages" into 13

9 years agores_pjsip_mwi_body_generator: Re-order the body items 21/2921/1
George Joseph [Tue, 31 May 2016 00:27:35 +0000 (18:27 -0600)] 
res_pjsip_mwi_body_generator:  Re-order the body items

Re-ordered the body items so Message-Account is second.

Messages-Waiting: no
Message-Account: sip:1571@<IP Removed>:5060
Voice-Message: 0/0 (0/0)

ASTERISK-26065 #close
Reported-by: Ross Beer
Change-Id: If5d35a64656eac98c2dd5e490cc0b2807bed80c3

9 years agopjproject_bundled: Move to pjproject 2.5 19/2919/1
George Joseph [Mon, 30 May 2016 15:58:35 +0000 (09:58 -0600)] 
pjproject_bundled:  Move to pjproject 2.5

Although all the patches we had against 2.4.5 were applied by Teluu,
a new bug was introduced preventing re-use of tcp and tls transports
This patch removes all the previous patches against 2.4.5, updates
the version to 2.5, and adds a new patch to correct the transport
re-use problem.

Change-Id: I0dc6c438c3910f7887418a5832ca186aea23d068

9 years agores_pjsip: Add clarifying documentation to PJSIP_HEADER help text 16/2916/2
Rusty Newton [Fri, 27 May 2016 17:25:55 +0000 (12:25 -0500)] 
res_pjsip: Add clarifying documentation to PJSIP_HEADER help text

Added notes about when you can read or write headers. Specifically
about being able to read on the inbound channel and write on an
outbound channel.

ASTERISK-26063 #close
Reported by: Private Name
Tested by: Rusty Newton

Change-Id: Ibeb64af17d1f6451028b3c29855a3f151a01d8c5

9 years agoMerge "app_voicemail: fix bugs, imap mm_status log change to debug" into 13
Joshua Colp [Thu, 26 May 2016 22:30:57 +0000 (17:30 -0500)] 
Merge "app_voicemail: fix bugs, imap mm_status log change to debug" into 13

9 years agopjsip_distributor.c: Use correct rdata info access method. 08/2908/1
Richard Mudgett [Wed, 25 May 2016 23:30:07 +0000 (18:30 -0500)] 
pjsip_distributor.c: Use correct rdata info access method.

The pjproject doxygen for rdata->msg_info.info says to call
pjsip_rx_data_get_info() instead of accessing the struct member directly.
You need to call the function mostly because the function will generate
the struct member value if it is not already setup.

Change-Id: Iafe8b01242b7deb0ebfdc36685e21374a43936d2

9 years agoapp_voicemail: fix bugs, imap mm_status log change to debug 83/2883/5
Alexei Gradinari [Fri, 20 May 2016 18:56:30 +0000 (14:56 -0400)] 
app_voicemail: fix bugs, imap mm_status log change to debug

Fixed some bugs:
- create dirpath when save downloading message from IMAP storage.
- create IMAP folder if not exists when saving to IMAP storage
- check if file successfully opened before write to it
- some IMAP checks
- remove non-standard flag 'Unseen'
etc

Change to debug IMAP mm_status log instead of verbose.

Remove unused X-Asterisk-VM-Caller-channel message header
for security reason. The clients should not know name of peer/endpoint.

ASTERISK-26045 #close

Change-Id: I7f83d88b69b36934e2539c114b9fb612deed971b

9 years agores_pjsip: add "via_addr", "via_port", "call_id" to contact 01/2801/6
Alexei Gradinari [Thu, 19 May 2016 19:56:26 +0000 (15:56 -0400)] 
res_pjsip: add "via_addr", "via_port", "call_id" to contact

As res_pjsip_nat rewrites contact's address, only the last Via header
can contain the source address of registered endpoint.
Also Call-Id header may contain the source address of registered
endpoint.

Added "via_addr", "via_port", "call_id" to contact.
Added new fields ViaAddress, CallID to AMI event ContactStatus.

ASTERISK-26011

Change-Id: I36bcc0bf422b3e0623680152d80486aeafe4c576

9 years agores_pjsip: chatty verbose messages 02/2902/2
Alexei Gradinari [Tue, 24 May 2016 21:56:49 +0000 (17:56 -0400)] 
res_pjsip: chatty verbose messages

There are a lot of verbose messages about Endpoint and Contact status
changes if there are many dynamic endpoints.
The patch sets verbose level 2 for Endpoint status changes
and verbose level 3 for Contact status changes.

ASTERISK-26055 #close

Change-Id: Ie64e261ddbbc41bfff0f0190241152cc123fe6d7

9 years agothreadpool: Fix potential data race. 00/2900/2
Corey Farrell [Fri, 12 Feb 2016 15:59:44 +0000 (10:59 -0500)] 
threadpool: Fix potential data race.

worker_start checked for ZOMBIE status without holding a lock.  All
other read/write of worker status are performed with a lock, so this
check should do the same.

ASTERISK-25777 #close

Change-Id: I5e33685a5c26fdb300851989a3b82be8c4e03781

9 years agoMerge "func_odbc: single database connection should be optional" into 13
zuul [Tue, 24 May 2016 14:00:20 +0000 (09:00 -0500)] 
Merge "func_odbc: single database connection should be optional" into 13

9 years agoMerge "Makefile: remove OSARCH check for init install" into 13
zuul [Mon, 23 May 2016 21:16:14 +0000 (16:16 -0500)] 
Merge "Makefile: remove OSARCH check for init install" into 13

9 years agoMerge "func_curl: Don't trim response text on non-ASCII characters" into 13
zuul [Mon, 23 May 2016 14:27:29 +0000 (09:27 -0500)] 
Merge "func_curl: Don't trim response text on non-ASCII characters" into 13

9 years agoMerge "parking.h: Update ast_parking_park_call() doxygen to reality." into 13
zuul [Mon, 23 May 2016 11:39:12 +0000 (06:39 -0500)] 
Merge "parking.h: Update ast_parking_park_call() doxygen to reality." into 13

9 years agoMakefile: remove OSARCH check for init install 94/2894/1
Tzafrir Cohen [Wed, 18 May 2016 15:58:20 +0000 (18:58 +0300)] 
Makefile: remove OSARCH check for init install

There are more specific checks for the platform.

Specifically this allows installing OS/X init scripts.

ASTERISK-26038 #close

Change-Id: If08933621145b10362a0cfe73c079301d9c13f50
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
9 years agofunc_curl: Don't trim response text on non-ASCII characters 92/2892/1
Ivan Poddubny [Sat, 21 May 2016 10:42:45 +0000 (13:42 +0300)] 
func_curl: Don't trim response text on non-ASCII characters

The characters 0x80-0xFF were trimmed as well as 0x00-0x20 because of
a signed comparison.

ASTERISK-25669 #close
Reported by: Jesper
patches:
  strings.curl.trim.patch submitted by Jesper (License 5518)

Change-Id: Ia51e169f24e3252a7ebbaab3728630138ec6f60a

9 years agoparking.h: Update ast_parking_park_call() doxygen to reality. 87/2887/2
Richard Mudgett [Fri, 20 May 2016 21:59:52 +0000 (16:59 -0500)] 
parking.h: Update ast_parking_park_call() doxygen to reality.

ASTERISK-26029

Change-Id: I2db14d102a48d3224010e6d1c69e856373cc1260

9 years agofunc_odbc: single database connection should be optional 00/2800/6
Alexei Gradinari [Tue, 10 May 2016 19:30:29 +0000 (15:30 -0400)] 
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: I57d990616c957dabf7597dea5d5c3148f459dfb6

9 years agores_pjsip: Match dialogs on responses better. 81/2881/1
Mark Michelson [Fri, 20 May 2016 14:39:10 +0000 (09:39 -0500)] 
res_pjsip: Match dialogs on responses better.

When receiving an incoming response to a dialog-starting INVITE, we were
not matching the response to the INVITE dialog. Since we had not
recorded the to-tag to the dialog structure, the PJSIP-provided method
to find the dialog did not match.

Most of the time, this was not a problem, because there is a fall-back
that makes the response get routed to the same serializer that the
request was sent on. However, in cases where an asynchronous DNS lookup
occurs in the PJSIP core, the thread that sends the INVITE is not
actually a threadpool serializer thread. This means we are unable to
record a serializer to handle the incoming response.

Now, imagine what happens when an INVITE is sent on a non-serialized
thread, and an error response (such as a 486) arrives. The 486 ends up
getting put on some random threadpool thread. Eventually, a hangup task
gets queued on the INVITE dialog serializer. Since the 486 is being
handled on a different thread, the hangup task can execute at the same
time that the 486 is being handled. The hangup task assumes that it is
the sole owner of the INVITE session and channel, so it ends up
potentially freeing the channel and NULLing the session's channel
pointer. The thread handling the 486 can crash as a result.

This change has the incoming response match the INVITE transaction, and
then get the dialog from that transaction. It's the same method we had
been using for matching incoming CANCEL requests. By doing this, we get
the INVITE dialog and can ensure that the 486 response ends up being
handled by the same thread as the hangup, ensuring that the hangup runs
after the 486 has been completely handled.

ASTERISK-25941 #close
Reported by Javier Riveros

Change-Id: I0d4cc5d07e2a8d03e9db704d34bdef2ba60794a0

9 years agores_sorcery_astdb: Filter fields to only the registered ones. 79/2879/1
Joshua Colp [Thu, 19 May 2016 16:41:45 +0000 (13:41 -0300)] 
res_sorcery_astdb: Filter fields to only the registered ones.

This change introduces the same filtering that is done in res_sorcery_realtime
to the res_sorcery_astdb module. This allows persisted sorcery objects
that may contain unknown fields to still be read in from the AstDB
and used. This is particularly useful when switching between different
versions of Asterisk that may have introduced additional fields.

ASTERISK-26014 #close

Change-Id: Ib655130485a3ccfd635b7ed5546010ca14690fb2

9 years agoMerge "res_pjsip_empty_info: Respond to empty SIP INFO packets" into 13
Joshua Colp [Thu, 19 May 2016 20:12:02 +0000 (15:12 -0500)] 
Merge "res_pjsip_empty_info: Respond to empty SIP INFO packets" into 13

9 years agoMerge "res_pjsip_outbound_publishing: After unloading the library won't load again...
Joshua Colp [Thu, 19 May 2016 18:33:08 +0000 (13:33 -0500)] 
Merge "res_pjsip_outbound_publishing: After unloading the library won't load again" into 13

9 years agoMerge "res_pjsip: Endpoint IP Access Controls" into 13
Joshua Colp [Thu, 19 May 2016 16:54:03 +0000 (11:54 -0500)] 
Merge "res_pjsip: Endpoint IP Access Controls" into 13

9 years agores_pjsip_empty_info: Respond to empty SIP INFO packets 96/2796/4
snuffy [Tue, 10 May 2016 02:40:08 +0000 (12:40 +1000)] 
res_pjsip_empty_info: Respond to empty SIP INFO packets

Some SBCs require responses to empty SIP INFO packets
after establishing call via INVITE, if not responded to
they may drop your call after unspecified timeout of X minutes.

They are identified by having no Content-Type, check for this
and respond with 200 - OK message.

ASTERISK-24986 #close
Reported-by: Ilya Trikoz, Federico Santulli
Change-Id: Ib27e4f07151e5aef28fa587e4ead36c5b87c43e0

9 years agoMerge "res_pjsip_outbound_publish: Ref leak in off nominal callback paths" into 13
Joshua Colp [Thu, 19 May 2016 10:56:31 +0000 (05:56 -0500)] 
Merge "res_pjsip_outbound_publish: Ref leak in off nominal callback paths" into 13

9 years agoMerge "udptl: Don't eat sequence numbers until OK is received" into 13
Joshua Colp [Thu, 19 May 2016 10:33:35 +0000 (05:33 -0500)] 
Merge "udptl:  Don't eat sequence numbers until OK is received" into 13

9 years agoMerge "res/res_hep_pjsip: Fix reported local IP address when bound to 'any'" into 13
Joshua Colp [Thu, 19 May 2016 10:18:32 +0000 (05:18 -0500)] 
Merge "res/res_hep_pjsip: Fix reported local IP address when bound to 'any'" into 13

9 years agoMerge "res_pjsip_outbound_publish: state potential dropped on reloads/realtime fetche...
Joshua Colp [Thu, 19 May 2016 10:13:38 +0000 (05:13 -0500)] 
Merge "res_pjsip_outbound_publish: state potential dropped on reloads/realtime fetches" into 13

9 years agoMerge "res_pjsip_outbound_publish: Potential crash due to off nominal path" into 13
Joshua Colp [Thu, 19 May 2016 10:12:46 +0000 (05:12 -0500)] 
Merge "res_pjsip_outbound_publish: Potential crash due to off nominal path" into 13

9 years agoMerge "res_pjsip_outbound_publish: Won't unload if condition wait times out" into 13
Joshua Colp [Thu, 19 May 2016 00:17:43 +0000 (19:17 -0500)] 
Merge "res_pjsip_outbound_publish: Won't unload if condition wait times out" into 13

9 years agoMerge "chan_sip: Prevent extra Session-Expires headers from being added" into 13
Joshua Colp [Wed, 18 May 2016 20:37:59 +0000 (15:37 -0500)] 
Merge "chan_sip:  Prevent extra Session-Expires headers from being added" into 13

9 years agoudptl: Don't eat sequence numbers until OK is received 67/2867/3
George Joseph [Wed, 18 May 2016 12:54:14 +0000 (06:54 -0600)] 
udptl:  Don't eat sequence numbers until OK is received

Scenario:
Local fax -> Asterisk w/ firewall -> Provider -> Remote fax

* Local fax starts rtp call to remote fax
* Remote fax starts t38 call back to local fax.
* Local fax sends t38 no-signal to Asterisk before sending an OK.
* udptl processes the frame and increments the expected sequence number.
* chan_sip drops the frame because the call isn't up so nothing goes out
  the external interface to open the port for incoming packets.
* Local fax sends OK and Asterisk sends OK to the remote fax.
* Remote fax sends t38 packets which are dropped by the firewall.
* Local fax re-sends t38 no-signal with the same sequence number.
* udptl drops the frame because it thinks it's a dup.
* Still no outgoing packets to open the firewall.
* t38 negotiation fails.

The patch drops frames t38 received before udptl sequence processing
when the call hasn't been answered yet.  The second no-signal frame
is then seen as new and is relayed out the external interface which
opens the port and allows negotiation to continue.

ASTERISK-26034 #close

Change-Id: I11744b39748bd2ecbbe8ea84cdb4f3c5943c5af9

9 years agochan_sip: Prevent extra Session-Expires headers from being added 52/2852/2
George Joseph [Tue, 17 May 2016 16:14:51 +0000 (10:14 -0600)] 
chan_sip:  Prevent extra Session-Expires headers from being added

When chan_sip does a re-INVITE to refresh a session and authentication
is required, the INVITE with the Authorization header containes a
second Session-Expires header without the ";refersher=" parameter.
This is causing some proxies to return a 400.  Also, when Asterisk is
the uas and the refresher, it is including the Session-Expires and
Min-SE headers in OPTIONS messages which is not allowed per RFC4028.

This patch (based on the reporter's) Checks to see if a Session-Expires
header is already in the message before adding another one.  It also
checks that the method is INVITE or UPDATE.

ASTERISK-26030 #close

Change-Id: I58a7b07bab5a3177748d8a7034fb8ad8e11ce1d9

9 years agores_pjsip_outbound_registration: Clean up state when registration is deleted 49/2849/2
George Joseph [Mon, 16 May 2016 20:29:38 +0000 (14:29 -0600)] 
res_pjsip_outbound_registration:  Clean up state when registration is deleted

Nothing was cleaning up the registration state object when ast_sorcery_delete
was called on a registration.  So, the registration was deleted from sorcery
but the state object went right on refreshing the registration (or failing
to refresh the registration) with the peer.

* Added a 'deleted' observer on registration that removes the state object.

ASTERISK-25964 #close
Reported-by Matt Jordan

Change-Id: I2db792145cdb1f72ebbf57dd9099596dbbf12c23

9 years agoMerge "configs/samples/pjsip.conf.sample: Fix typo" into 13
zuul [Mon, 16 May 2016 18:53:02 +0000 (13:53 -0500)] 
Merge "configs/samples/pjsip.conf.sample: Fix typo" into 13

9 years agores_pjsip: Set TCP_NODELAY on TCP transports 39/2839/1
George Joseph [Mon, 16 May 2016 00:05:34 +0000 (18:05 -0600)] 
res_pjsip:  Set TCP_NODELAY on TCP transports

Although it's perfectly legal to place multiple SIP messages in the same packet,
it can cause problems because the Linux default is to enable Path MTU Discovery
which sets the Don't Fragment bit on the packets. If adding a second message to
the packet causes the MTU to be exceeded, and the destination isn't equipped to
send a FRAGMENTATION NEEDED response to a large packet, the packet will just be
dropped.

We can't specifically tell the stack to send only 1 message per packet, but we
can turn on TCP_NODELAY when we create the transport. This will at least tell
the stack to send packets as soon as possible.

ASTERISK-26005 #close
Reported-by: Ross Beer
Change-Id: I820f23227183f2416ca5e393bec510e8fe1c8fbd

9 years agoconfigs/samples/pjsip.conf.sample: Fix typo 36/2836/1
Matt Jordan [Sun, 15 May 2016 02:48:56 +0000 (21:48 -0500)] 
configs/samples/pjsip.conf.sample: Fix typo

A ':' is not a valid token for starting a comment.

Change-Id: I123592d93a83d1bdde3e352822881eb9da85e5ad

9 years agores/res_hep_pjsip: Fix reported local IP address when bound to 'any' 15/2815/5
Matt Jordan [Thu, 12 May 2016 12:08:08 +0000 (07:08 -0500)] 
res/res_hep_pjsip: Fix reported local IP address when bound to 'any'

When bound to an 'any' address, e.g., 0.0.0.0, PJSIP reports as its
local address the 'any' address, as opposed to the IP address we
actually received the packet on. This can cause some confusion in Homer,
as it will dutifully report what we send it.

This patch uses the PJSIP inspection routines to determine which IP
address we probably received the packet on based on the remote party's
IP address. In the event that this fails, it falls back to the IP
address natively reported by the transport.

Change-Id: I076f835d2aef489e1ee1d01595b211eb2ce62da3

9 years agoMerge "logger: Add PID to syslog messages." into 13
zuul [Sun, 15 May 2016 00:50:44 +0000 (19:50 -0500)] 
Merge "logger: Add PID to syslog messages." into 13

9 years agores_ari: Correct Location headers returned by some ARI resources 34/2834/2
Sean Bright [Sat, 14 May 2016 17:29:09 +0000 (13:29 -0400)] 
res_ari: Correct Location headers returned by some ARI resources

The Location headers returned by:

 * /bridges/{bridgeId}/play
 * /bridges/{bridgeId}/record
 * /channels/{channelId}/play
 * /channels/{channelId}/record

Did not have the '/ari' prefix, and in the case of the 'play' resources, were
using 'playback' instead of 'playbacks.'

Change-Id: I957c58a3a1471bf477dae7c67faa1b74fcd9241c

9 years agoMerge "res_hep: Provide an option to pick the UUID type" into 13
zuul [Sat, 14 May 2016 14:47:33 +0000 (09:47 -0500)] 
Merge "res_hep: Provide an option to pick the UUID type" into 13

9 years agoMerge "config_transport: Tell pjproject to allow all SSL/TLS protocols" into 13
zuul [Fri, 13 May 2016 22:57:52 +0000 (17:57 -0500)] 
Merge "config_transport:  Tell pjproject to allow all SSL/TLS protocols" into 13

9 years agores_pjsip: Endpoint IP Access Controls 51/2551/15
Alexei Gradinari [Fri, 13 May 2016 16:38:20 +0000 (12:38 -0400)] 
res_pjsip: Endpoint IP Access Controls

With the old SIP module we can use IP access controls per peer.
PJSIP module missing this feature.

This patch added next configuration Endpoint options:
    "acl" - list of IP ACL section names in acl.conf
    "deny" - List of IP addresses to deny access from
    "permit" - List of IP addresses to permit access from
    "contact_acl" - List of Contact ACL section names in acl.conf
    "contact_deny" - List of Contact header addresses to deny
    "contact_permit" - List of Contact header addresses to permit

This patch also better logging failed request:
    add custom message instead of "No matching endpoint found"
    add SIP method to logging

ASTERISK-25900

Change-Id: I456dea3909d929d413864fb347d28578415ebf02

9 years agores_hep: Provide an option to pick the UUID type 14/2814/3
Matt Jordan [Thu, 12 May 2016 01:17:15 +0000 (20:17 -0500)] 
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