Russell Bryant
62766834c8
Fix some very broken code that was introduced in 1.2.26 as a part of the security
...
fix. The dnsmgr is not appropriate here. The dnsmgr takes a pointer to an address
structure that a background thread continuously updates. However, in these cases,
a stack variable was passed. That means that the dnsmgr thread would be continuously
writing to bogus memory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@110335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 21:53:27 +00:00
Jason Parker
866bf7984a
Do not return with a successful authentication if the From header ends up empty.
...
(AST-2008-003)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@109391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:08:41 +00:00
Tilghman Lesher
47b472894b
Fix for fix for security fix (third time's the charm?)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@94661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 01:30:42 +00:00
Tilghman Lesher
1e6902b29d
Fixing AST-2007-027 (Closes issue #11119 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@93667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:23:06 +00:00
Joshua Colp
2405536de9
(closes issue #10236 )
...
Reported by: homesick
Patches:
rpid_1.4_75840.patch uploaded by homesick (license 91)
Accept Remote Party ID on guest calls.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:32:07 +00:00
Russell Bryant
831ebbebb7
Backport a fix for a memory leak that was fixed in trunk in reivision 76221
...
by rizzo. The memory used for the localaddr list was not freed during a
configuration reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21 02:01:46 +00:00
Joshua Colp
a7047b7ed5
(closes issue #10247 )
...
Reported by: fkasumovic
Patches:
chan_sip.patch uploaded by fkasumovic (license #101 )
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 17:16:48 +00:00
Russell Bryant
0a22a51525
If a sip_pvt struct has already registered an extension state callback,
...
remove the old one before adding a new one. If this isn't done, Asterisk
will crash. (issue #10120 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 23:01:22 +00:00
Russell Bryant
ed261253d5
(closes issue #10125 )
...
Reported by: makoto
Patches submitted by: makoto
This fixes a crash in chan_sip that happens when the bindaddr setting is not
valid on Asterisk startup, gets fixed, and then a reload gets issued.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 15:55:41 +00:00
Kevin P. Fleming
585de1223e
we shouldn't allow G.723.1 endpoints to use VAD, just like we don't support it for G.729
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 22:11:51 +00:00
Joshua Colp
0b2c98ac3e
Copy language information to the dialog structure when calling a peer for situations where a PBX may be started on the dialed channel. (issue #10121 reported by clegall_proformatique)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 19:15:18 +00:00
Joshua Colp
76b4eb5daa
Ignore other URIs after the first in a 300 Multiple Choice response. (issue #10041 reported by homesick)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 01:02:49 +00:00
Joshua Colp
6357ad5659
Don't overwrite the configured username setting upon a REGISTER. (issue #8565 reported by jsmith)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 22:20:16 +00:00
Russell Bryant
6e0248318b
Backport fix for crashes related to subscriptions from 1.4 ...
...
Fix a crash that could occur when handing device state changes.
When the state of a device changes, the device state thread tells the extension
state handling code that it changed. Then, the extension state code calls the
callback in chan_sip so that it can update subscriptions to that extension.
A pointer to a sip_pvt structure is passed to this function as the call which
needs a NOTIFY sent. However, there was no locking done to ensure that the pvt
struct didn't disappear during this process.
(issue #9946 , reported by tdonahue, patch by me, patch updated to trunk to use
the sip_pvt lock wrappers by eliel)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 16:45:37 +00:00
Joshua Colp
dc41ce9857
Set the peer name on the dialog to the one configured in sip.conf and NOT the username to be used for authentication attempts. (issue #9967 reported by achauvin)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 18:13:03 +00:00
Joshua Colp
084ede4507
Only notify the devicestate system of a peer state change when the peer is built from the config file. (issue #9900 reported by arkadia)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 00:09:13 +00:00
Joshua Colp
22fe1b73cc
It is now possible for this path of execution to have the frame pointer be NULL, therefore we need to check for it before trying to access it. (issue #9836 reported by barthpbx)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 16:12:39 +00:00
Olle Johansson
c4e7d9fef5
Issue #9802 - Change inuse counter on CANCEL
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 07:53:14 +00:00
Joshua Colp
ad2f350d39
Allow RFC2833 to be negotiated when an INVITE comes in without SDP and is not matched to a user or peer. (issue #9546 reported by mcrawford)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 14:40:38 +00:00
Kevin P. Fleming
cba8e2f704
ensure that variables are set on a newly created channel before we start a PBX on it
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 20:46:22 +00:00
Olle Johansson
86882515a8
Not getting an ACK to a 200 OK in the initial invite is critical to the call.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 18:10:46 +00:00
Olle Johansson
21ea4dc3f1
Issue 9235 - part of the problem, maybe not all. Please retry with this patch (and no
...
other patch) if you have problems with hanging SIP channels. Thank you.
A special Thank You to WeBRainstorm that gave me access to his system.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 15:12:09 +00:00
Olle Johansson
9ebfde54a1
Fixing possible bug in auth of BYE
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 10:55:16 +00:00
Olle Johansson
80e4abca3d
Support SIP uri's starting with SIP: and sip: (reported by Tony Mountfield on the mailing list. Thanks!)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 09:08:22 +00:00
Olle Johansson
aa9ff74af5
Issue #9726 - rlister - Better logging for ACL denials
...
While at it, also added better logging and handling of peers that are not supposed to register.
My patch, stole the issue report from Russell. My apologies, Russell :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 08:25:56 +00:00
Olle Johansson
07ba0e379b
Do not allocate SIP pvt's for PEERs we can not reach.
...
This was seen as a lot of dialogs being created then immediately destroyed at reload/restart of the SIP channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 20:38:54 +00:00
Joshua Colp
7dc491d090
Properly handle hints that point to multiple devices in chan_sip. Why chan_sip is even doing this I have no idea but I would rather not go into a rant. (issue #9536 reported by rlister)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 16:51:03 +00:00
Joshua Colp
3a218f3a09
When a peer is seeded or built tell the devicestate core to update it's status. This is easier then having chan_sip load before pbx_config. (issue #9658 reported by dlynes)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 16:42:19 +00:00
Olle Johansson
3bafdca29f
Issue #7351 - SIP Cancel fails due to the wrong contact uri. Reported by PPYY, failed to fix by OEJ
...
final fix by wojtekka - THANKS!!!! THis was a hard one to catch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27 13:57:45 +00:00
Joshua Colp
a31a2ef862
Allow RFC2833 to be sent in the response SDP when an INVITE comes in without SDP. (issue #9546 reported by mcrawford)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 16:05:06 +00:00
Olle Johansson
57185823d1
Send NOTIFY to Contact: in SUBSCRIBE
...
- as reported by Intertex and Citel. Fixed during SIPit 20 in Antwerp.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-19 07:56:21 +00:00
Olle Johansson
062368a175
Don't stop RTP on errors on INFO messages.
...
Disclaimer: This patch was needed for Edvina AstHoloApp and was
meant to be included in 1.2, but never made it in time so I felt
I could add it now.
No, just joking, patching error found while testing T.140 with Omnitor earlier
this spring.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-16 14:08:33 +00:00
Russell Bryant
2128909ad4
If someone sets the "useragent" option in sip.conf to be empty, then don't add
...
the User-Agent header at all. It is an optional header, anyway. Also, the bug
report says that some of Japan's SIP providers don't allow it for some weird
reason. (issue #9488 , reported by makoto, fixed by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 16:01:25 +00:00
Russell Bryant
a36f57e7fc
Fix a bug with switching between host=dynamic and using specific hosts for
...
peers. The code would only reset the peer's address when it is dynamic if
it was a new peer structure. Now, it will also reset the address if it was
already in the peer list, but before the reload, it was not dynamic.
(issue #9515 , reported by caio1982, fixed by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 15:05:36 +00:00
Russell Bryant
1159b7761a
Remove the attempt at reporting configuration errors in sip.conf. This can
...
cause a bunch of improper messages when using realtime. I give up. As oej
tried to convince me when I put this in, there is just no easy way to do it.
(inspired by a message on the -dev list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 14:02:54 +00:00
Olle Johansson
1a92fec845
- Don't send ActionID before Response: header.
...
- Don't use a blank in an AMI header
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 19:38:59 +00:00
Joshua Colp
dd108f60f3
Only unlock our pvt and net locks if we are actually going to try to lock the owner again. (issue #9472 reported by zoa)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-05 12:52:50 +00:00
Russell Bryant
3f71ad082e
Fix the return value of handle_common_options() so that it always properly
...
indicates whether it handled the option or not.
(issue #9455 , reported by Netview, fixed by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-04 16:37:04 +00:00
Russell Bryant
d0991f6e1f
Add a missing "\r\n" in the body of the NOTIFY that is sent to indicate the
...
status of a transfer. (issue #9388 , reported by rarritt)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 23:23:23 +00:00
Russell Bryant
e237711157
Don't attempt to report configuration errors in build_user(). oej pointed out
...
that for a "friend" entry, this won't work, because all user options are valid
for peers, but not the other way around.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 19:15:04 +00:00
Russell Bryant
a19d352438
Make chan_sip report when it encounters an unknown option.
...
(issue #9440 , reported by nightcrawler)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 18:43:54 +00:00
Joshua Colp
9593ae4269
Only try to handle a response if it has a response code. (ASA-2007-011)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-24 01:35:49 +00:00
Olle Johansson
7158b80498
Issue #9229 - No port in request URI on register to non default SIP ports (neelakantan)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-13 11:45:52 +00:00
Joshua Colp
5941cc916c
If we are unable to lookup the host in a c line we have to abort, otherwise the previous data is gone and we will (potentially) have no data when all is said and done.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-09 20:46:43 +00:00
Steve Murphy
c7c8b06817
Fix for 9220: Eyebeam cannot renew subscriptions for presence info. Reason: re-SUBSCRIBE requests don't include Accept headers, which the rfc says are optional (to put it tersely), (it uses MAY), and luckily, the sip_pvt struct has the format info stored, so we simply leave it if the format is set, and the accept header null.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 22:52:52 +00:00
Olle Johansson
7d74199c6f
Change error message to proper message
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 20:33:21 +00:00
Joshua Colp
6bf891f353
If a SIP message comes in and goes to a method handler that requires additional values that may not be present then send back an error.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 17:02:46 +00:00
Joshua Colp
c966ea6e2d
Only change the original or clone channel if it's the channel behind the proxy channel, not if it's just a regular bridged channel.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 18:44:24 +00:00
Russell Bryant
c9d26b5a89
If we receive a frame that is not in any of the negotiated formats, then drop
...
it. (potentially issue #8781 and SPD-12)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 00:53:25 +00:00
Olle Johansson
9736c57aab
Issue #9020 - SIP message retransmission time too short.
...
Backporting fix implemented in 1.4, where we have a minimum level
for the T1 timer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 10:36:11 +00:00