Commit Graph

27956 Commits

Author SHA1 Message Date
George Joseph
329507fe20 res_pjsip: Add contact_user to endpoint
contact_user, when specified on an endpoint, will override the user
portion of the Contact header on outgoing requests.

Change-Id: Icd4ebfda2f2e44d3ac749d0b4066630e988407d4
2016-08-17 14:39:32 -06:00
Alexander Traud
56e0aed177 BuildSystem: Detect ca_list_path capabilities in external PJProject.
Since Asterisk 13.8, pj_ssl_cert_load_from_files2 got detected only in the
bundled PJProject but not in an external PJProject. Therefore, ca_list_path
could not be used in pjsip.conf. With this change, pj_ssl_cert_load_from_files2
is detected again to enable ca_list_path again.

ASTERISK-26303 #close

Change-Id: I4a4a0cdc5cdff33730911fb4cfc0498c069043d0
2016-08-17 06:23:24 -05:00
zuul
455bc78901 Merge "Refactor usage pattern of xmldoc info tag." into 13 2016-08-16 12:15:24 -05:00
Joshua Colp
5c24677127 Merge "res_sorcery_config.c: Cleanup ao2 container usage idioms." into 13 2016-08-16 09:09:43 -05:00
Joshua Colp
d85310e3e8 Merge "sorcery.c: Minor optimizations." into 13 2016-08-16 09:09:37 -05:00
zuul
7ed9bc8169 Merge "sorcery.c: Tweak some container declaration formatting." into 13 2016-08-16 09:06:51 -05:00
zuul
643aac69a7 Merge "chan_sip: Fix lastrtprx always updated" into 13 2016-08-16 08:23:48 -05:00
zuul
050b90769a Merge "core: Entity ID is not set or invalid" into 13 2016-08-16 06:43:54 -05:00
zuul
6c4c31456f Merge "pbx.c: Additional fixes to ast_context_remove_extension_callerid2." into 13 2016-08-16 04:51:32 -05:00
Corey Farrell
f4e28b3a09 Refactor usage pattern of xmldoc info tag.
This updates func_channel.c and main/message.c to use a generic xpointer
include instead of including info from each channel driver.  Now the
name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in
documentation for func_channel.  Setting the name attribute of info to
MessageToInfo or MessageFromInfo causes it to be included in the
MessageSend application and AMI action.

Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea
2016-08-15 19:02:04 -04:00
Joshua Colp
8cc34aa480 Merge "app_dial: Improve documentation" into 13 2016-08-15 16:39:17 -05:00
Joshua Colp
10fa55576d Merge "manager: Add <see-also> tags to relate interrelated events/actions together" into 13 2016-08-15 16:39:11 -05:00
Joshua Colp
952edd30d1 Merge "manager: Add <see-also> tags to relate Bridge related events,actions, and apps" into 13 2016-08-15 16:39:06 -05:00
Joshua Colp
b4828cb125 Merge "manager: Add <see-also> tags to relate AoC events and actions" into 13 2016-08-15 16:38:59 -05:00
Joshua Colp
274794eb1e Merge "manager: Add <see-also> tags to relate UserEvent actions/apps/events" into 13 2016-08-15 16:38:53 -05:00
Joshua Colp
ccd73a2dbd Merge "res_agi: Improve documentation" into 13 2016-08-15 16:38:43 -05:00
zuul
ebdc880eb3 Merge "manager: Add <see-also> links between related events" into 13 2016-08-15 15:46:05 -05:00
zuul
9a55d541aa Merge "func_channel: Reorganize documentation" into 13 2016-08-15 15:15:58 -05:00
Richard Mudgett
a8d9a53bae res_sorcery_config.c: Cleanup ao2 container usage idioms.
Change-Id: Iad24b335fb121a2bc7f1d048ab7420569edcba5a
2016-08-15 13:10:35 -05:00
Richard Mudgett
74a91b9ee5 sorcery.c: Minor optimizations.
* Remove some unused parameters from internal functions:
sorcery_wizard_create()
sorcery_wizard_update()
sorcery_wizard_delete()

* Created the struct sorcery_observer_invocation ao2 object without a lock
since it is not needed in sorcery_observer_invocation_alloc().

* Cleanup generic ao2 container sorcery object id hash, sort, and cmp
functions.

Change-Id: Iff71d75f52bc1b8cee955456838c149faaa4f92e
2016-08-15 13:09:30 -05:00
Richard Mudgett
29beb2890c sorcery.c: Tweak some container declaration formatting.
* Tweak sorcery_object_type_alloc() formatting.
* Tweak ast_sorcery_init() formatting.

