Mark Michelson
9ff74a2b0a
Change AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.
...
The scheduler callback will always return 0. This means that this id
is never rescheduled, so it makes no sense to loop trying to delete
the id from the scheduler queue. If we fail to remove the item from the
queue once, it will fail every single time.
(Yes I realize that in this case, the macro would exit early because the
id is set to -1 in the callback, but it still makes no sense to use
that macro in favor of calling ast_sched_del once and being done with it)
This is the first of potentially several such fixes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 21:53:46 +00:00
Kevin P. Fleming
988e55c13f
if we receive an INVITE with a Content-Length that is not a valid number, or is zero, then don't process the rest of the message body looking for an SDP
...
closes issue #11475
Reported by: andrebarbosa
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 19:16:07 +00:00
Terry Wilson
28423c15fc
If we fail to alloc a channel, we should re-lock the pvt structure before returning.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 00:59:18 +00:00
Joshua Colp
cd703523db
Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
...
(closes issue #12148 )
Reported by: jcomellas
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:32:10 +00:00
Tilghman Lesher
b350a97937
Correctly initialize retransid in SIP, and ensure that the warning when failing to delete a schedule entry can actually hit the log.
...
(closes issue #12140 )
Reported by: slavon
Patches:
sch2.patch uploaded by slavon (license 288)
(Patch slightly modified by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 15:17:16 +00:00
Joshua Colp
36bb1f9d46
When a new source of audio comes in (such as music on hold) make sure the marker bit gets set.
...
(closes issue #10355 )
Reported by: wdecarne
Patches:
10355.diff uploaded by file (license 11)
(closes issue #11491 )
Reported by: kanderson
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 18:05:28 +00:00
Joshua Colp
70d43ff1d2
Add a comment to describe some logic.
...
(closes issue #12120 )
Reported by: flefoll
Patches:
chan_sip.c.br14.patch-just-a-comment uploaded by flefoll (license 244)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:15:39 +00:00
Joshua Colp
e6652d0a13
Make it so a users.conf user creates both a SIP peer and a SIP user. The user will be used for inbound authentication for the device, and peer will be used for placing calls to the device.
...
(closes issue #9044 )
Reported by: queuetue
Patches:
sip-gui-friend.diff uploaded by qwell (license 4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 21:37:20 +00:00
Joshua Colp
9b32204204
If a resubscription comes in for a dialog we no longer know about tell the remote side that the dialog does not exist so they subscribe again using a new dialog.
...
(closes issue #10727 )
Reported by: s0l4rb03
Patches:
10727-2.diff uploaded by file (license 11)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 16:16:13 +00:00
Joshua Colp
2395b1a6f5
Due to recent changes tag will no longer be NULL if not present so we have to use ast_strlen_zero to see if it's actually blank.
...
(closes issue #12061 )
Reported by: flefoll
Patches:
chan_sip.c.br14.patch_pedantic_no_totag uploaded by flefoll (license 244)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 15:17:18 +00:00
Tilghman Lesher
638ca62698
Backwards debug message.
...
(closes issue #12052 )
Reported by: flefoll
Patches:
chan_sip.c.br14.patch_found-notfound uploaded by flefoll (license 244)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-22 22:45:14 +00:00
Joshua Colp
7b6d391b76
Fix building of chan_sip.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 15:01:42 +00:00
Olle Johansson
7b72c89fb9
Make sure we send error replies correctly by checking the via header.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 10:27:15 +00:00
Tilghman Lesher
4306df31b1
When a SIP channel is being auto-destroyed, it's possible for it to still be
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@103780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 17:31:52 +00:00
Joshua Colp
c8d5a65d35
Don't care if the extension given doesn't exist for subscription based MWI.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 15:33:14 +00:00
Joshua Colp
f3f663d6fd
Even if no CallerID name or number has been provided by the remote party still use the configured sip.conf ones.
...
(closes issue #11977 )
Reported by: pj
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 15:09:24 +00:00
Joshua Colp
f26bac62e6
Only consider a T.38-only INVITE compatible if we have both a joint capability between us and them and if they provided T.38.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 17:59:23 +00:00
Joshua Colp
e9c59d95eb
If a REGISTER attempt comes in that is a retransmission of a previous REGISTER do not create a new nonce value.
...
(issue #BE-381)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 19:52:30 +00:00
Olle Johansson
649a083adb
Use the same CSEQ on CANCEL as on INVITE (according to RFC 3261)
...
(closes issue #9492 )
Reported by: kryptolus
Patches:
bug9492.txt uploaded by oej (license 306)
Tested by: oej
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-03 16:38:12 +00:00
Olle Johansson
9a5d78c2c7
Handle ACK and CANCEL in an invite transaction - even if we get INFO 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@102090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-03 10:37:32 +00:00
Russell Bryant
26365fdeca
Change the SDP_SAMPLE_RATE macro. It turns out that even though G.722 is 16 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@101989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 23:06:32 +00:00
Jason Parker
9742fb53fe
Solaris compat fixes for struct in_addr funkiness.
...
Issue #11885 , patch by snuffy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 19:52:49 +00:00
Olle Johansson
5e02b0d76e
Stop musiconhold on attended transfer.
...
(closes issue #11872 )
Reported by: gareth
Patches:
svn-101018.patch uploaded by gareth (license 208)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 11:20:31 +00:00
Olle Johansson
52cfa83d42
(closes issue #11736 )
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@100740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 08:26:48 +00:00
Russell Bryant
fe50ae6de5
For some reason, the use of this strdupa() is leading to memory corruption on
...
freebsd sparc64. This trivial workaround fixes it.
(closes issue #10300 , closes issue #11857 , reported by mattias04 and Home-of-the-Brave)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 18:34:20 +00:00
Tilghman Lesher
7060a6888d
When deleting a task from the scheduler, ignoring the return value could
...
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@100465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-27 21:59:53 +00:00
Jason Parker
a70508ed3d
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/branches/1.4@100378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-25 21:24:49 +00:00
Olle Johansson
107c1c37b4
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/branches/1.4@99978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 21:07:16 +00:00
Olle Johansson
d95d9d7132
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/branches/1.4@99977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 20:58:20 +00:00
Mark Michelson
3e54e684b2
These flag tests were illogical. They were testing sip_peer flags on a sip_pvt.
...
Thanks to Russell for helping to get this odd problem figured out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 16:18:04 +00:00
Olle Johansson
f9cf98d4bf
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 to heavy memory allocations on some systems.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:56:09 +00:00
Olle Johansson
33b77709a7
Cleaning up some documentation that led to confusion in a bug report
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 15:08:14 +00:00
Joshua Colp
785f7da384
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/branches/1.4@99301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21 16:01:00 +00:00
Joshua Colp
d35f5e39a2
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/branches/1.4@98955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 03:07:24 +00:00
Russell Bryant
48a72bba86
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/branches/1.4@98946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:50:10 +00:00
Joshua Colp
d355eb9c84
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/branches/1.4@98934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 20:08:43 +00:00
Joshua Colp
e3458a4976
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/branches/1.4@98894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 22:41:55 +00:00
Tilghman Lesher
0b289ed1b6
Back out changes from revision 97077, since it wasn't perfect
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 15:52:31 +00:00
Tilghman Lesher
7f61492a42
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/branches/1.4@97973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:08:36 +00:00
Tilghman Lesher
1b289c2998
Apply multiple crash fixes, found in issue #11386 , but not completely
...
closing that issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 18:02:13 +00:00
Tilghman Lesher
58cc575e52
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/branches/1.4@96525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04 19:27:25 +00:00
Joshua Colp
b5087d7743
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/branches/1.4@95946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 20:24:09 +00:00
Russell Bryant
ce3f27c5d5
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/branches/1.4@95191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 18:24:59 +00:00
Joshua Colp
856bc2ef76
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/branches/1.4@94905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 17:27:11 +00:00
Joshua Colp
25aef5fc44
file says... build on the builders.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-25 02:27:08 +00:00
Tilghman Lesher
9dbd385de7
More deadlock avoidance code (this time between sip_monitor and sip_hangup)
...
Reported by: apsaras
Patch by: tilghman
(Closes issue #11413 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 16:17:01 +00:00
Tilghman Lesher
f26935218f
Another bit of bad logic in realtime_peer
...
Reported by: dimas
Patch by: dimas
(Closes issue #11631 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 15:39:56 +00:00
Tilghman Lesher
1e5463be20
Argh... I suppose third time's the charm.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 01:21:03 +00:00
Tilghman Lesher
be17d99712
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/branches/1.4@93668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:29:39 +00:00
Olle Johansson
517dacce70
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/branches/1.4@93182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:15:13 +00:00