summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
AgeCommit message (Collapse)Author
2007-09-05Doxygen cleanups/fixes.Jason Parker
Closes issue #10654, patch by snuffy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-04Merged revisions 81442 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81442 | kpfleming | 2007-09-04 11:40:39 -0500 (Tue, 04 Sep 2007) | 2 lines there is no point in sending 401 Unauthorized to a UAS that sent us a properly-formatted Authentication header with the expected username and nonce but an incorrect response (which indicates the shared secret does not match)... instead, let's send 403 Forbidden so that the UAS doesn't retry with the same authentication credentials repeatedly ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30Merged revisions 81395 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81395 | file | 2007-08-30 18:23:50 -0300 (Thu, 30 Aug 2007) | 6 lines (closes issue #10514) Reported by: casper Patches: chan_sip.c.80129.diff uploaded by casper (license 55) Remove needless check for AUTH_UNKNOWN_DOMAIN. It was impossible for it to ever be that value. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30(closes issue #10565)Joshua Colp
Reported by: tootai Make sure the external IP address has the standard SIP port set for when the user does not specify the port in the externip setting. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵Steve Murphy
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29Merged revisions 81331 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81331 | file | 2007-08-29 11:13:55 -0300 (Wed, 29 Aug 2007) | 4 lines (closes issue #9690) Reported by: mattv Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27Merged revisions 81012 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81012 | file | 2007-08-27 12:01:59 -0300 (Mon, 27 Aug 2007) | 6 lines (closes issue #10561) Reported by: jesselang Patches: chan_sip-ChannelReload-20080825.patch uploaded by jesselang (license 202) Remove an extra \r\n to make the ChannelReload event conform with every other event. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27Remove places that say if no language is specified it will default to ↵Joshua Colp
english... since on some setups this is untrue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23If no default language has been specified print out that it will default to ↵Joshua Colp
english when using sip show peer or sip show user. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22Merged revisions 80390 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80390 | russell | 2007-08-22 16:00:44 -0500 (Wed, 22 Aug 2007) | 3 lines Don't crash when using realtime in chan_sip without an insecure setting in the database. (closes issue #10348, reported by link55, fixed by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21Merged revisions 80183 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80183 | russell | 2007-08-21 13:42:15 -0500 (Tue, 21 Aug 2007) | 7 lines Don't record SIP dialog history if it's not turned on. Also, put an upper limit on how many history entires will be stored for each SIP dialog. It is currently set to 50, but can be increased if deemed necessary. (closes issue #10421, closes issue #10418, patches suggested by jmoldenhauer, patches updated by me) (Security implications documented in AST-2007-020) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-18We weren't properly encapsulating the mtime ignores of config files (closes ↵Tilghman Lesher
issue #10488) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17Merged revisions 79904 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10430) ........ r79904 | qwell | 2007-08-17 14:12:19 -0500 (Fri, 17 Aug 2007) | 11 lines Don't send a semicolon over the wire in sip notify messages. Caused by fix for issue 9938. I basically took the code that existed before 9938 was fixed, and copied it into a new function - ast_unescape_semicolon There should be very few places this will be needed (pbx_config does NOT need this (see issue 9938 for details)) Issue 10430, patch by me, with help/ideas from murf (thanks murf). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17This commit adds a scheduler API call, ast_sched_replace that can be usedRussell Bryant
in place of a very common construct. I also used it in a number of places in chan_sip. if (id > -1) ast_sched_del(sched, id); id = ast_sched_add(sched, ...); changes to: ast_sched_replace(id, sched, ...); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17Merged revisions 79857 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79857 | russell | 2007-08-17 08:37:08 -0500 (Fri, 17 Aug 2007) | 5 lines Fix some crashes in chan_sip. This patch changes various places that add items to the scheduler to ensure that they don't overwrite the ID of a previously scheduled item. If there is one, it should be removed. (closes issue #10391, closes issue #10256, probably others, patch by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Don't reload a configuration file if nothing has changed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15Merged revisions 79523 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79523 | file | 2007-08-15 11:18:44 -0300 (Wed, 15 Aug 2007) | 6 lines (closes issue #10456) Reported by: irroot Patches: sip_timeout.patch uploaded by irroot (license 52) Change hardcoded timer value to defined value. I'm doing this in 1.4 as well so if it needs to be changed in the future this place would not have been forgotten. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13Merged revisions 79174 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines (closes issue #10437) Reported by: haklin Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09When looking up a mailbox, use the default context if not specified as ↵Russell Bryant
something else git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09Restore the ability to have multiple mailboxes listed for the mailbox optionRussell Bryant
in sip.conf. chan_sip now maintains separate internal MWI subscriptions for each one. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09Fix a problem that I had introduced into MWI handling. I had ignoredRussell Bryant
the mailbox context. Now, all related MWI event dealings pay attention to the context as well. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08Add support for using epoll instead of poll. This should increase ↵Joshua Colp
scalability and is done in such a way that we should be able to add support for other poll() replacements. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06Fixing a compiler warning which warns that a variable may be used ↵Mark Michelson
unitialized. Thanks to mvanbaak for pointing this out. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06Merged revisions 78103 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers. Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the IP address. In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06Merged revisions 78182 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78182 | file | 2007-08-06 13:32:44 -0300 (Mon, 06 Aug 2007) | 2 lines It is possible for a transfer to occur before the remote device has our tag in which case they send none in the transfer. In this case we need to not fail the transfer dialog lookup. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-05Merged revisions 78139 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78139 | tilghman | 2007-08-04 22:29:01 -0500 (Sat, 04 Aug 2007) | 2 lines If peer is not found, the error message is misleading (should be peer not found, not ACL failure) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31thanks to Russel, for pointing out that the dialoglist_lock/unlock routines ↵Steve Murphy
also need to be macros if DETECT_DEADLOCKS is set git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31Merged revisions 77824 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77824 | mmichelson | 2007-07-31 10:21:22 -0500 (Tue, 31 Jul 2007) | 6 lines This patch makes Asterisk send 100 Trying provisional responses upon receipt of re-invites. This makes it so that if there are two or more Asterisk servers between endpoints, the Asterisk servers will not keep retransmitting the re-invites. (closes issue #10274, reported by cstadlmann, patched by me with approval from file) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31there is no use in having functions that have no code in them, and hide the ↵Kevin P. Fleming
locking info when DEBUG_THREADS is enabled... i could have fixed this to be dependent on DEBUG_THREADS, but it would be just as easy for someone to add their test/debugging code to the macros as it would have been to the functions git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31use a different method for overriding the send_digit_begin pointer, as the ↵Kevin P. Fleming
old one fails to compile on my 64-bit system with gcc-4.1 and --enable-dev-mode turned on git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31Discovered in experiments on core files: if you wrap the lock and unlock ↵Steve Murphy
calls with sip_pvt_lock and sip_pvt_unlock, you lose the tracing info you would normally get via DETECT_DEADLOCKS; so I turn these two functions into macros when DETECT_DEADLOCKS is called. This way, you get meaningful stuff in the file and func slots in the lock_info struct. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30minor code rearrangements:Luigi Rizzo
+ place the link field at the beginning of struct sip_pvt, and not somewhere in the middle; + in __sip_reliable_xmit, remove a duplicate assignment, and put the statements in a more logical order (i.e. first copy the payload and associated info, then copy arguments from the caller, then finish initializing the headers...) nothing to backport. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30rename handle_request() to handle_incoming(), as the formerLuigi Rizzo
was misleading - the function deals with all incoming packets, be them requests or responses. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29move some dialog-only flags to proper variables, namelyLuigi Rizzo
SIP_NOVIDEO, SIP_DIALOG_ANSWEREDELSEWHERE, SIP_PAGE2_NOTEXT, SIP_PAGE2_OUTGOING_CALL These are seldom used so the diff is relatively small. Note that 'OUTGOING_CALL' is dangerously similar to another dialog flag, 'SIP_OUTGOING', so the description will need to clarify the different meaning of the two. Also note that the description of NOTEXT is a bit unclear - does it mean we don't support it, or 'not requested or not supported' ? On passing fix a comment referring to video instead of text. Finally, mark with XXX a possibly misleading debugging message. (maybe the latter is worth backporting). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29use a function, cli_yesno(), to produce the output Yes or No forLuigi Rizzo
CLI lines. This helps maintaining consistency on output, slightly improves readability, and maybe one day will make it easier to translate the output in other languages (though i have a hard time believing that a CLI user who needs 'yes' and 'no' to be translated can actually figure out what he/she is doing!) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29move the two remaining peer flags to proper variables.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29move RT_FROMCONTACT to a proper sip_peer field.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29Move some global 'flags' to individual variables.Luigi Rizzo
Start putting these variables in a single struct (called 'sip_cfg' for the time being, but it could as well be 'global' or some other name) so it is easy, when reading the code, to figure out what they are for. The downside of using struct fields instead of individual global variables is that the compiler cannot tell if there are unused fields. But the advantage of not cluttering the namespace and manilpulating all these variables at once certainly overcome the disadvantagess. Nothing to backport, again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29minor simplification of a conditional statementLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29build the version of sip_tech with no send_digit_beginLuigi Rizzo
at load time instead of duplicating the initializer. This should remove the risk of forgetting fields in the initializer. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29remove bit position from description of SIP_* flags. Luigi Rizzo
use AST_FORMAT_AUDIO_MASK instead of playing with AST_FORMAT_MAX_AUDIO to determine audio formats. There is a dubious use of AST_FORMAT_MAX_AUDIO in sip_request_call() which surely needs fixing, namely: /* mask request with some set of allowed formats. * XXX this needs to be fixed. * The original code uses AST_FORMAT_AUDIO_MASK, but it is * unclear what to use here. We have global_capabilities, which is * configured from sip.conf, and sip_tech.capabilities, which is * hardwired to all audio formats. */ The latter is possibly something to backport when fixed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29back on cleaning up the usage of flags.Luigi Rizzo
Move together flags used in the same way (e.g. dialog only, dialog-peer, ...) so it will become easier to deal with them in a more systematic way. This is being done in stages so it will be easier to detect breakage, if any should occur. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29more documentation on internal representation of incoming SIP messages.Luigi Rizzo
Remove definitions for now-unused flags, and add references to print routines for other flags. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-29make register_unref() return NULL so it is easy to cleanupLuigi Rizzo
the original pointer while calling the function. on passing add some comments on one of the places where it is used, and explain why it is safe there. again, a no-op for practical purposes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28add some documentation to auto_congest(), and someLuigi Rizzo
dialog_ref/unref (they are a no-op at the moment). Also clean a pointer after freeing memory to avoid dangling references, and write a for() loop in canonical form. In practice, everything in this commit is a no-op. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28more dialog_ref()/dialog_unref() callsLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28more dialog_ref()/dialog_unref() callsLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28start introducing hooks for reference counts on dialog descriptors.Luigi Rizzo
This commit is, for all practical purposes, a no-op, as it only introduces the dialog_ref() and dialog_unref() methods, and uses them in a few places (not all the places where they would be needed). The goal is to start annotating the code with these calls, so the transition to a proper container will be easier. Nothing to backport. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28remove an unused stringLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-28simplify a conditional expression using S_ORLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77630 65c4cc65-6c06-0410-ace0-fbb531ad65f3