This patch adds three new CLI commands:
- ari show apps: list the registered ARI applications
- ari show app: show detailed information about an ARI application
- ari set debug: dump events being sent to an ARI application
Note that while these CLI commands live in the res_stasis module, we use
the 'ari' family for these commands. This was done as most users of
Asterisk aren't aware of the semantic differences between ARI and
res_stasis, and some 'ari' CLI commands already exist.
ASTERISK-26488 #close
Change-Id: I51ad6ff0cabee0d69db06858c13f18b1c513c9f5
If in sip.conf (general section) set option register_retry_403=no,
the command "sip show settings" return value:
Outbound reg. retry 403:0
If in sip.conf (general section) set option register_retry_403=yes,
the command "sip show settings" return value:
Outbound reg. retry 403:-1
* In static char "sip show settings" for "Outbound.reg. retry 403"
option use AST_CLI_YESNO
ASTERISK-26476 #close
Change-Id: I3c14272f05f1067bd2aeaa8b3ef9cf8fcb12dcf9
The NewConnectedLine event has been added by commit fe7671f, but the
documentation was missing.
ASTERISK-26537 #close
Change-Id: I7fc331f18caa28492da9303e576f70884ca8c9e6
Headers declare that memcpy does not accept NULL argument for the first
two parameters. Add a conditional block to prevent memcpy and ast_free
from running on vectors with NULL element array.
ASTERISK-26526 #close
Change-Id: I988a476bb5fcfcbd3f6d6c6b3e7769e4f9629b71
Every ao2 object contains storage for a private variable data_size,
though the value is never read if AO2_DEBUG is disabled. This change
makes the variable conditional, reducing memory usage.
ASTERISK-26524 #close
Change-Id: If859929e507676ebc58b0f84247a4231e11da07f
PJPROJECT 2.5.5 introduced a race condition with the -r5349 IPv6 DNS
patch.
The patches below fix the DNS lookup race condition crash caused by
attempting to send the same message twice for the single DNS lookup.
0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch
0006-r5473-svn-backport-Fix-pending-query.patch
The patch below removes a cached DNS response from the hash table when
another thread is referencing the old entry. The table still contained
the entry when it was destroyed which can result in inexplicable crashes.
0006-r5475-svn-backport-Remove-DNS-cache-entry.patch
ASTERISK-26344 #close
Reported by: Ian Gilmour
ASTERISK-26387 #close
Reported by: Harley Peters
Change-Id: I17fde80359e66f65a91341ceca58d914d0f61cc4
main/Makefile includes third-party/pjproject/build.mak but
doesn't set PJDIR beforehand so "include $(PJDIR)/version.mak"
evaluates to "/version.mak". Fix is to set PJDIR in main/Makefile
before the include.
Change-Id: I0f7c67d60209049056fe9c4b041bf0463aa95604
While publishing device state between multiple instances of Asterisk,
a crash will sporadically occur under high CPS which looks to be a
race condition operating on the publisher queue.
ASTERISK-26506
Change-Id: I28da25d346deb358eff1d563485cabc433ce1ed6
It is only safe to run ast_register_cleanup callbacks when all modules
have been unloaded. Previously these callbacks were run during graceful
shutdown, making it possible to crash during shutdown.
ASTERISK-26513 #close
Change-Id: Ibfa635bb688d1227ec54aa211d90d6bd45052e21
Removing explicit transport definition for endpoints and registrations. It
isn't necessary and isn't generally advised.
ASTERISK-26514 #close
Change-Id: Ifdec5e631962438a4683600968dfa4bfd15909fb
Older versions of tar don't support the --strip-components option so
instead of doing 'tar --strip-components=1 -C source', we now just
untar to the tarball's root directory (pjproject-<version>) and
rename that directory to 'source'.
Also fixed an issue where the pjproject source directory is a hard
coded absolute pathname.
ASTERISK-26510 #close
ASTERISK-22480 #close
Change-Id: I9ec92952507a91ff4e4d01e0149e09fd8e8f32b0
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.
Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename
This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled. This variable was only used in lock.c so it
is now initialized in that file only.
ASTERISK-26480 #close
Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
The res_pjsip_caller_id module wrongly assumed that a
saved From header would always exist on sessions. This
is true until an inbound call is received and a session
timer causes an UPDATE to be sent. In this case there will
be no saved From header and a crash will occur. This change
makes it fall back to the From header of the outgoing request
if no saved From header is present.
ASTERISK-26307 #close
Change-Id: Iccc3bc8d243b5ede9b81abf960292930c908d4fa
When executing the MailboxExists dialplan application and
MAILBOX_EXISTS dialplan function the passed in temporary voice
mailbox was not cleared, causing it to try to free garbage.
ASTERISK-26503 #close
Change-Id: Ie21ccfa1b80b9c59318e596f6b8e17da2b5a7cb3
When channel format changes occurred as a result of an RTP
re-negotiation the bridge was not informed this had happened.
As a result the bridge technology was not re-evaluated and the
channel may have been in a bridge technology that was incompatible
with its formats. The bridge is now unbridged and the technology
re-evaluated when this occurs.
The chan_pjsip module also allowed asymmetric codecs for sending
and receiving. This did not work with all devices and caused one
way audio problems. The default has been changed to NOT do this
but to match the sending codec to the receiving codec. For users
who want asymmetric codecs an option has been added, asymmetric_rtp_codec,
which will return chan_pjsip to the previous behavior.
The codecs returned by the chan_pjsip module when queried by
the bridge_native_rtp module were also not reflective of the
actual negotiated codecs. The nativeformats are now returned as
they reflect the actual negotiated codecs.
ASTERISK-26423 #close
Change-Id: I6ec88c6e3912f52c334f1a26983ccb8f267020dc
When an explicit media_address is provided the address family
in the SDP needs to be set to reflect it.
ASTERISK-26309
Change-Id: Ib9350cc91c120eb2f96f0623d3907d12af67eb79
The test uses 4 threads to grow, count, lookup and shrink 15K objects
in a container. If there's only 1 execution engine available, the test
will complete in <50ms. If each threads gets its own execution engine,
the test may timeout after 60 seconds because the count thread does a
locked ao2_callback on the whole container in a tight loop with only
a sched_yield to give up time. The lock contention makes the test
execution times wildly variable and mostly timeout. 2 execution
engines are OK, 3 results in about 33% failure rate and >=4 causes
a 80% failure rate.
To fix, the sched_yield was changed to a usleep(500).
Also, the number of buckets specified for the container was an even
number so that was changed to the next prime number greater than
(MAX_HASH_ENTRIES / 100). That's 151 currently.
Change-Id: I50cd2344161ea61bfe4b96d2a29a6ccf88385c77
On heavy loaded system the TCP/TLS incoming calls could be
disconnected by pjproject while these calls are being
processed by asterisk.
This patch uses functions pjsip_inv_add_ref/pjsip_inv_dec_ref
to inform pjproject that an INVITE session is in use.
ASTERISK-26482 #close
Change-Id: Ia2e3e2f75358cdb530252a9ce158af3d5d9fdf33
- Call "rc_openlog" optional. If you do not call,
you will simply NULL instead of a name.
- On the one PID can be only one syslog channel.
And it can already be run in logger.c
- Calling rc_openlog we assigns a new name for
the channel syslog. This unexpected behavior for logger.c.
Most lesser evil, is to agree on a NULL name syslog
if the channel was not launched in logger.c.
It also solves the problem of memory leaks.
ASTERISK-26455 #close
Change-Id: Ic17c38de67583e971d78fe18807d1a9faf8f0afd
* CFLAGS is now properly set when using older gcc.
* All third-party pjproject targets have been removed. This fixes
an issue with older libsrtp in some distros.
* Manually removing the source directory now causes a rebuild.
* EXTERNALS_CACHE_DIR is now properly checked.
* Whitespace fixes.
Change-Id: I98fec6847efc5602a9f41cb95096fd660a49fa60
This change adds support for dual stack automatically. No
configuration is required and the IP address and version
in the SIP messages and SDP will be automatically changed
based on the transport over which the message is being
sent. RTP usage has also been changed to listen on both
IPv4 and IPv6 simultaneously to allow media to flow, and
to allow ICE support on both simultaneously. This also
allows failover between IPv6 and IPv4 to work as expected.
ASTERISK-26309 #close
Change-Id: I235a421d8f9a326606d861b449fa6fe3a030572d
This is similar to what is done for origination, but for the 14 and up
channel creation method. When attempting to create a channel, if a
channel ID is specified and a channel already exists with that ID, then
a 409 is returned.
Change-Id: I77f9253278c6947939c418073b6b31065489187c
ARI and AMI allow for an explicit channel ID to be specified
when originating channels. Unfortunately, there is nothing in
place to prevent someone from using the same ID for multiple
channels. Further complicating things, adding ID validation to channel
allocation makes it impossible for ARI to discern why channel allocation
failed, resulting in a vague error code being returned.
The fix for this is to institute a new method for channel errors to be
discerned. The method mirrors errno, in that when an error occurs, the
caller can consult the channel errno value to determine what the error
was. This initial iteration of the feature only introduces "unknown" and
"channel ID exists" errors. However, it's possible to add more errors as
needed.
ARI uses this feature to determine why channel allocation failed and can
return a 409 error during origination to show that a channel with the
given ID already exists.
ASTERISK-26421
Change-Id: Ibba7ae68842dab6df0c2e9c45559208bc89d3d06
Introduces ice_blacklist configuration in rtp.conf. Subnets listed in the
form ice_blacklist = <subnet spec>, e.g. ice_blacklist =
192.168.1.0/255.255.255.0, are excluded from ICE host, srflx and relay
discovery. This is useful for optimizing the ICE process where a system
has multiple host address ranges and/or physical interfaces and certain
of them are not expected to be used for RTP. Multiple ice_blacklist
configuration lines may be used. If left unconfigured, all discovered
host addresses are used, as per previous behavior.
Documention in rtp.conf.sample.
ASTERISK-26418 #close
Change-Id: Ibee88f80d7693874fda1cceaef94a03bd86012c9
CDRs form chains. When the root of the chain is destroyed, it then
unreferences the next CDR in the chain. That CDR is destroyed, and it
then unreferences the next CDR in the chain. This repeats until the end
of the chain is reached. While this typically does not cause any sort of
problems, it is possible in strange scenarios for the CDR chain to grow
way longer than expected. In such a scenario, the destruction pattern
can result in a stack overflow.
This patch fixes the problem by switching from a recursive pattern to an
iterative pattern for destruction. When the root CDR is destroyed, it is
responsible for iterating over the rest of the CDRs and unreferencing
each one. Other CDRs in the chain, since they are not the root, will
simply destroy themselves and be done. This causes the stack depth not
to increase.
ASTERISK-26421 #close
Reported by Andrew Nagy
Change-Id: I3ca90c2b8051f3b7ead2e0e43f60d2c18fb204b8