The commit I2f97ebfa79969a36a97bb7b9afd5b6268cf1a07d removed sending out
the ContactStatus AMI event when a contact is updated.
Thist change broke things which rely on old behavior.
This patch adds a new PJSIP global configuration option
'send_contact_status_on_update_registration' to be able to preserve old
ContactStatus behavior.
By default new behavior, i.e. the ContactStatus event will not be sent when a
device refreshes its registration.
Change-Id: I706adf7584e7077eb6bde6d9799ca408bc82ce46
In order to get a dump of the running process, we need to find the
pid of the main asterisk process. This can be tricky if there are
also instances of "asterisk -r" running or if an alternate location
for asterisk.conf was specified on the command line with the -C
option that also specified an alternation location for the pid file.
So now...
1. We find the asterisk executable with "which" or the --asterisk-bin
command line option.
2. If there's only 1 process with an executable path that matches,
we use that pid. If not...
3. We try "<asterisk-bin> -rx 'core show settings'" and parse the
output to find the pidfile, then read that for the pid. If that
didn't work...
4. We get a list of all the pids matching <asterisk-bin> and look
in /proc/<pid>/cmdline for a -C argument and retry the "core show
settings" using the same -C option. We can't parse the output
of "ps" to get the -C path because it may contain spaces. The
contents of /proc/<pid>/cmdline are delimited by NULLs. For BSDs
we may have to mount /proc first. :(
ASTERISK-28221
Reported by: Andrew Nagy
Change-Id: I8aa1f3f912f949df2b5348908803c636bde1d57c
Using the --quiet or -q option in conjonction with /dev/stdout as the output
file allow the output to be used as a valid configuration.
Given a script that generates a valid sip.conf I can pipe the output of that
script into `sip_to_pjsip.py -q /dev/stdin /dev/stdout`. This allow me to use
that piped command in my pjsip.conf using the `exec` command.
ASTERISK-28136
Change-Id: I7b0e2e90e2549f3f8e01dc96701f111b5874c88d
This patch adds new options 'trust_connected_line' and 'send_connected_line'
to the endpoint.
The option 'trust_connected_line' is to control if connected line updates
are accepted from this endpoint.
The option 'send_connected_line' is to control if connected line updates
can be sent to this endpoint.
The default value is 'yes' for both options.
Change-Id: I16af967815efd904597ec2f033337e4333d097cd
Given a sip.conf with the following content:
setvar FOO=1
setvar BAR=42
I want my generated pjsip.conf to containt the following set_vars
set_var FOO=1
set_var BAR=42
in the matching endpoint section.
Change-Id: I6c822401fda4133c3b44bf31e655b4eb939d4d26
Add a new global flag to res_pjsip to allow the callerid to be used
as the username in the contact header. This allows chan_pjsip to have
the same behavour as chan_sip
ASTERISK-28087 #close
Change-Id: I9a720e058323f6862a91c62f8a8c1a4b5c087b95
This change implements a few different generic things which were brought
on by Google Voice SIP.
1. The concept of flow transports have been introduced. These are
configurable transports in pjsip.conf which can be used to reference a
flow of signaling to a target. These have runtime configuration that can
be changed by the signaling itself (such as Service-Routes and
P-Preferred-Identity). When used these guarantee an individual connection
(in the case of TCP or TLS) even if multiple flow transports exist to the
same target.
2. Service-Routes (RFC 3608) support has been added to the outbound
registration module which when received will be stored on the flow
transport and used for requests referencing it.
3. P-Associated-URI / P-Preferred-Identity (RFC 3325) support has been
added to the outbound registration module. If a P-Associated-URI header
is received it will be used on requests as the P-Preferred-Identity.
4. Configurable outbound extension support has been added to the outbound
registration module. When set the extension will be placed in the
Supported header.
5. Header parameters can now be configured on an outbound registration
which will be placed in the Contact header.
6. Google specific OAuth / Bearer token authentication
(draft-ietf-sipcore-sip-authn-02) has been added to the outbound
registration module.
All functionality changes are controlled by pjsip.conf configuration
options and do not affect non-configured pjsip endpoints otherwise.
ASTERISK-27971 #close
Change-Id: Id214c2d1c550a41fcf564b7df8f3da7be565bd58
This allows us to process AO2 statistics for total objects, memory
usage, memory overhead and lock usage.
* Install refstats.py and reflocks.py into the Asterisk scripts folder.
* Enable support for reflocks.py without DEBUG_THREADS.
Steal a bit from the ao2 magic to flag when an object lock is used.
Remove 'lockobj' from reflocks.py since we can now record 'used' or
'unused' for those objects.
Add comments to explain thread safety of the 'struct __priv_data'
bitfields.
Change-Id: I84e9d679cc86d772cc97c888d9d856a17e0d3a4a
When DEBUG_THREADS is enabled we can know if the astobj2 mutex / rwlock
was ever used, so it can be recorded in the REF_DEBUG destructor entry.
Create contrib/scripts/reflocks.py to process locking used by
allocator. This can be used to identify places where
AO2_ALLOC_OPT_LOCK_NOLOCK should be used to reduce memory usage.
Change-Id: I2e3cd23336a97df2692b545f548fd79b14b53bf4
In the original commit introducing the feature the column in the alembic
script was called 'suppress_q850_reason_header'.
In the code however the option is called 'suppress_q850_reason_headers'
(trailing 's'). This leads to errors when ARI push configuration is used.
Change-Id: Ie84808adbca6fcc9136556e4f5d741adbef5d14f
This is removed in favor of ./configure --with-jansson-bundled. The
install-unpackaged command would only install jansson once, so once
installed it would never update, where the bundled copy will be kept up
to date.
Change-Id: Ideab1f65419608d3795aa608e9da873823cc42d3
When mobile SIP clients register with Asterisk that use some sort of
push notifications, the URI can get quite lengthy due to the
additional push-service annotations (things like tokens, pn-type, etc.)
contained in it.
ASTERISK-28022 #close
Change-Id: I4c7ceadc3bb405f3daf722641c8cd5ca4188cc37
A new option 'suppress_q850_reason_headers' has been added to the
endpoint object. Some devices can't accept multiple Reason headers and
get confused when both 'SIP' and 'Q.850' Reason headers are received.
This option allows the 'Q.850' Reason header to be suppressed.
The default value is 'no'.
ASTERISK-27949
Reported-by: Ross Beer
Change-Id: I54cf37a827d77de2079256bb3de7e90fa5e1deb1
pjproject by default currently will follow media forked during an INVITE
on outbound calls if the To tag is different on a subsequent response as
that on an earlier response. We handle this correctly. There have
been reported cases where the To tag is the same but we still need to
follow the media. The pjproject patch in this commit adds the
capability to sip_inv and also adds the capability to control it at
runtime. The original "different tag" behavior was always controllable
at runtime but we never did anything with it and left it to default to
TRUE.
So, along with the pjproject patch, this commit adds options to both the
system and endpoint objects to control the two behaviors, and a small
logic change to session_inv_on_media_update in res_pjsip_session to
control the behavior at the endpoint level.
The default behavior for "different tags" remains the same at TRUE and
the default for "same tag" is FALSE.
Change-Id: I64d071942b79adb2f0a4e13137389b19404fe3d6
ASTERISK-27936
Reported-by: Ross Beer
The OUTPUTDIR variable in ast_debug_tools.conf.sample is now set
to "/tmp" instead of "/some/directory".
Variables set on the command line or that are already in the
environment now take predecence over variables set in the config files.
ASTERISK-27846
Reported by: Ted G
Change-Id: Ie8baec52d531886bf5849ec1d59bb59dc87ad387
The script remains compatible with Python 2.7 but now also works with
Python 3.3 and newer; to ease the migration from chan_sip to chan_pjsip.
ASTERISK-27811
Change-Id: I59cc6b52a1a89777eebcf25b3023bdf93babf835
* Consistently use spaces in rest-api-templates/asterisk_processor.py.
* Exclude third-party from docs/full-en_US.xml.
* Add docs/full-en_US.xml to .gitignore.
* Use list() to convert python3 view.
* Use python3 print function.
* Replace cmp() with equivalent equation.
* Replace reference to out of scope subtype variable with name
parameter.
* Use unescaping triple bracket notation in mustache templates where
needed. This causes behavior of Python2 to be maintained when using
Python3.
* Fix references to has_websocket / is_websocket in
res_ari_resource.c.mustache.
* Update calculation of has_websocket to use any().
* Use unicode mode for writing output file in transform.py.
* Replace 'from swagger_model import *' with explicit import of required
symbols.
I have not tested spandspflow2pcap.py or voicemailpwcheck.py, only the
print syntax has been fixed.
Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33
Asterisk does not need the development package of libltdl, because it does not
use any symbol of -lltdl directly. Instead, it uses the runtime package via the
shared library -lodbc. On the supported platforms, that shared library declares
its dependency on -lltdl correctly, otherwise AST_EXT_LIB_CHECK would have
failed.
ASTERISK-27745
Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
Because the code review system Gerrit creates merge conflicts even when one line
apart another change happened, the previous update to the FreeBSD libraries had
to be rebased via Git. Because of a break for training of the original
contributor, this rebase was done by another contributor and the variant for
Asterisk 13 was cherry-picked to all branches. By this, dependencies for new
features added in newer Asterisk version got lost. This can be seen, when not
the original path set but a previous patch set is compared.
This change here fixes this by adding those (optional) dependencies for
Asterisk 15 and newer (again).
ASTERISK-27686
Change-Id: I6638a3d0dc37ad4ff5f94be15463e3dd8a2bfe74
* Fix --tarball-config so the option doesn't cause an error.
* Allow for missing /etc/os-release.
* Add a sleep between tarballing the coredump and removing the
output directory to allow the filesystem to settle.
Change-Id: I73e03b13087978bcc7f6bc9f45753990f82d9d77
Add a new script that can read from legacy realtime peers & generate
an sql file for populating pjsip endpoints, identify, and aor records.
ASTERISK-27348 #close
Change-Id: Idd3d7968a3c9c3ee7936d21acbdaf001b429bf65
Jansson is thread safe for all read-only functions and reference
counting starting v2.11. This allows simplification of our code and
removal of locking around reference counting and dumping.
Change-Id: Id985cb3ffa6681f9ac765642e20fcd187bd4aeee
In an earlier release, inbound registrations on a reliable transport
were pruned on Asterisk restart since the TCP connection would have
been torn down and become unusable when Asterisk stopped. This same
process is now also applied to inbound subscriptions.
Also fixed issues in res_pjsip_registrar where it wasn't handling the
monitoring correctly when multiple registrations came in over the same
transport.
To accomplish this, the pjsip_transport_event feature needed to
be refactored to allow multiple monitors (multiple subcriptions or
registrations from the same endpoint) to exist on the same transport.
Since this changed the API, any external modules that may have used the
transport monitor feature (highly unlikey) will need to be changed.
ASTERISK-27612
Reported by: Ross Beer
Change-Id: Iee87cf4eb9b7b2b93d5739a72af52d6ca8fbbe36