summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
AgeCommit message (Collapse)Author
2008-01-25Merged revisions 100378 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100378 | qwell | 2008-01-25 15:24:49 -0600 (Fri, 25 Jan 2008) | 2 lines This would have never been true, since we're passing (sizeof(req.data) - 1) as the len to recvfrom(). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24Fix simple whitespace issueJames Golovich
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24Move chan_local dependency into places (only one) that previously depended ↵Jason Parker
on res_features, and used local channels git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24Remove dependency on res_features from some channel drivers. It is now part ↵Joshua Colp
of the core and no longer exists as a module. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24fix flag bit definitions to make code from issue #11049 actually work; along ↵Kevin P. Fleming
the way, clarify comments and add some dummy flag definitions for other multi-bit flags to hopefully stop this from happening in the future (closes issue #11049) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23Merged revisions 99978 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99978 | oej | 2008-01-23 22:07:16 +0100 (Ons, 23 Jan 2008) | 7 lines Second attempt. Don't change invitestate when receiving 18x messages in CANCEL state. (issue #11736) Reported by: MVF Patch by oej. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23Merged revisions 99977 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99977 | oej | 2008-01-23 21:58:20 +0100 (Ons, 23 Jan 2008) | 9 lines Make sure we don't cancel destruction on calls in CANCEL state, even if we get 183 while waiting for answer on our CANCEL. (issue #11736) Reported by: MVF Patches: bug11736.txt uploaded by oej (license 306) Tested by: MVF ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23- Add a few comments to sip_xmitOlle Johansson
- Make sure that we are aware of a pending INVITE even if we're using TCP git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22Merged revisions 99652 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99652 | oej | 2008-01-22 21:56:09 +0100 (Tis, 22 Jan 2008) | 4 lines Thanks to Russell's education I realize that BUFSIZ has changed since I learned the C language over 20 years ago... Resetting chan_sip to the size of BUFSIZ that I expected in my old head to avoid too heavy memory allocations on some systems. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22Add a generic function to set the bridged call PVT unique id stringOlle Johansson
as a channel variable BRIDGEPVTCALLID This is important for call tracing in log files and CDRs, so that the SIP callID can be traced along servers. The CHANNEL dialplan function won't work here, since the outbound channel is gone when we need the Call-ID. Other channel drivers may now implement the same function :-), but this patch only supports chan_sip.so. Inspired by (issue #11816) Reported by: ctooley Patch by oej git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22Point out a bug in some debug counter handlingRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22Add authentication options to the SIP dialstring.Olle Johansson
Documentation follows separately (issue #11587) Reported by: sobomax Patches: chan_sip.c-trunk.diff uploaded by sobomax (license 359) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21Doxygen updates.Olle Johansson
The TCP/TLS code was committed without any doxygen obviously. Tss tss. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21Updating doxygenOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21Merged revisions 99301 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99301 | file | 2008-01-21 12:01:00 -0400 (Mon, 21 Jan 2008) | 4 lines Bump the buffer size for Via headers up to 512. There are some exceptionally large Via headers out there. (closes issue #11783) Reported by: ofirroval ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21Change over to using ast_debug so these debug messages don't always show up.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-18Merge changes from team/group/sip-tcptlsRussell Bryant
This set of changes introduces TCP and TLS support for chan_sip. There are various new options in configs/sip.conf.sample that are used to enable these features. Also, there is a document, doc/siptls.txt that describes some things in more detail. This code was implemented by Brett Bryant and James Golovich. It was reviewed by Joshua Colp and myself. A number of other people participated in the testing of this code, but since it was done outside of the bug tracker, I do not have their names. If you were one of them, thanks a lot for the help! (closes issue #4903, but with completely different code that what exists there.) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16Merge the changes from issue #10665 from the team/group/sip_session_timers ↵Russell Bryant
branch. This set of changes introduces SIP session timers support (RFC 4028). In short, this prevents stuck SIP sessions that were not properly torn down due to network or endpoint failures during an established SIP session. To quote some of the documentation supplied with the patch: "The SIP Session-Timers is an extension of the SIP protocol that allows end-points and proxies to refresh a session periodically. The sessions are kept alive by sending a RE-INVITE or UPDATE request at a negotiated interval. If a session refresh fails then all the entities that support Session- Timers clear their internal session state. In addition, UAs generate a BYE request in order to clear the state in the proxies and the remote UA (this is done for the benefit of SIP entities in the path that do not support Session-Timers)." (closes issue #10665) Reported by: rjain Patches: chan_sip.c.1.diff uploaded by rjain (license 226) chan_sip.c.diff uploaded by rjain (license 226) sip.conf.sample.diff uploaded by rjain (license 226) proc_422_rsp_comment.diff uploaded by rjain (license 226) chan_sip.c.cache.diff uploaded by rjain (license 226) chan_sip.memalloc uploaded by rjain (license 226) chan_sip.memalloc.bugfix uploaded by rjain (license 226) Patches tracked in team/group/sip_session_timers, with some additional fixes by russell and oej. Tested by: jtodd, rjain, loloski git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16Merged revisions 98955 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r98955 | file | 2008-01-15 23:07:24 -0400 (Tue, 15 Jan 2008) | 6 lines Don't drop the old record route information when dealing with packets related to a reinvite. (closes issue #11545) Reported by: kebl0155 Patches: reinvite-patch.txt uploaded by kebl0155 (license 356) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16Remove DNS lookup from sip_devicestate. This seems to come from way back ↵Joshua Colp
when and I can't think of a reason for it being here, plus it could cause needless DNS lookups. (closes issue #10983) Reported by: jtodd git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15Merged revisions 98946 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r98946 | russell | 2008-01-15 17:50:10 -0600 (Tue, 15 Jan 2008) | 11 lines Change a buffer in check_auth() to be a thread local dynamically allocated buffer, instead of a massive buffer on the stack. This fixes a crash reported by Qwell due to running out of stack space when building with LOW_MEMORY defined. On a very related note, the usage of BUFSIZ in various places in chan_sip is arbitrary and careless. BUFSIZ is a system specific define. On my machine, it is 8192, but by definition (according to google) could be as small as 256. So, this buffer in check_auth was 16 kB. We don't even support SIP messages larger than 4 kB! Further usage of this define should be avoided, unless it is used in the proper context. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15Merged revisions 98934 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r98934 | file | 2008-01-15 16:08:43 -0400 (Tue, 15 Jan 2008) | 4 lines Based on the boundary found move over the correct amount. (closes issue #11750) Reported by: tasker ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14Merged revisions 98894 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r98894 | file | 2008-01-14 18:41:55 -0400 (Mon, 14 Jan 2008) | 4 lines Accept "; boundary=" not just ";boundary=" in the multipart mixed content type. (closes issue #11750) Reported by: tasker ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11Merged revisions 98164 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r98164 | tilghman | 2008-01-11 09:52:31 -0600 (Fri, 11 Jan 2008) | 2 lines Back out changes from revision 97077, since it wasn't perfect ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11Ascom phones send Flash events as SIP INFO using '!' as the 'digit'Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11Add a new global and per-peer option to chan_sip, qualifyfreq, which allows youRussell Bryant
to set the qualify frequency. (closes issue #11597) Reported by: wilder Patches: qualifyfreq5.patch uploaded by wilder (license 362) -- with some mods by me git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10Merged revisions 97973 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97973 | tilghman | 2008-01-10 17:08:36 -0600 (Thu, 10 Jan 2008) | 6 lines 1) When we get a translated frame out, clone it, because if the translator pvt is freed before we use the frame, bad things happen. 2) Getting a failure from ast_sched_delete means that the schedule ID is currently running. Don't just ignore it. (Closes issue #11698) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10Several manager changes:Tilghman Lesher
1) Add the Dialplan class, for NewExten and VarSet events, which should cut down on the volume of traffic in the Call class. 2) Permit some commands to be run from multiple classes, such as allowing DBGet to be run from either the System or the Reporting class. 3) Heavily document each class in the sample config, as there were several that made no sense to be in the write= line, and two that made no sense to be in the read= line (since they controlled no permissions there). (Closes issue #10386) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08One line documentation ftw!Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08Move common code for setting T38 capabilities and fix a bug with fax ↵Joshua Colp
detection in the SIP RTP read callback. It's still sort of silly... but more on that later. (closes issue #11239) Reported by: dimas Patches: sipt38prop.patch uploaded by dimas (license 88) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08Merged revisions 97077 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97077 | tilghman | 2008-01-08 12:02:13 -0600 (Tue, 08 Jan 2008) | 3 lines Apply multiple crash fixes, found in issue #11386, but not completely closing that issue. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-05Now that the version.h file was getting properly regenerated every time the svnRussell Bryant
revision changed, every module that used the version was getting rebuilt after every svn update. This severly annoyed me pretty quickly, so I have improved the situation. Now, instead of generating version.h, main/version.c is generated. version.c includes the version information, as well as a couple of API calls for modules to retrieve the version. So now, only version.c will get rebuilt, and the main asterisk binary relinked, which is must faster than rebuilding http.c, manager.c, asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ... The only minor change in behavior here is that the version information reported by chan_sip, for example, is the version of the Asterisk core, and not necessarily the Asterisk version that the chan_sip module came from. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04Merged revisions 96525 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r96525 | tilghman | 2008-01-04 13:27:25 -0600 (Fri, 04 Jan 2008) | 4 lines If you change the bindaddr in sip.conf to a non-bound address and reload, sip goes kablooie. Reported and patched by: one47 (Closes issue #11535) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02Merged revisions 95946 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r95946 | file | 2008-01-02 16:24:09 -0400 (Wed, 02 Jan 2008) | 4 lines Allocate a SIP refer structure when performing a transfer using BYE with Also so that the transfer information is properly stored. (AST-2008-001) (closes issue #11637) Reported by: greyvoip ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28Merged revisions 95191 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r95191 | russell | 2007-12-28 12:24:59 -0600 (Fri, 28 Dec 2007) | 6 lines Remove duplicate increment of the header count in the add_header() function. (closes issue #11648) Reported by: makoto Patch provided by sergee, committed patch by me, inspired by comments from putnopvut ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27Merged revisions 94905 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94905 | file | 2007-12-27 13:27:11 -0400 (Thu, 27 Dec 2007) | 4 lines Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is possible for it to be a pointer to NULL. (closes issue #11557) Reported by: FuriousGeorge ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23Merged revisions 94660 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94660 | tilghman | 2007-12-22 19:21:03 -0600 (Sat, 22 Dec 2007) | 2 lines Argh... I suppose third time's the charm. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19Adding the ability to specify the To: header in an outbound INVITEOlle Johansson
by adding an exclamation mark to the dial string. This patch also exists for 1.4 in the fixtoheader-1.4 branch and has been in production for quite some time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18Move some warnings away to debug since some devices send a packet with a sillyOlle Johansson
string as a NAT keepalive packet. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18Merged revisions 93668 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r93668 | tilghman | 2007-12-18 12:29:39 -0600 (Tue, 18 Dec 2007) | 10 lines Merged revisions 93667 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r93667 | tilghman | 2007-12-18 12:23:06 -0600 (Tue, 18 Dec 2007) | 2 lines Fixing AST-2007-027 (Closes issue #11119) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18make configuration variable const so they are not accidentallyLuigi Rizzo
modified. This requires casting the strings in asterisk.c when writing to them, so we do it through a macro to do it consistently. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17Merged revisions 93182 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93182 | oej | 2007-12-17 08:15:13 +0100 (MÃ¥n, 17 Dec 2007) | 8 lines Issue 11574: Add dependencies on res_monitor and res_features. I wonder if Asterisk can run at all without res_features. My guess is that there's propably a lot of more modules and the core that depends on it. Reported by: caio1982 (closes issue #11574) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17Fix usage of rtptimeout. It can be used without rtpkeepalive, and the value ↵Joshua Colp
can not be accessed directly in the SIP pvt structure. All RTP related timeouts have to be retrieved using the ast_rtp_* function calls. (closes issue #11562) Reported by: ibc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16HUGE improvements to QoS/CoS handling by IgorGOlle Johansson
- Refer to the proper documentation - Implement separate signalling/media QoS/CoS in many channels using RTP - Improve warnings and verbose messages - Deprecate some old settings Minor modifications by me, a big effort from IgorG. Thanks! Reported by: IgorG Patches: qoscleanup-89394-4-trunk.patch uploaded by IgorG (license 20) Tested by: IgorG (closes issue #11145) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16Make more timers settable in SIP so that we can force timeout earlier on ↵Olle Johansson
non-responsive SIP servers. Thanks, jcmoore, for the patch! Reported by: jcmoore Patches: peer_t1_timerb_trunk_v3.patch.txt uploaded by jcmoore (license 9) (closes issue #9771) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14Merged revisions 92937 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92937 | file | 2007-12-14 11:16:15 -0400 (Fri, 14 Dec 2007) | 4 lines Up the length of the format on the SIP channel since it can now be rather long. (closes issue #11552) Reported by: francesco_r ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13Remove remnants of a poorly merged commit. (92697)Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13Merged revisions 92696 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10690) ........ r92696 | qwell | 2007-12-12 18:11:09 -0600 (Wed, 12 Dec 2007) | 7 lines If a typo is found in a config file, we previous continued on with what was already loaded. We do not want to do this (see bug below for details). This makes it so that if a [ is found without a ], the entire config will fail, and nothing in it will be loaded. Issue 10690. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11We need to set the address we want to match against before we actually do ↵Jason Parker
the match.. Closes issue #11518. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10Removing some LOG_DEBUG itemsOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92160 65c4cc65-6c06-0410-ace0-fbb531ad65f3