https://origsvn.digium.com/svn/asterisk/trunk
........
r169791 | mmichelson | 2009-01-21 15:53:55 -0600 (Wed, 21 Jan 2009) | 18 lines
Further fix some oddities in sip show users and sip show peers logic
ccesario on IRC pointed out that his sip peers were not displayed
properly when he would issue the command "sip show peers." The problem
was that the onlymatchonip field was used to determine if the endpoint
was a "peer" or "user." The tricky part is that a "friend" is supposed
to be treated as both a "user" and a "peer" but the logic would not allow
"friends" to show up as "peers" since onlymatchonip was set to FALSE
for friends.
I have modified the sip_peer structure to more explicitly keep track of
what type endpoint it is so that the various manager and CLI commands
will display the expected information
Reported by ccesario via IRC
Tested by ccesario
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@169792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
........
r169557 | mmichelson | 2009-01-20 14:10:31 -0600 (Tue, 20 Jan 2009) | 19 lines
Convert the character pointers in a sip_request to be pointer offsets
When an ast_str expands to hold more data, any pointers that were pointing
to the data prior to the expansion will be pointing at invalid memory. This
change makes such pointers used in chan_sip.c instead be offsets from the
beginning of the string so that the same math may be applied no matter where
in memory the string resides.
To help ease this transition, a macro called REQ_OFFSET_TO_STR has been added
to chan_sip.c so that given a sip_request and an offset, the string at that
offset is returned.
(closes issue #14220)
Reported by: riksta
Tested by: putnopvut
Review http://reviewboard.digium.com/r/126/
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@169559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r169211 | mmichelson | 2009-01-19 09:54:06 -0600 (Mon, 19 Jan 2009) | 21 lines
Merged revisions 169210 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r169210 | mmichelson | 2009-01-19 09:52:15 -0600 (Mon, 19 Jan 2009) | 13 lines
Prevent a crash in chan_local due to a potential NULL pointer dereference
Move the check for if both channels on a local_pvt have generators to below
where p->chan is checked for NULLity (NULLness?). This prevents a crash from
occurring if p->chan is NULL.
(closes issue #14189)
Reported by: sascha
Patches:
14189.patch uploaded by putnopvut (license 60)
Tested by: sascha
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@169213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r168976 | mmichelson | 2009-01-16 16:43:09 -0600 (Fri, 16 Jan 2009) | 26 lines
Merged revisions 168975 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r168975 | mmichelson | 2009-01-16 16:42:13 -0600 (Fri, 16 Jan 2009) | 18 lines
Account for possible NULL pointer when we receive a 408 in response to a REGISTER
It may be that by the time we receive a reply to a REGISTER request, the attempt has
timed out and thus the registry structure pointed to by the corresponding sip_pvt has
gone away. This situation was handled properly for a 200 OK response, but the 408
case assumed that the sip_registry struct was non-NULL, thus potentially causing a crash
This commit fixes this assumption and prints out a message to the console if we should
receive a late 408 response to a REGISTER
(closes issue #14211)
Reported by: aborghi
Patches:
14211.diff uploaded by putnopvut (license 60)
Tested by: aborghi
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
........
r168725 | mmichelson | 2009-01-15 13:00:06 -0600 (Thu, 15 Jan 2009) | 17 lines
Remove an unneeded condition for line addition to a SIP request/response
In Asterisk 1.4 and 1.6.0, the sip_request structure had a statically
allocated buffer to hold the text of the request. There was a check in the
add_line function to not attempt to write the line into the buffer if we
did not have room for it.
In trunk and Asterisk versions starting with 1.6.1, an expandable ast_str
structure is used to hold the text. Since it may grow to fit an arbitrarily
sized string, this check in add_line is no longer valid.
I found this oddity while attempting to fix issue #14220; however, I do not
believe that this is the fix for that issue since the output supplied by the
reporter did not contain the warning message that would be printed had this
condition been satisfied.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r168508 | jpeeler | 2009-01-12 14:53:04 -0600 (Mon, 12 Jan 2009) | 15 lines
Merged revisions 168507 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r168507 | jpeeler | 2009-01-12 14:26:22 -0600 (Mon, 12 Jan 2009) | 9 lines
(closes issue #12269)
Reported by: IgorG
Tested by: denisgalvao
This gits rid of the notion of an owning_app allowing the request and hangup to be initiated by different threads. Originating from an active agent channel requires this. The implementation primarily changes __login_exec to wait on a condition variable rather than a lock.
Review: http://reviewboard.digium.com/r/35/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r167700 | kpfleming | 2009-01-08 10:43:26 -0600 (Thu, 08 Jan 2009) | 12 lines
Merged revisions 167620 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r167620 | kpfleming | 2009-01-07 17:32:21 -0600 (Wed, 07 Jan 2009) | 5 lines
When a SIP request or response arrives for a dialog with an associated Asterisk channel, and the lock on that channel cannot be obtained because it is held by another thread, instead of dropping the request/response, queue it for later processing when the channel lock becomes available.
http://reviewboard.digium.com/r/123/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r167180 | mmichelson | 2009-01-05 10:59:36 -0600 (Mon, 05 Jan 2009) | 49 lines
Merged revisions 167179 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r167179 | mmichelson | 2009-01-05 10:51:59 -0600 (Mon, 05 Jan 2009) | 41 lines
A couple of changes to T.38 SDP attribute handling
There are some boolean attributes for T.38 such
as T38FaxFillBitRemoval, T38FaxTranscodingMMR, and
T38FaxTranscodingJBIG. By simply being present, we
should treat these as a "true" value. The current
code, however, was requiring a 1 or 0 as the value
of the attribute in order to parse it. This is due
to the fact that there are some T.38 endpoints and
gateways that also transmit this information
incorrectly. This patch follows the "be liberal in
what you accept and strict in what you send"
philosophy by accepting both the correctly- and
incorrectly-formatted attributes, but only sending
information as it is supposed to be sent.
It was also discovered that a particular type of
T.38 gateway sends some non-standard T.38 SDP
attributes. Instead of using T38FaxMaxDatagram
and T38MaxBitRate, it used T38MaxDatagram and
T38FaxMaxRate respectively. We now will properly
accept these attributes as well.
Note that there are a lot of patches cited in
the below commit message template. This is
because the person who submitted these patches is
an awesome person and wrote 1.4, 1.6.0, and 1.6.1
variants.
(closes issue #13976)
Reported by: linulin
Patches:
chan_sip.c.1.4-update1.diff uploaded by arcivanov (license 648)
chan_sip.c.1.6.0-update1.diff uploaded by arcivanov (license 648)
chan_sip.c.1.6.1-update1.diff uploaded by arcivanov (license 648)
chan_sip.c.1.4-relaxedT38_update1.diff uploaded by arcivanov (license 648)
chan_sip.c.1.6.0-relaxedT38_update1.diff uploaded by arcivanov (license 648)
chan_sip.c.1.6.1-relaxedT38_update1.diff uploaded by arcivanov (license 648)
Tested by: arcivanov
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r166382 | mmichelson | 2008-12-22 15:08:03 -0600 (Mon, 22 Dec 2008) | 44 lines
Merged revisions 166380 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r166380 | mmichelson | 2008-12-22 14:56:29 -0600 (Mon, 22 Dec 2008) | 36 lines
Fix a deadlock relating to channel locks and autoservice
It has been discovered that if a channel is locked prior
to a call to ast_autoservice_stop, then it is likely that
a deadlock will occur. The reason is that the call to
ast_autoservice_stop has a check built into it to be sure
that the thread running autoservice is not currently trying
to manipulate the channel we are about to pull out of
autoservice.
The autoservice thread, however, cannot advance beyond where
it currently is, though, because it is trying to acquire
the lock of the channel for which autoservice is attempting
to be stopped.
The gist of all this is that a channel MUST NOT be locked
when attempting to stop autoservice on the channel.
In this particular case, the channel was locked by a call
to ast_read. A call to ast_exists_extension led to autoservice
being started and stopped due to the existence of dialplan
switches.
It may be that there are future commits which handle the same
symptoms but in a different location, but based on my looks through
the code, it is very rare to see a construct such as this one.
(closes issue #14057)
Reported by: rtrauntvein
Patches:
14057v3.patch uploaded by putnopvut (license 60)
Tested by: rtrauntvein
Review: http://reviewboard.digium.com/r/107/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r164978 | mmichelson | 2008-12-16 17:06:04 -0600 (Tue, 16 Dec 2008) | 15 lines
Merged revisions 164977 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r164977 | mmichelson | 2008-12-16 17:04:27 -0600 (Tue, 16 Dec 2008) | 7 lines
After looking through SIP registration code most of the day, this
is one of the few things I could find that was just plain wrong.
Even though it probably isn't possible for it to happen, it seems weird
to have code that checks if a pointer is NULL and then immediately dereferences
that pointer if it was NULL.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@164980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r164675 | russell | 2008-12-16 10:00:29 -0600 (Tue, 16 Dec 2008) | 19 lines
Merged revisions 164672 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r164672 | russell | 2008-12-16 09:56:37 -0600 (Tue, 16 Dec 2008) | 11 lines
Fix a memory leak related to the use of the "setvar" configuration option.
The problem was that these variables were being appended to the list of vars
on the sip_pvt every time a re-registration or re-subscription came in.
Since it's just a waste of memory to put them there unless the request was an
INVITE, then the fix is to check the request type before copying the vars.
(closes issue #14037)
Reported by: marvinek
Tested by: russell
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@164677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
........
r163670 | russell | 2008-12-12 12:45:03 -0600 (Fri, 12 Dec 2008) | 6 lines
Rename a number of tcptls_session variables. There are no functional changes here.
The name "ser" was used in a lot of places. However, it is a relic from when
the struct was a server_instance, not a session_instance. It was renamed since
it represents both a server or client connection.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@163672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
........
r163629 | file | 2008-12-12 14:17:12 -0400 (Fri, 12 Dec 2008) | 4 lines
When a device registers we need to unlink them (if linked) from the peers_by_ip container and link them back in since their IP address has changed. This would have manifested itself if you configured a new device (as type=peer), registered, and then tried to place a call from the device. Since the peer was not linked into the peers_by_ip container it would have never been found.
(closes issue #13811)
Reported by: pj
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@163640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
........
r163579 | file | 2008-12-12 12:55:15 -0400 (Fri, 12 Dec 2008) | 4 lines
Since chan_sip is callback devicestate driven do not pass in actual states, pass in unknown so we get asked. Additionally do not pass in an actual device state value in ast_setstate since the channel may be callback driven.
(closes issue #13525)
Reported by: pj
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@163581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/trunk
................
r162805 | file | 2008-12-10 15:02:57 -0400 (Wed, 10 Dec 2008) | 13 lines
Merged revisions 162804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r162804 | file | 2008-12-10 15:01:17 -0400 (Wed, 10 Dec 2008) | 6 lines
Fix subscription based MWI up a bit. We only want to put sip: at the beginning of the URI if it is not already there and revert code to ignore destination check if subscribing for MWI.
(closes issue #12560)
Reported by: vsauer
Patches:
patch001.diff uploaded by ramonpeek (license 266)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@162807 65c4cc65-6c06-0410-ace0-fbb531ad65f3