summaryrefslogtreecommitdiff
path: root/res/res_pjsip_config_wizard.c
AgeCommit message (Collapse)Author
2017-11-06res_pjsip_config_wizard: Fix leaks and add check for malloc failure.Corey Farrell
wizard_apply_handler(): - Free host if we fail to add it to the vector. wizard_mapped_observer(): - Check for otw allocation failure. - Free otw if we fail to add it to the vector. Change-Id: Ib5d3bcabbd9c24dd8a3c9cc692a794a5f60243ad
2017-03-28res_pjsip_config_wizard: Add 2 new parameters to help with proxy configGeorge Joseph
Two new parameters have been added to the pjsip config wizard. * Setting 'sends_line_with_registrations' to true will cause the wizard to skip the creation of an identify object to match incoming request to the endpoint and instead add the line and endpoint parameters to the outbound registration object. * Setting 'outbound_proxy' is a shortcut for adding individual endpoint/outbound_proxy, aor/outbound_proxy and registration/outbound_proxy parameters. Change-Id: I678e5f80765734c056620528a6d40d82736ceeb0 (cherry picked from commit a827892ff77cd37912b528d9c45b446be091bbc0) (cherry picked from commit 27344675be1941d30508c6e6bd684acdd0791e1a)
2017-01-04core/pbx: dialplan show - display filename/line#Jonathan R. Rose
Adds the ability for extensions to be registered to include filename and line number so that dialplan show output can show the filename and line number of a config file responsible for generating a given extension. This only affects config modules that are written to use the new extension registering functions. In this patch, that only includes pbx_config, so extensions registered in extensions.conf and any included extension will be shown in this manner. Extensions registered in this manner will show the filename and line number *instead* of the registrar. ASTERISK-26658 #close Reported by: Jonathan R. Rose Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
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
2016-10-10res_pjsip_config_wizard: Memory leak in module_unloadBadalyan Vyacheslav
Fixed a memory leak. It removes only the first element. Added a useful feature in vector.h to remove all items under the CMP through a callback function / macro. ASTERISK-26453 #close Change-Id: I84508353463456d2495678f125738e20052da950
2016-02-15res_pjsip_config_wizard: Add command to export primitive objectsGeorge Joseph
A new command (pjsip export config_wizard primitives) has been added that will export all the pjsip objects it created to the console or a file suitable for reuse in a pjsip.conf file. ASTERISK-24919 #close Reported-by: Ray Crumrine Change-Id: Ica2a5f494244b4f8345b0437b16d06aa0484452b
2015-05-15res_pjsip_config_wizard/config: Fix template processingGeorge Joseph
The config wizard was always pulling the first occurrence of a variable from an ast_variable list but this gets the template value from the list instead of any overridden value. This patch creates ast_variable_find_last_in_list() in config.c and updates res_pjsip_config_wizard to use it instead of ast_variable_find_in_list. Now the overridden values, where they exist, are used instead of template variables. Updated test_config to test the new API. ASTERISK-25089 #close Reported-by: George Joseph <george.joseph@fairview5.com> Tested-by: George Joseph <george.joseph@fairview5.com> Change-Id: Ifa7ddefc956a463923ee6839dd1ebe021c299de4
2015-05-13AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.Rodrigo Ramírez Norambuena
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-10res_pjsip_config_wizard: Cleanup load unloadGeorge Joseph
While investigating other unload issues I realized that the load/unload process for the config wizard was pretty ugly so I've refactored it as follows... When the res_pjsip sorcery instance is created the config_wizard bumps it's own module reference to prevent it from unloading while the sorcery instance is still active. When res_pjsip unloads and it's sorcery instance is destroyed, the config wizard unrefs itself which then allows itself to unload cleanly. Since the config wizard now can't load after res_pjsip or unload before it (which should have been the correct behavior all along), I was able to remove the chunks of code in both load_module and unload_module that handled that case. Ran the testsuite tests to insure there were no functional changes and REF_DEBUG to insure that Asterisk was shutting down cleanly with no FRACKs or leaks. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4610/ ........ Merged revisions 434619 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-10res_pjsip_config_wizard: Add ability to auto-create hints.George Joseph
Looking at the Super Awesome Company sample reminded me that creating hints is just plain gruntwork. So you can now have the pjsip conifg wizard auto-create them for you. Specifying 'hint_exten' in the wizard will create 'exten => <hint_exten>,hint/PJSIP/<wizard_id>' in whatever is specified for 'hint_context'. Specifying 'hint_application' in the wizard will create 'exten => <hint_exten>,1,<hint_application>' in whatever is specified for 'hint_context'. The default for 'hint_context' is the endpoint's context. There's no default for 'hint_application'. If not specified, no app is added. There's no default for 'hint_exten'. If not specified, neither the hint itself nor the application will be created. Some may think this is the slippery slope to users.conf but hints are a basic necessity for phones unlike voicemail, manager, etc that users.conf creates. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4383/ ........ Merged revisions 431643 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-23Add depend on pjproject to res_pjsip_config_wizard.cDavid M. Lee
........ Merged revisions 431030 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-18res_pjsip_config_wizard: fix unload SEGVGeorge Joseph
If certain pjsip modules aren't loaded, the wizard causes a SEGV when it unloads. Added a check for the presense of the object type wizard before trying to clean it up. Tested-by: George Joseph ........ Merged revisions 429719 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-17res_pjsip_config_wizard: Change FILEUNCHANGED config_load2 flag determinationGeorge Joseph
The module now applies the FILEUNCHANGED flag when both reloaded is specified AND there's no last_config for the object type. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4276/ ........ Merged revisions 429699 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-16res_pjsip_config_wizard: fix test breakageGeorge Joseph
Fix test breakage caused by not checking for res_pjsip before calling ast_sip_get_sorcery. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4269/ ........ Merged revisions 429653 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-15res_pjsip_config_wizard: Allow streamlined config of common pjsip scenariosGeorge Joseph
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