Commit Graph

16 Commits

Author SHA1 Message Date
George Joseph 315d296b97 Initial commit for certified-20.7
(cherry picked from commit f631eda4fd)
2024-03-18 18:14:03 +00:00
Corey Farrell 527cf5a570 Remove redundant module checks and references.
This removes references that are no longer needed due to automatic
references created by module dependencies.

In addition this removes most calls to ast_module_check as they were
checking modules which are listed as dependencies.

Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
2018-01-24 13:37:29 -05:00
Corey Farrell 9cfdb81e91 loader: Add dependency fields to module structures.
* Declare 'requires' and 'enhances' text fields on module info structure.
* Rename 'nonoptreq' to 'optional_modules'.
* Update doxygen comments.

Still need to investigate dependencies among modules I cannot compile.

Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
2018-01-15 13:25:51 -05:00
Sean Bright 0b9d2135a9 res_pjsip: Assign support levels to a few modules
Change-Id: I51f6945c4023cb93fc7b87be5ab4c50e9e6ee27d
2017-12-12 11:07:33 -06:00
Rodrigo Ramírez Norambuena eec010829a AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-05-13 16:34:23 -05:00
George Joseph ed6b6e3c03 res_pjsip_phoneprov_provider: Fix reference leak on unload
res_pjsip_phoneprov_provider was leaking references to phoneprov objects due to 
a missing OBJ_NODATA in an ao2_callback in load_users().  Rather than adding the 
OBJ_NODATA, I changed load_users to use a more straightforward ao2_iterator.  
This plugged the leak but exposed an unload order issue between 
res_pjsip_phoneprov_provider, res_phoneprov and res_pjsip.

res_pjsip_phoneprov_provider unloads first, then res_phoneprov, then res_pjsip.  
Since res_pjsip_phoneprov_provider uses res_pjsip's sorcery instance, when it 
unloads, it's objects are still in the sorcery instance.  When res_pjsip 
unloads, it destroys all its objects including res_pjsip_phoneprov_provider's.  
The phoneprov destructor then attempts to unregister the extension from 
res_phoneprov but because res_phoneprov is already cleaned up, its users 
container is gone and we get a FRACK.

Simple solution, check for the NULL users container before attempting to remove 
the entry. Duh.

Ran tests/res_phoneprov/res_phoneprov_provider.  No leaks in 
res_pjsip_phoneprov_provider and no FRACKs.

Reported-by: Corey Farrell
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4608/
ASTERISK-24935 #close
........

Merged revisions 434545 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-09 23:12:13 +00:00
Corey Farrell ffd7319df3 res_pjsip_phoneprov_provider: Revert 433996 / 433997.
res_pjsip_phoneprov_provider is using ao2_callback with OBJ_MULTIPLE, then
ignoring the return.  OBJ_NODATA flag was to prevent a reference leak, but
this caused the module to FRACK on unload.  Revert change until this can
be investigated further.

ASTERISK-24935
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4578/
........

Merged revisions 434025 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-06 15:17:18 +00:00
Corey Farrell e6f0410028 res_pjsip_phoneprov_provider: Fix leaked OBJ_MULTIPLE iterator.
res_pjsip_phoneprov_provider was using ao2_callback with OBJ_MULTIPLE, then
ignoring the return.  Added OBJ_NODATA flag to prevent a reference leak.

ASTERISK-24935 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4578/
........

Merged revisions 433996 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-05 12:55:21 +00:00
George Joseph b137a92aef res_pjsip_phoneprovi_provider: Fix reload
Reloading wasn't working correctly because on a reload, the sorcery apply
handler was never being called for unchanged users.  So, instead of using
an apply handler, I'm now iterating over all users.  Works much more reliably.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4288/
........

Merged revisions 429914 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-22 00:17:49 +00:00
George Joseph 39b54a21dc res_pjsip_config_wizard: Allow streamlined config of common pjsip scenarios
res_pjsip_config_wizard
------------------
 * This is a new module that adds streamlined configuration capability for
   chan_pjsip.  It's targetted at users who have lots of basic configuration
   scenarios like 'phone' or 'agent' or 'trunk'.  Additional information
   can be found in the sample configuration file at
   config/samples/pjsip_wizard.conf.sample.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4190/
........

Merged revisions 429592 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-15 17:08:24 +00:00
George Joseph 4394e0431c sorcery: Make is_object_field_registered handle field names that are regexes.
As a result of https://reviewboard.asterisk.org/r/3305, res_sorcery_realtime
was tossing database fields that didn't have an exact match to a sorcery
registered field.  This broke the ability to use regexes as field names which
manifested itself as a failure of res_pjsip_phoneprov_provider which uses
this capability.  It also broke handling of fields that start with '@' in
realtime but I don't think anyone noticed.

This patch does the following...
* Modifies ast_sorcery_fields_register to pre-compile the name regex.
* Modifies ast_sorcery_is_object_field_registered to test the regex if it
  exists instead of doing an exact strcmp.
* Modifies res_pjsip_phoneprov_provider with a few tweaks to get it to work
  with realtime.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4185/
........

Merged revisions 428543 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 428544 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21 17:49:39 +00:00
Kinsey Moore 86a4ce4957 PJSIP: Enforce module load dependencies
This enforces that res_pjsip, res_pjsip_session, and res_pjsip_pubsub
have loaded properly before attempting to load any modules that depend
on them since the module loader system is not currently capable of
resolving module dependencies on its own.

ASTERISK-24312 #close
Reported by: Dafi Ni
Review: https://reviewboard.asterisk.org/r/4062/
........

Merged revisions 425690 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425691 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-16 16:32:25 +00:00
George Joseph 527b58aeb7 res_phoneprov: Create accessor for ast_phoneprov_std_variable_lookup
Based on feedback from Richard, I created an accessor for
res_phoneprov/ast_phoneprov_std_variable_lookup and added
load priority to AST_MODULE_INFO.

Tested-by: George Joseph
Tested-by: Richard Mudgett

Review: https://reviewboard.asterisk.org/r/4076/
........

Merged revisions 425480 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425481 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-14 18:13:33 +00:00
Joshua Colp c46100ad5f res_pjsip_phoneprov_provider: Add missing dependency on pjproject.
........

Merged revisions 425216 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425217 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10 14:24:57 +00:00
George Joseph aef63118da res_pjsip_phoneprov_provider: fix compile breakage on AST_VECTOR
endpoint->inbound_auths was changed to a vector in 13 and I
committed the 12 patch instead of the 13 patch.

Tested-by: George Joseph
........

Merged revisions 425052 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 23:37:49 +00:00
George Joseph c6837c236f res_pjsip_phoneprov_provider: Provides pjsip integration with res_phoneprov
This module allows res_pjsip to integrate with res_phoneprov.  It handles
the pjsip 'phoneprov' object type.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3976/
........

Merged revisions 425007 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425008 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 20:55:50 +00:00