aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_phoneprov.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-14Merged revisions 328247 via svnmerge from lmadsen1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-03-10Merged revisions 310240 via svnmerge from twilson1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r310240 | twilson | 2011-03-10 10:05:45 -0600 (Thu, 10 Mar 2011) | 13 lines Add \r\n to remaining http headers passed to ast_http_send r309204 changed the behavior of ast_http_send. It now requires headers to be passed with trailing \r\n. This change updates the remaining instances in the code that did not pass the \r\n. (closes issue #18186) Reported by: nivaldomjunior Patches: res_phoneprov.c.diff uploaded by lathama (license 1028) manager.diff.txt uploaded by twilson (license 396) Tested by: lathama ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@310241 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-15Don't send files twice and remove extra \r\n from headertwilson1-14/+3
After the manager http auth changes, we forgot to remove the manual sending of the file. Also, ast_http_send adds two \r\n to the header that is passed to it, so a trailing \r\n is removed from the Content-type header. It might be better to change ast_http_send, but I don't like changing the behavior of an API function. (closes issue #17239) Reported by: cjacobsen Patches: patch2.diff uploaded by cjacobsen (license 1029) Tested by: lathama, cjacobsen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270660 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-24Instead of crashing, allocate our header ast_str before we try to use it.seanbright1-0/+2
(closes issue #16680) Reported by: lmadsen Patches: issue16680_20100122.patch uploaded by seanbright (license 71) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@242607 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-15Convert a few places to use ast_calloc_with_stringfields where applicable.seanbright1-13/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240368 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Recorded merge of revisions 222152 via svnmerge from kpfleming1-0/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines Fix ao2_iterator API to hold references to containers being iterated. See Mantis issue for details of what prompted this change. Additional notes: This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK has become an enum instead of a macro, with a name that fits our naming policy; also, it is now necessary to call ao2_iterator_destroy() on any iterator that has been created. Currently this only releases the reference to the container being iterated, but in the future this could also release other resources used by the iterator, if the iterator implementation changes to use additional resources. (closes issue #15987) Reported by: kpfleming Review: https://reviewboard.asterisk.org/r/383/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@222176 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-09gcc 4.4 fix: union instead of casttzafrir1-4/+7
gcc 4.4 has more strict rules for aliasing. It doesn't like a struct sockaddr_in pointer pointing to a struct sockaddr. So we make it a union. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@217445 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-06Move function PP_EACH_USER and PP_EACH_EXTENSION documentation to XML.eliel1-13/+31
Move function PP_EACH_USER and PP_EACH_EXTENSION documentation to the new AstXML form. (issue #15245) Reported by: eliel Patches: res_phoneprov_static_conversion.txt uploaded by lmadsen (license 10) (with PP_EACH_USER add by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@199411 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29fix typosjpeeler1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191213 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29Merge str_substitution branch.tilghman1-27/+75
This branch adds additional methods to dialplan functions, whereby the result buffers are now dynamic buffers, which can be expanded to the size of any result. No longer are variable substitutions limited to 4095 bytes of data. In addition, the common case of needing buffers much smaller than that will enable substitution to only take up the amount of memory actually needed. The existing variable substitution routines are still available, but users of those API calls should transition to using the dynamic-buffer APIs. Reviewboard: http://reviewboard.digium.com/r/174/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-23Support HTTP digest authentication for the http manager interface.tilghman1-59/+32
(closes issue #10961) Reported by: ys Patches: digest_auth_r148468_v5.diff uploaded by ys (license 281) SVN branch http://svn.digium.com/svn/asterisk/team/group/manager_http_auth Tested by: ys, twilson, tilghman Review: http://reviewboard.digium.com/r/223/ Reviewed by: tilghman,russellb,mmichelson git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190349 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18a few more namespace updates... res_ael_share still needs some work before ↵kpfleming1-1/+1
this can be merged to other release branches git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182848 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-09Don't leak memory if phoneprov.conf does not existtwilson1-0/+1
(closes issue #14203) Reported by: jamesgolovich Patches: asterisk-phoneprovleak.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168142 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-30Fix some svn:keywordstwilson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166908 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17Polycom phones close the connection after reading a little bit of the ↵twilson1-1/+6
firmware files, we should stop sending in that case. Also, make that case print out a debug statement instead of a scary WARNING. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165219 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-25This is basically a complete rollback of r155401, as it was determined thatseanbright1-6/+6
it would be best to maintain API compatibility. Instead, this commit introduces ao2_callback_data() which is functionally identical to ao2_callback() except that it allows you to pass arbitrary data to the callback. Reviewed by Mark Michelson via ReviewBoard: http://reviewboard.digium.com/r/64 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158959 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-14Cleanup whitespace issuestwilson1-29/+29
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156918 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-14Use Mark's new ast_str_case_hash function instead of jumping through hoops ↵twilson1-19/+4
to do insensitive case lookups git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156916 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-11Add LINEKEYS variable to allow for a user to set the number of keys assigned ↵dbailey1-0/+6
to a line on a polycom phone git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155934 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07Add ability to pass arbitrary data to the ao2_callback_fn (called fromseanbright1-6/+6
ao2_callback and ao2_find). Currently, passing OBJ_POINTER to either of these mandates that the passed 'arg' is a hashable object, making searching for an ao2 object based on outside criteria difficult. Reviewed by Russell and Mark M. via ReviewBoard: http://reviewboard.digium.com/r/36/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵kpfleming1-1/+3
branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-16func_strings isn't a dependency of this module anymoretwilson1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150118 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-16inter-module dependencies should be included in the source code, not just in ↵kpfleming1-0/+4
sample config files git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149920 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-16correct file name in messagekpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149918 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09Make phoneprov case-insensitive to remove the func_strings dependency of the ↵twilson1-5/+19
default config git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147854 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-24Blanch the 404 error message for those with no sense of humordbailey1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingtilghman1-3/+3
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29Merged revisions 140488 via svnmerge from mmichelson1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines After working on the ao2_containers branch, I noticed something a bit strange. In all cases where we provide a callback function to ao2_container_alloc, the callback function would only return 0 or CMP_MATCH. After inspecting the ao2_callback() code carefully, I found that if you're only looking for one specific item, then you should return CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue traversing the current bucket until the end searching for more matches. In cases like chan_iax2 where in 1.4, all the peers are shoved into a single bucket, this makes for potentially terrible performance since the entire bucket will be traversed even if the peer is one of the first ones come across in the bucket. All the changes I have made were for cases where the callback function defined was passed to ao2_container_alloc so that calls to ao2_find could find a unique instance of whatever object was being stored in the container. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140489 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10All of the res/ stuff (other than res_jabber) from the RSW branch.seanbright1-10/+10
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137028 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-14Need a new buffer for each looptwilson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114127 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-14Don't unref user twice on failure. Also, when adding sorted list of users, ↵twilson1-2/+1
it is best to check the entry already in the list for a "next" entry instead of the newly created entry... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114124 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-11Make sure that ${LINE} is set even if linenumber is not set in users.conftwilson1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114080 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-11Fix the fact that global_variables 1) weren't being updated on reload ↵twilson1-24/+51
(thanks for the report, Doug), and 2) weren't actually being appended to the list of profile variables because build_profile was called before the list was populated. Also needed to free the contents returned by load_file(). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114067 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-07atoi(NULL) is badtwilson1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113170 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-05Clean up some memory leak/ref counting issuestwilson1-22/+43
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112939 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-05Multi-line support for phoneprovtwilson1-138/+343
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112906 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-02Re-add HTTP post support by moving to res_http_post.ctwilson1-2/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112426 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19ensure that res_phoneprov's HTTP handler tells the dispatcher what method it ↵kpfleming1-0/+1
can handle git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109926 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18start the process of changing HTTP request dispatching to do it based on ↵kpfleming1-2/+3
*both* URI and method, so that POST support can move into a module; move http.c's private function prototypes into _private.h git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109762 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Go through and fix a bunch of places where character strings were being ↵twilson1-1/+1
interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Rename ast_tcptls_server_instance to session_instance, since this pertains torussell1-1/+1
server and client usage. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108295 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04Rename public object server_instance to ast_tcptls_server_instancerussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105773 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04Set username to default to the category name if it isn't overridden by a ↵twilson1-1/+7
usernmae= setting in users.conf git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105733 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26fix this module, toorussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104260 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-15Fix up some doxygen issues.qwell1-1/+1
(closes issue #11996) Patches: bug_11996_doxygen.diff uploaded by snuffy (license 35) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103723 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-24Merged revisions 100138 via svnmerge from qwell1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100138 | qwell | 2008-01-24 10:41:29 -0600 (Thu, 24 Jan 2008) | 6 lines Fix compilation on Solaris. (closes issue #11832) Patches: bug-11832.diff uploaded by snuffy (license 35) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100139 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17Update res_phoneprov to default to setting the SERVER variable to the IPtwilson1-21/+44
the HTTP request for the config came in on and the SERVER_PORT to the bindport setting in sip.conf. I've left in the ability to override these options, because I can't always guess how someone might decide to do something weird with what is available to them--although needing to is pretty unlikely. Documentation was updated to reflect preference for not setting serveraddr, serveriface, or serverport. Tested on Linux and OS X. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98988 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-16Make users list statictwilson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98962 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Attempt at making lookup_iface work under FreeBSD. Not yet tested, but it ↵twilson1-11/+9
compiles under OS X. And still works under linux. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97653 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Added a new module, res_phoneprov, which allows auto-provisioning of phonestwilson1-0/+1012
based on configuration templates that use Asterisk dialplan function and variable substitution. It should be possible to create phone profiles and templates that work for the majority of phones provisioned over http. It is currently only intended to provision a single user account per phone. An example profile and set of templates for Polycom phones is provided. NOTE: Polycom firmware is not included, but should be placed in AST_DATA_DIR/phoneprov/configs to match up with the included templates. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97634 f38db490-d61c-443f-a65b-d21fe96a405b