summaryrefslogtreecommitdiff
path: root/res/res_pjsip_notify.c
AgeCommit message (Collapse)Author
2018-01-24Remove redundant module checks and references.Corey Farrell
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-15loader: Add dependency fields to module structures.Corey Farrell
* 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
2017-12-15aco: Minimize use of regex.Corey Farrell
Remove nearly all use of regex from ACO users. Still remaining: * app_confbridge has a legitamate use of option name regex. * ast_sorcery_object_fields_register is implemented with regex, all callers use simple prefix based regex. I haven't decided the best way to fix this in both 13/15 and master. Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
2016-03-07res_pjsip: Strip spaces from items parsed from comma-separated listsGeorge Joseph
Configurations like "aors = a, b, c" were either ignoring everything after "a" or trying to look up " b". Same for mailboxes, ciphers, contacts and a few others. To fix, all the strsep(&copy, ",") calls have been wrapped in ast_strip. To facilitate this, ast_strip, ast_skip_blanks and ast_skip_nonblanks were updated to handle null pointers. In some cases, an ast_strlen_zero() test was added to skip consecutive commas. There was also an attempt to ast_free an ast_strdupa'd string in ast_sip_for_each_aor which was causing a SEGV. I removed it. Although this issue was reported for realtime, the issue was in the res_pjsip modules so all config mechanisms were affected. ASTERISK-25829 #close Reported-by: Mateusz Kowalski Change-Id: I0b22a2cf22a7c1c50d4ecacbfa540155bec0e7a2
2015-11-24res_pjsip_notify: Fix CLI usage infoCorey Farrell
The usage info for 'pjsip send notify' previously referenced the chan_sip configuration sip_notify.conf. Fix this to reference the correct configuration pjsip_notify.conf. ASTERISK-25590 #close Change-Id: I3898271a8e8a8b1db201741e790ebe2c6bf5cdea
2015-05-13AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.Rodrigo Ramírez Norambuena
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-03-26res_pjsip: Enable unload of all modules at shutdown.Corey Farrell
* Move most of res_pjsip:module_unload to unload_pjsip to resolve crashes caused by running PJSIP functions from non-PJSIP threads. * Remove call to pjsip_endpt_destroy(ast_pjsip_endpoint), it was causing crashes in some cases. In theory pj_shutdown() should take care of this. * Mark res_pjsip_keepalive and res_pjsip_session as allowed to unload at shutdown. * Resolve leaked config global in res_pjsip_notify. * Unregister pubsub pjsip service module. * Implement cleanup for res_pjsip_session. ASTERISK-24731 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4498/ ........ Merged revisions 433469 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-16PJSIP: Enforce module load dependenciesKinsey Moore
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-09-19res_pjsip_notify: Fix crash on unload/load and don't say the module doesn't ↵Joshua Colp
exist on reload. When unloading the module did not unregister the CLI commands causing a crash upon load when they were registered again. When reloading the module the return value from the config options framework was not checked to determine if an error occurred or not. This caused a message to be output saying the module did not exist when reloading if no changes were present. AST-1433 #close AST-1434 #close ........ Merged revisions 423579 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 423580 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31PJSIP: Send Notify AMI and CLI commands can now send to URI instead of endpointJonathan Rose
Review: https://reviewboard.asterisk.org/r/3817/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25Add module support level to ast_module_info structure. Print it in CLI ↵Mark Michelson
"module show" . ASTERISK-23919 #close Reported by Malcolm Davenport Review: https://reviewboard.asterisk.org/r/3802 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-10PJSIP: PJSIPNotify - Strip content-length headers and add documentationJonathan Rose
Documentation for how to add custom headers/content to notifies created with the PJSIPNotify manager action was a little sparse and it also wasn't vetting application of Content-length headers like its chan_sip equivalent was (so two Content-length headers could be applied... and PJSIP determines the content length anyway, so it just opens people up for error). This patch also flips the variable order so that the variables are interpreted in the same order as they are put in the AMI action. Review: https://reviewboard.asterisk.org/r/3587/ ........ Merged revisions 415658 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15PJSIP: Add Path header supportKinsey Moore
This adds Path support to chan_pjsip in res_pjsip_path.c with minimal additions in res_pjsip_registrar.c to store the path and additions in res_pjsip_outbound_registration.c to enable advertisement of path support to registrars and intervening proxies. Path information is stored on contacts and is enabled via Address of Record (AoRs) and Registration configuration sections. While adding path support, it became necessary to be able to add SIP supplements that handled messages outside of sessions, so a framework for handling these types of hooks was added in parallel to the already-existing session supplements and several senders of out-of-dialog requests were refactored as a result. (closes issue ASTERISK-21084) Review: https://reviewboard.asterisk.org/r/3050/ ........ Merged revisions 405565 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28res_pjsip_notify: Add documentationMatthew Jordan
We forgot to add documentation for res_pjsip_notify, which would prevent it from being loaded. Whoops. This patch also updates res_pjsip_notify to use pjsip_notify.conf, which now has its own sample file in the configs directory as well. Review: https://reviewboard.asterisk.org/r/2835/ ........ Merged revisions 400121 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06Fix crash in res_pjsip_outbound_registration when the remote server can not ↵Joshua Colp
be resolved. This crash was caused by decrementing the reference count of a newly created message when it should not be. This change fixes that but also fixes all other cases where this was incorrectly done. (closes issue ASTERISK-22188) Reported by: Kinsey Moore git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Add CLI/AMI commands to force chan_pjsip actionsKinsey Moore
For chan_pjsip, this introduces CLI/AMI remote unregistration commands, reworks CLI syntax for sending NOTIFYs, adds AMI qualification support, and adds documentation for PJSIPNotify. This also fixes two refcounting bugs in the outbound registration code. Review: https://reviewboard.asterisk.org/r/2695/ (closes issue ASTERISK-21939) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30The large GULP->PJSIP renaming effort.Mark Michelson
The general gist is to have a clear boundary between old SIP stuff and new SIP stuff by having the word "SIP" for old stuff and "PJSIP" for new stuff. Here's a brief rundown of the changes: * The word "Gulp" in dialstrings, functions, and CLI commands is now "PJSIP" * chan_gulp.c is now chan_pjsip.c * Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*" * All files that were "res_sip*" are now "res_pjsip*" * The "res_sip" directory is now "res_pjsip" * Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*" * The configuration file is now "pjsip.conf" instead of "res_sip.conf" * The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP" * CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as the starting word instead of "sip" git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3