Commit Graph

27976 Commits

Author SHA1 Message Date
Alexei Gradinari
b494b9f88c compilation failed with -Werror=maybe-uninitialized
The compilation failed for devmode
--enable DONT_OPTIMIZE
--enable BETTER_BACKTRACES
--enable DO_CRASH
--enable TEST_FRAMEWORK

res_pjsip/pjsip_configuration.c: In function dtls_handler:
res_pjsip/pjsip_configuration.c:974:20: error:
back may be used uninitialized in this function [-Werror=maybe-uninitialized]
int size = strlen(front);
           ^
cc1: all warnings being treated as errors

Change-Id: I7f082ead0312792a577ec7c73015ba64dabca580
2016-08-19 11:21:01 -04:00
Kevin Harwell
cab6975b02 sip_to_pjsip: Set correct tls transport method
A recent update had a copy/paste error where the unused variable 'val' was
being passed to the set_value function instead of the 'method' value itself.

This patch passes in the right variable.

ASTERISK-22374

Change-Id: I895b7b3779ce4442bc58b8ec40d59dd29bb43f06
2016-08-18 12:10:27 -05:00
Joshua Colp
43254c2db7 Merge "sip_to_pjsip: Parse register even with transport." into 13 2016-08-18 11:50:11 -05:00
Joshua Colp
e3d72c7aee Merge "sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit." into 13 2016-08-18 11:49:47 -05:00
Joshua Colp
e1ef9e697e Merge "sip_to_pjsip: Map (session-)timers correctly." into 13 2016-08-18 11:49:04 -05:00
Joshua Colp
f5165fd0aa Merge "sip_to_pjsip: Add cert_file and ca_list_path." into 13 2016-08-18 11:48:43 -05:00
Joshua Colp
9426627452 Merge "sip_to_pjsip: Write username even without authname." into 13 2016-08-18 11:48:13 -05:00
Joshua Colp
02f5d30739 Merge "sip_to_pjsip: Map the TLS method correctly." into 13 2016-08-18 11:47:38 -05:00
Joshua Colp
1ae280ed6c Merge "sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent." into 13 2016-08-18 11:46:25 -05:00
Joshua Colp
02f2937f48 Merge "sip_to_pjsip: Write media_encryption." into 13 2016-08-18 11:46:02 -05:00
Joshua Colp
3a22938d12 Merge "sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry." into 13 2016-08-18 11:45:41 -05:00
Alexander Traud
2381ddde63 sip_to_pjsip: Map the TLS method correctly.
When using the migration script sip_to_pjsip.py and tlsclientmethod is not set
in sip.conf, the default value of chan_sip (sslv23) is copied to pjsip.conf, to
overwrite the default of the PJProject (tlsv1). This makes sure, res_pjsip is
offering/using not just TLSv1.0 but TLSv1.2 as well.

ASTERISK-22374

Change-Id: Ie530a3dae9926ae14f3920a21be1e2edb15bda4f
2016-08-18 08:32:54 -05:00
Alexander Traud
6500f5e138 sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent.
When using the migration script sip_to_pjsip.py, no section of type=system or
type=general were created. Therefore the keys compactheaders, timerb, timert1,
and useragent were not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I318a453843227ea36bf130d392d4abd7bd26b5a1
2016-08-18 08:31:34 -05:00
Alexander Traud
21e9c69e56 sip_to_pjsip: Map (session-)timers correctly.
When using the migration script sip_to_pjsip.py, session-timers=accept and
session-timers=refuse were mapped to wrong values.

ASTERISK-22374

Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092
2016-08-18 08:30:27 -05:00
Alexander Traud
c9a97398f7 sip_to_pjsip: Write username even without authname.
When using the migration script sip_to_pjsip.py, now the (mandatory) username is
written to pjsip.conf, even if there was no (optional) authname in the register
string in sip.conf.

ASTERISK-22374

Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f
2016-08-18 08:29:00 -05:00
Alexander Traud
60275359bc sip_to_pjsip: Parse register even with transport.
When using the migration script sip_to_pjsip.py and the register string
started with a transport in sip.conf - like tls://... - register was not parsed
correctly and therefore not migrated correctly to pjsip.conf.

ASTERISK-22374

Change-Id: I44c12104eea2bd8558ada6d25d77edfecd92edd2
2016-08-18 08:27:59 -05:00
Alexander Traud
0d479232eb sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit.
When using the migration script sip_to_pjsip.py, those keys got missing. These
keys might appear several times and the function "merge_value" tried to collect
those. However, because these keys have different names in sip.conf and
pjsip.conf, "merge_value" was not able to find the new key name in sip.conf.
This change lets "merge_value" search with the old key name in sip.conf and
write with the new key name in pjsip.conf.

ASTERISK-22374

Change-Id: Ie53c5278ae6f1cb8fa7e96c5289877d46981d9d2
2016-08-18 08:27:04 -05:00
Alexander Traud
5f33e99534 sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry.
When using the migration script sip_to_pjsip.py, defaultexpiry, maxexpiry, and
minexpiry were not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I007fbf543dcadc96fc3ed71c54da502bcb209b7b
2016-08-18 08:25:04 -05:00
Alexander Traud
231ea0350d sip_to_pjsip: Write media_encryption.
When using the migration script sip_to_pjsip.py, encryption=yes got missing and
media_encryption=sdes was not written to pjsip.conf, because of a typo.

ASTERISK-22374

Change-Id: I0fc3e55dc512a57603ae0fef41baacccf2a35c05
2016-08-18 08:24:13 -05:00
Alexander Traud
0b675a208b sip_to_pjsip: Add cert_file and ca_list_path.
When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were
not migrated to pjsip.conf.

ASTERISK-22374

Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825
2016-08-18 08:22:35 -05:00
Richard Mudgett
1cd12d73a6 res_pjsip_session.c: Fix unbound srv failover tests.
Commit 1b666549f3 broke the srv failover
functionality if a TCP connection gets disconnected.  Under these
conditions, session_inv_on_state_changed() gets a
PJSIP_EVENT_TRANSPORT_ERROR and restarts the INVITE transaction on a new
transport.  Unfortunately, session_inv_on_tsx_state_changed() also gets
the same PJSIP_EVENT_TRANSPORT_ERROR event and unconditionally terminates
the session.

* Made session_inv_on_tsx_state_changed() complete terminating the session
on PJSIP_EVENT_TRANSPORT_ERROR only if the session state is still
PJSIP_INV_STATE_DISCONNECTED.

ASTERISK-26305 #close
Reported by: Richard Mudgett

Change-Id: If736e766b5c55b970fa38ca6c8a885caf27b897d
2016-08-17 16:38:19 -05: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