Change-Id: Ib02430023f15268cd7a2ea53f2c331213e4d3944
2016-08-15 13:02:48 -05:00
Corey Farrell
9b822293bd pbx.c: Additional fixes to ast_context_remove_extension_callerid2.
Do not check registrar of the first extension head.  We should only check
the registrar when we match the priority.

Additionally fix a couple calls to strcmp which used the input callerid
instead of the clean version ex.cidmatch.

ASTERISK-26233

Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1
2016-08-15 11:12:31 -05:00
Alexei Gradinari
403c794684 core: Entity ID is not set or invalid
The Exchanging Device and Mailbox States could not working
if the Entity ID (EID) is not set manually and can't be obtained
from ethernet interface.

This patch replaces debug message to warning
and addes missing description about option 'entityid' to
asterisk.conf.sample.

With this patch the asterisk also:
(1) decline loading the modules which won't work without EID:
    res_corosync and res_pjsip_publish_asterisk.
(2) warn if EID is empty on loading next modules:
    pbx_dundi, res_xmpp

Starting with v197 systemd/udev will automatically assign "predictable"
names for all local Ethernet interfaces.
This patch also addes some new ethernet prefixes "eno" and "ens".

ASTERISK-26164 #close

Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6
2016-08-15 10:08:43 -04:00
cjack
93332cb1d0 chan_sip: Fix lastrtprx always updated
Packets are read regulary, when there is no data in buffer fr->frametype
is AST_FRAME_NULL. There was no check of frametype and lastrtprx always 
updated and, therefore, rtptimeout did not work at all.

ASTERISK-25270 #close

Change-Id: If3b5ca0dbb822582a86eb7d01dcae4e83448c41d
2016-08-15 07:21:42 -05:00
Joshua Colp
2735ec899a manager: Clarify that dialplan manipulation actions are under system class.
ASTERISK-26246 #close

Change-Id: Id673b9786389f9d2a87f638ce1a25161f5f31657
2016-08-15 12:17:51 +00:00
Matt Jordan
f59bd47ed3 app_dial: Improve documentation
* Add some helpful <literal> and other embedded paragraph tags

* Document some of the lesser known channel variables set by Dial

* Add examples for some common Dial uses, along with some more
  challenging but useful options

Change-Id: Ib2fb9301e8e044d14fbb2815ec64161f19bbfbc1
2016-08-14 13:03:47 -05:00
Matt Jordan
4facaac408 manager: Add <see-also> tags to relate interrelated events/actions together
Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4
2016-08-13 22:03:56 -05:00
Matt Jordan
232d4fe24f manager: Add <see-also> tags to relate Bridge related events,actions, and apps
Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85
2016-08-13 22:03:56 -05:00
Matt Jordan
63c0b2f7c9 manager: Add <see-also> tags to relate AoC events and actions
Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e
2016-08-13 20:26:50 -05:00
Matt Jordan
0422667d6c manager: Add <see-also> tags to relate UserEvent actions/apps/events
Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4
2016-08-13 20:26:50 -05:00
Matt Jordan
f9e734974b res_agi: Improve documentation
* Groups of AGI commands that have similar functionality now reference
  each other, and all reference the AGI application for ease of wiki
  reference.

* The documentation for the AGI application has been improved, in
  particular noting the various AGI types and how they are invoked.

* A warning message has been added to DeadAGI, noting that it is
  deprecated.

Change-Id: I479ccdee8a7393f01b18692c3d4ab7e6bdd1875d
2016-08-13 20:26:50 -05:00
Matt Jordan
781bb410d0 manager: Add <see-also> links between related events
This patch adds some see-also references between related AMI events. It
focuses primarily on those events that are guaranteed to come in pairs,
such as DTMFBegin/DTMFEnd, as well as those that occur during the life
cycle of an Asterisk channel, such as Newchannel/Hangup.

Change-Id: Iaab600477052018d0f8c03d0c624c0856e9ff1f3
2016-08-13 20:26:38 -05:00
zuul
2dc23297a9 Merge "res_pjsip: Fail global load if debug or default_from_user are empty" into 13 2016-08-12 18:49:54 -05:00
zuul
8633259301 Merge "res_pjsip_caller_id: Copy header name to short header name" into 13 2016-08-12 15:55:20 -05:00
zuul
03b7d04298 Merge "Run mandatory cleanup when startup fails." into 13 2016-08-12 13:59:46 -05:00
zuul
3ea349e2bd Merge "location.c: Misc fixes and cleanups." into 13 2016-08-12 13:10:47 -05:00
Matt Jordan
cfd6852d39 func_channel: Reorganize documentation
* Following the example of the PJSIP channel driver, the channel
  technology specific documentation has been moved to the respective
  channel drivers that provide that functionality. This has the benefit
  of locating the documentation of items with those modules that provide
  it.

