aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-19Fix building of chan_sip.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-19Make sure we send error replies correctly by checking the via header.oej1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103806 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18When a SIP channel is being auto-destroyed, it's possible for it to still betilghman1-12/+24
in bridge code. When that happens, we crash. Delay the RTP destruction until the bridge is ended. (closes issue #11960) Reported by: norman Patches: 20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14) Tested by: norman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103780 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Don't care if the extension given doesn't exist for subscription based MWI.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103763 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-12Even if no CallerID name or number has been provided by the remote party ↵file1-4/+4
still use the configured sip.conf ones. (closes issue #11977) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103385 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-06Only consider a T.38-only INVITE compatible if we have both a joint ↵file1-1/+1
capability between us and them and if they provided T.38. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102725 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-05If a REGISTER attempt comes in that is a retransmission of a previous ↵file1-3/+9
REGISTER do not create a new nonce value. (issue #BE-381) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102450 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-03Use the same CSEQ on CANCEL as on INVITE (according to RFC 3261)oej1-2/+2
(closes issue #9492) Reported by: kryptolus Patches: bug9492.txt uploaded by oej (license 306) Tested by: oej git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102142 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-03Handle ACK and CANCEL in an invite transaction - even if we get INFO ↵oej1-6/+11
transactions during the actual call setup. (closes issue #10567) Reported by: jacksch Tested by: oej Patch by: oej inspired by suggestions from neutrino88 in the bug tracker git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102090 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-01Change the SDP_SAMPLE_RATE macro. It turns out that even though G.722 is 16 ↵russell1-1/+6
kHz, it is supposed to specified as 8 kHz in the RTP, and RTP timestamps are supposed to be calculated based on 8 kHz. (Apparently this is due to a bug in a spec, but people follow it anyway, because it's the spec ...) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101989 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-31Solaris compat fixes for struct in_addr funkiness.qwell1-1/+2
Issue #11885, patch by snuffy. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101482 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-30Stop musiconhold on attended transfer.oej1-1/+3
(closes issue #11872) Reported by: gareth Patches: svn-101018.patch uploaded by gareth (license 208) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@101152 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-29(closes issue #11736)oej1-6/+25
Reported by: MVF Patches: bug11736-2.diff uploaded by oej (license 306) Tested by: oej, MVF, revolution (russellb: This was the showstopper for the release.) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100740 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-28For some reason, the use of this strdupa() is leading to memory corruption onrussell1-3/+3
freebsd sparc64. This trivial workaround fixes it. (closes issue #10300, closes issue #11857, reported by mattias04 and Home-of-the-Brave) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100629 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27When deleting a task from the scheduler, ignoring the return value couldtilghman1-123/+87
possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100465 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-25This would have never been true, since we're passing (sizeof(req.data) - 1) ↵qwell1-4/+3
as the len to recvfrom(). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100378 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23Second attempt. Don't change invitestate when receiving 18x messages in ↵oej1-2/+4
CANCEL state. (issue #11736) Reported by: MVF Patch by oej. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99978 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23Make sure we don't cancel destruction on calls in CANCEL state, even if weoej1-5/+5
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: http://svn.digium.com/svn/asterisk/branches/1.4@99977 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23These flag tests were illogical. They were testing sip_peer flags on a sip_pvt.mmichelson1-2/+2
Thanks to Russell for helping to get this odd problem figured out. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99878 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22Thanks to Russell's education I realize that BUFSIZ has changed since I ↵oej1-41/+43
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 to heavy memory allocations on some systems. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99652 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22Cleaning up some documentation that led to confusion in a bug reportoej1-5/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99501 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-21Bump the buffer size for Via headers up to 512. There are some exceptionally ↵file1-3/+3
large Via headers out there. (closes issue #11783) Reported by: ofirroval git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@99301 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-16Don't drop the old record route information when dealing with packets ↵file1-1/+2
related to a reinvite. (closes issue #11545) Reported by: kebl0155 Patches: reinvite-patch.txt uploaded by kebl0155 (license 356) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98955 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15Change a buffer in check_auth() to be a thread local dynamically allocatedrussell1-3/+12
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: http://svn.digium.com/svn/asterisk/branches/1.4@98946 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15Based on the boundary found move over the correct amount.file1-2/+5
(closes issue #11750) Reported by: tasker git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98934 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-14Accept "; boundary=" not just ";boundary=" in the multipart mixed content type.file1-1/+1
(closes issue #11750) Reported by: tasker git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98894 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Back out changes from revision 97077, since it wasn't perfecttilghman1-147/+89
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98164 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-101) When we get a translated frame out, clone it, because if thetilghman1-4/+11
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: http://svn.digium.com/svn/asterisk/branches/1.4@97973 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08Apply multiple crash fixes, found in issue #11386, but not completelytilghman1-89/+147
closing that issue. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97077 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-04If you change the bindaddr in sip.conf to a non-bound address and reload, ↵tilghman1-0/+3
sip goes kablooie. Reported and patched by: one47 (Closes issue #11535) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96525 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Allocate a SIP refer structure when performing a transfer using BYE with ↵file1-1/+6
Also so that the transfer information is properly stored. (AST-2008-001) (closes issue #11637) Reported by: greyvoip git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@95946 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-28Remove duplicate increment of the header count in the add_header() function.russell1-4/+0
(closes issue #11648) Reported by: makoto Patch provided by sergee, committed patch by me, inspired by comments from putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@95191 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is ↵file1-1/+1
possible for it to be a pointer to NULL. (closes issue #11557) Reported by: FuriousGeorge git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94905 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-25file says... build on the builders.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94769 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-24More deadlock avoidance code (this time between sip_monitor and sip_hangup)tilghman1-1/+8
Reported by: apsaras Patch by: tilghman (Closes issue #11413) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94765 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-24Another bit of bad logic in realtime_peertilghman1-2/+1
Reported by: dimas Patch by: dimas (Closes issue #11631) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94763 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-23Argh... I suppose third time's the charm.tilghman1-21/+22
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@94660 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18Merged revisions 93667 via svnmerge from tilghman1-3/+30
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: http://svn.digium.com/svn/asterisk/branches/1.4@93668 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Issue 11574: Add dependencies on res_monitor and res_features. oej1-0/+4
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: http://svn.digium.com/svn/asterisk/branches/1.4@93182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Up the length of the format on the SIP channel since it can now be rather long.file1-2/+2
(closes issue #11552) Reported by: francesco_r git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92937 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13If a typo is found in a config file, we previous continued on with what was ↵qwell1-29/+30
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. Isue #10690. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92696 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10It is possible for nativeformats to contain more then one codec, so print ↵file1-2/+3
out multiple ones. (closes issue #11366) Reported by: ovi git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10Avoid reinvite race situations with two Asterisks tryingoej1-5/+36
to reinvite each other in 1.4 and trunk. This patch implements support for the 491 error code that Asterisk 1.4 generates on situations where we get an incoming INVITE and already has one in progress. Thanks to mavetju for reporting and to Raj Jain for an excellent explanation of the problem. Patch by myself. Tested with 8 Asterisk servers connected to each other in a training network. Closes issue #10481 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92158 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Add support for accepting and sending T.38 in the initial INVITE.file1-0/+18
(closes issue #9402) Reported by: thdei git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91439 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30Fix locking issues under one legged replaces scenarios.file1-3/+6
(closes issue #11420) Reported by: irroot Patches: chan_sip_oneleg.patch uploaded by irroot (license 52) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90269 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27If we get a codec offer using a well-known payload type, but using it for ↵oej1-8/+29
another codec that we don't know, Asterisk did not remove that codec from the list. With this patch, we remove the codec from audio and video rtp objects and deny it ever existed. Thanks to lasse for testing. (closes issue #11376) Reported by: lasse Patches: bug11376.txt uploaded by oej (license 306) Tested by: lasse git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89630 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15Don't send re-invites during pending INVITE transactions.oej1-6/+19
Patch by one47 - thanks! Closes issue #9305 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89281 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15Improve support for multipart messages. Code by gasparz, changesoej1-18/+25
by me (mostly formatting). Thanks, gasparz! Closes issue #10947 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89280 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13If we set a value for qualify, we should actually pay attention to it, ↵tilghman1-2/+2
instead of overriding the value git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89246 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Fix two cases of memory corruption caused by background threads.tilghman1-0/+8
Reported by: atis Patch by: tilghman Fixes issue #10923 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89184 f38db490-d61c-443f-a65b-d21fe96a405b