aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2006-10-25Adding comments in the source is more persistent than just adding themoej1-1/+3
to the commit message :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46184 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25Always add doxygen comments to new functions, more lines than one areoej1-2/+3
appreciated really. (Read the coding guidelines). I've worked hard to make chan_sip a better place to code in, let's keep it that way and don't add more stuff without comments. Thank you. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46183 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25Blocked revisions 46165 via svnmergetilghman0-0/+0
........ r46165 | tilghman | 2006-10-24 23:58:44 -0500 (Tue, 24 Oct 2006) | 2 lines WaitExten truncates decimals of times to wait, instead of accepting them (Bug 8208) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46166 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25Merged revisions 46154 via svnmerge from kpfleming7-10/+35
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46154 | kpfleming | 2006-10-24 19:26:17 -0500 (Tue, 24 Oct 2006) | 2 lines add passthrough and file format support for G.722 16KHz audio (issue #5084, original patch by andrew, updated by mithraen) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46155 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Fix FastAGI to not wait for the non-existant pidmarkster1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46141 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46130 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46130 | file | 2006-10-24 15:29:56 -0400 (Tue, 24 Oct 2006) | 2 lines We need to initialize our scheduler pthread condition... yes. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46131 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24i really think it is safe to commit this version, thatrizzo1-52/+153
simplifies the manager queue handling as described in the comment, and will make a lot easier to make further work on this code. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46120 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24correct fix for the bug i previously introduced - the stringsrizzo1-2/+2
are meant to be always initialized, independently from their content. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46104 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46093 via svnmerge from russell1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46093 | russell | 2006-10-24 01:23:33 -0400 (Tue, 24 Oct 2006) | 3 lines Restore the ability to remove the firmware directory without causing the installation to fail (issue #8111) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46094 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46080 via svnmerge from kpfleming1-20/+26
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46080 | kpfleming | 2006-10-23 22:13:08 -0500 (Mon, 23 Oct 2006) | 2 lines simplify and correct voicemail IMAP storage build instructions ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46081 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46078 via svnmerge from tilghman1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46078 | tilghman | 2006-10-23 22:01:00 -0500 (Mon, 23 Oct 2006) | 3 lines Pass through a frame if we don't know what it is, rather than trying to pass a NULL, which will segfault a channel driver (Bug 8149) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46079 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46067 via svnmerge from russell2-9/+23
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46067 | russell | 2006-10-23 21:27:42 -0400 (Mon, 23 Oct 2006) | 7 lines In muted.c, check the return value of strdup. In ael_main.c, check the return value of calloc. (issue #8157) In passing fix a few minor bugs in ael_main.c. The last argument to strncpy() was a hard-coded 100, where it should have been 99. I changed this to use sizeof() - 1. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46068 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46065 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46065 | russell | 2006-10-23 21:04:14 -0400 (Mon, 23 Oct 2006) | 2 lines Fix the descriptions of some of the MeetMeAdmin options (issue #8098, mflorell) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46066 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Fix a seg fault on a registration. Line 7706, in parse_register_contact,russell1-2/+2
explicitly passes NULL as the "pass" argument to this function. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46055 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23Unlike ast_strdup(), ast_strdupa() does not take a NULL pointer as argument,rizzo1-5/+8
so fix the places where this might happen. This is also a fix that ought to go into 1.4 [The difference between the two functions is a bit confusing, and in asterisk i believe all string handling functions should be able to handl a NULL string as argument, but changing the API in trunk and not in 1.4 would make backporting harder.] git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46045 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23remove a useless check for ocseq = 0.rizzo1-2/+2
As discussed on the mailing lists, 0 is a legal value for Cseq, so there is no point to treat it specially. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46035 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23get_header() always returns a non-NULL value, so checkingrizzo1-7/+15
for NULL is certainly wrong and usually disables the checks that we want to make instead. This commit fixes a number of the above bugs where the result of get_header() is immediately checked for NULL. This is certainly a candidate for merging into 1.4 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46026 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23put another duplicated block of code in a function.rizzo1-20/+18
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46025 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23reformat a statement and comment a potentially wrongrizzo1-9/+5
assignement (altering state on an unvalidated message). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46015 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23Remove unnecessary casts from const char * to char *,rizzo1-15/+13
if necessary by slightly rearranging the code. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46004 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23another use for parse_uri().rizzo1-28/+11
On passing, remove a wrong comment (that probably I wrote myself!) and introduce a temporary variable to avoid a misleading cast. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23Merged revisions 45999 via svnmerge from russell1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45999 | russell | 2006-10-23 13:07:45 -0400 (Mon, 23 Oct 2006) | 2 lines don't crash when an incoming message has no "from" (issue #8205, jmls) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46000 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23use autodetected support for gethostbyname_rrizzo1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45989 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23+ make sure parse_uri never returns NULL pointers - thisrizzo1-33/+17
simplifies its usage. + add another client for parse_uri, in handling Contact: strings (on passing, document the content of the "fullcontact" field); + in register_verify(), mark with XXX what i believe is another misinterpretation on the URI format when '@' is missing. No code changed here, so no fixes applied. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45977 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23After reading better the SIP RFC on sip URI (19.1.1)rizzo1-10/+27
fix parse_uri() to interpret a missing userinfo section as a domain-only URI, and comment a wrong interpretation of the above in check_user_full(). The function has been patched to preserve the existing behaviour (in what admittedly is a corner case, but could be received under attacks). Hopefully the From: based matching will go away soon! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45976 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23in function get_also_info(), move argument strippingrizzo1-3/+3
before splitting around the @, otherwise the refer_to_domain might contain arguments as well, causing failures. I think this is a true bug that ought to be fixed in 1.4 as well. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45966 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23start putting the URI parsing code in one place,rizzo1-11/+70
introducing the function parse_uri() that splits a URI in its components. Right now use it only in one place, because the custom parsing that is done here and there sometimes has bugs that i want to figure out first. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45965 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23put common code in function terminate_uri() so we need torizzo1-16/+25
fix it only in one place. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45955 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23More cleanup of check_user_full with no functional changerizzo1-213/+276
apart from a small (but disabled by default) new option. In detail: + introduce a new value for enum check_auth_result, AUTH_DONT_KNOW, used (read below) when a function does not have a conclusive response. Possibly this is the same as AUTH_NOT_FOUND, but need to check further. + move the large blocks (checking in the users list and in the peers list, respectively) from check_user_full() to separate functions. They return AUTH_DONT_KNOW in case they don't find a match, so the caller know that it has to try the next method. There is still some duplication of code here, but i have not tried yet to remove it. + [new option] a new option in sip.conf, match_auth_username, has been introduced, and disabled by default. If set, and the incoming request carries authentication info, the username to match in the users list is taken from there rather than from the From: field. This change is easy to identify, being made of - one line to declare the variable match_auth_username - a block of 15 lines in check_user_full() - one line in sip list settings - two lines for parsing the config file. check_user_full() is now a lot cleaner - basically a sequence of checks that are applied to the request. This will help future work with new matching schemes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45945 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-23Merged revisions 45928 via svnmerge from file1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r45928 | file | 2006-10-22 20:27:39 -0400 (Sun, 22 Oct 2006) | 10 lines Merged revisions 45927 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r45927 | file | 2006-10-22 20:25:28 -0400 (Sun, 22 Oct 2006) | 2 lines Don't leak memory mmmk? ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45929 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22Merged revisions 45916 via svnmerge from crichter1-1/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r45916 | crichter | 2006-10-22 23:44:46 +0200 (Sun, 22 Oct 2006) | 9 lines Merged revisions 45808 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r45808 | crichter | 2006-10-21 14:35:13 +0200 (Sat, 21 Oct 2006) | 1 line fixed issue, that if chan_misdn is loaded and couldn't be initialized it would cause a segfault after 'reload'. Reported by Drew/Matt thx. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45917 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22more streamlining of check_user_fullrizzo1-13/+15
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45915 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22simplify the flow of function check_user_full()rizzo1-13/+11
A large block needs reindentation now, but we don't do that because it can be moved to a separate function. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45905 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22put duplicated code in functions.rizzo1-35/+38
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45904 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22regenerate the configure script and autoconfig.h.in to reflect recent changesrussell2-1/+236
for https support for the built in http server git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45893 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22Fix a few issues in the previous (disabled) HTTPS code,rizzo4-25/+66
and support linux as well (using fopencookie(), which should be available in glibc). Update configure.ac to check for funopen (BSD) and fopencookie(glibc), and while we are at it also for gethostbyname_r (the generated files need to be updated, or you need to run bootstrap.sh yourself). Document the new options in http.conf.sample (names are only tentative, better ones are welcome). At this point we can safely enable the option. Anyone willing to try this on Sun and Apple platforms ? git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45892 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22Implement https support.rizzo1-62/+236
The changes are not large. Most of the diff comes from putting the global variables describing an accept session into a structure, so we can reuse the existing code for running multiple accept threads on different ports. Once this is done, and if your system has the funopen() library function (and ssl, of course), it is just a matter of calling the appropriate functions to set up the ssl connection on the existing socket, and everything works on the secure channel now. At the moment, the code is disabled because i have not implemented yet the autoconf code to detect the presence of funopen(), and add -lssl to main/Makefile if ssl libraries are present. And a bit of documentation on the http.conf arguments, too. If you want to manually enable https support, that is very simple (step 0 1 2 will be eventually detected by ./configure, the rest is something you will have to do anyways). 0. make sure your system has funopen(3). FreeBSD does, linux probably does too, not sure about other systems. 1. uncomment the following line in main/http.c // #define DO_SSL /* comment in/out if you want to support ssl */ 2. add -lssl to AST_LIBS in main/Makefile 3. add the following options to http.conf sslenable=yes sslbindport=4433 ; pick one you like sslcert=/tmp/foo.pem ; path to your certificate file. 4. generate a suitable certificate e.g. (example from mini_httpd's Makefile: openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem and here you go: https://localhost:4433/asterisk/manager now works. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45869 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22it is useless and possibly wrong to use ast_cli() to send therizzo1-10/+12
reply back to http clients. Use fprintf/fwrite instead, since we are already using a FILE * to read the input. If you wonder why, this is because it makes it trivial to implement https support (as long as your system has funopen()). And this is what i am going to put in with the next few commits... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45858 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-22Let's have build.h created a bit earlier so that func_version can use it and ↵file2-6/+8
not stop the build on a fresh machine that has never had Asterisk installed on it before... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45847 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-21the default port number was erroneously stored in host order,rizzo1-2/+2
and reading from the config file used ntohs instead of htons. this ought to be merged to 1.4 as well. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45836 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-21Merged revisions 45817 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45817 | file | 2006-10-21 14:48:58 -0400 (Sat, 21 Oct 2006) | 2 lines Don't use promotion on Darwin because it doesn't seem to work quite right in all cases, this should solve the unresolved symbol issue people have been seeing. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45820 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-21Merged revisions 45818 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45818 | russell | 2006-10-21 14:49:46 -0400 (Sat, 21 Oct 2006) | 3 lines Add a couple missing unregistrations of manager actions and remove duplicate unregistrations of applications. (issue #8194, jmls) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45819 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20introduce sip_pvt_lock() and sip_pvt_unlock() wrappers torizzo1-95/+109
lock these data structures. This improve readability, and also hides the underlying locking mechanism so it is a lot easier to add diagnostic code, or move the object locks somewhere else, etc. On passing, rename the lock field in sip_pvt to pvt_lock, also for ease of readability. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45786 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20Merged revisions 45775 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r45775 | file | 2006-10-20 15:03:03 -0400 (Fri, 20 Oct 2006) | 2 lines Pass DESTDIR and ASTSBINDIR so that the utilities get installed in the proper location (reported on asterisk-dev mailing list) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45776 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20put the constants for whether methods can create a dialog or not in an enumrussell1-4/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45764 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20minor comment changes, code rearrangement and field renamingrizzo1-29/+27
to minimize diffs with future modifications. The current implementation is problematic for the following reasons: + all insertions are O(N) because the event list does not have a tail pointer; + there is only a single lock protecting both session and users queues. + the implementation of the queue itself is not documented. I think i have figured it out, more or less, but am unclear on whether there is proper locking in place The rewrite (which i have working locally) uses a tailq so insertions are O(1), separate locks for the event and session queues, and has a documented implementation so hopefully we can figure out if/where bug exist. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45753 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20Let's repair the SIP attack shield :-)oej1-24/+51
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45743 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-20Doxygen correctionsoej1-33/+33
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45742 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19This new function, VERSION(), created via bug report 8176, may help dialplan ↵murf1-0/+118
programmers in the future. In the meantime, they can use the algorithm I outline on the bug report notes; If anyone invents something better, I'd hope they post it git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45724 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19astman was slightly weirding out over the new Dial and Newcallerid eventsmurf1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45712 f38db490-d61c-443f-a65b-d21fe96a405b