* Examples of using the CHANNEL function for both standard items as well
  as for PJSIP have been added.

* The 'max_forwards' standard item has been documented.

Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b
2016-08-12 11:15:38 -05:00
zuul
b3586baeea Merge "app_queue: Prevent crash when a call is forwarded to an invalid location" into 13 2016-08-12 08:52:10 -05:00
zuul
ce7357237c Merge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups." into 13 2016-08-12 05:35:57 -05:00
zuul
0383500afb Merge "pjsip_distributor.c: Add missing allocation failure check." into 13 2016-08-12 03:03:51 -05:00
zuul
ee150b697f Merge "alembic: add auth_username to endpoint's identify_by enum" into 13 2016-08-12 01:27:31 -05:00
zuul
4a05856f40 Merge "res_pjsip: Make aor named lock a mutex." into 13 2016-08-11 23:14:38 -05:00
Corey Farrell
cb043249b6 Run mandatory cleanup when startup fails.
Errors during startup result in an exit.  These error branches should be
calling ast_run_atexit(0) to ensure mandatory cleanup is run.

ASTERISK-26267 #close

Change-Id: If226f2326ae2df7add20040696132214cf2bb680
2016-08-11 23:11:33 -04:00
George Joseph
4d5e96ab53 res_pjsip_caller_id: Copy header name to short header name
When compact_headers was set, we were sending a zero-length header name
for PAI and RPID because we always forced the short header name length
to 0.  We did this because we cloned the header from "From" and wanted
to clear "f" from the sname.  By cloning however, we bypass pjproject's
automatic logic that sets sname to name if there's no compact form of
the header, which there isn't for PAI and RPID.  So now we force sname
to be the same as name right after we set name.

res_pjsip_diversion needed the same treatment for the Diversion header.

ASTERISK-26241 #close

Change-Id: I633ec139630cd83809aae00336cee4a10077e467
2016-08-11 13:16:41 -06:00
George Joseph
143df33110 res_pjsip: Fail global load if debug or default_from_user are empty
If debug was specified in the global configuration but left blank,
the logger would treat it as a wildcard and log all hosts.  If
default_from_user was empty, a crash would result.

The global apply handler now checks for empty strings.

ASTERISK-26239 #close
ASTERISK-26238 #close

Change-Id: Ie75727f5cd5808845d92cc81f5713842fb203336
2016-08-11 11:32:43 -06:00
Richard Mudgett
1fc5c90014 res_pjsip res_pjsip_mwi: Misc fixes and cleanups.
* Eliminated RAII_VAR() usage in
ast_sip_persistent_endpoint_update_state().

* Added a missing allocation failure check to
persistent_endpoint_find_or_create().

* Made persistent_endpoint_find_or_create() create the new object without
a lock as it isn't needed.

* Cleaned up some ao2 container allocation idioms.

* Reordered res_pjsip_mwi.c load_module() and unload_module()

Change-Id: If8ce88fbd82a0c72a37a2388f74f77237a6a36a8
2016-08-11 12:14:53 -05:00
Richard Mudgett
73052e5732 location.c: Misc fixes and cleanups.
* Eliminated most RAII_VAR() usage.

* Added several missing allocation failure checks.

* Made ast_sip_for_each_contact() allocate the wrapper ao2 object without
a lock as it is not needed.

Change-Id: Ie20913365156c95dd79e5d471cfd25e99ae880bc
2016-08-11 12:12:48 -05:00
Richard Mudgett
9d4bd3d763 taskprocessor.c: Tweak high water checks.
* The high water check in ast_taskprocessor_alert_set_levels() would
trigger immediately if the new high water level is zero and the queue was
empty.

* The high water check in taskprocessor_push() was off by one.

Change-Id: I687729fb4efa6a0ba38ec9c1c133c4d407bc3d5d
2016-08-11 11:59:08 -05:00
Richard Mudgett
e1248c3075 res_pjsip: Make aor named lock a mutex.
The named aor lock was always being locked for writes so a rwlock adds no
benefit and may be slower because rwlocks are biased toward read locking.

Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28
2016-08-11 11:57:51 -05:00
Richard Mudgett
6e40334d89 pjsip_distributor.c: Add missing allocation failure check.
Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28
2016-08-11 11:56:24 -05:00