Russell Bryant
9479a831f0
Fix a potential deadlock and a few different potential crashes.
...
(closes issue #12145 , reported by thiagarcia, patched by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:37:09 +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
Kevin P. Fleming
461e3fea79
when a PRI call must be moved to a different B channel at the request of the other endpoint, ensure that any DSP active on the original channel is moved to the new one
...
(closes issue #11917 )
Reported by: mavetju
Tested by: mavetju
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 15:32:35 +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
Russell Bryant
7f7dbcb11f
In the case of an ast_channel allocation failure, take the local_pvt out of the
...
pvt list before destroying it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 17:16:53 +00:00
Russell Bryant
b3c0e042d4
Fix a potential memory leak of the local_pvt struct when ast_channel allocation
...
fails. Also, in passing, centralize the code necessary to destroy a local_pvt.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 17:05:16 +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
Jason Parker
70a45ef5b1
According to a video at www.cisco.com, the 7921G supports 6 line appearances.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 04:31:21 +00:00
Russell Bryant
54eaddd028
When we receive a known alarm, make sure that the unknown alarm flag is not still
...
set to make sure that when we come back out of alarm, it gets reported in the log
and manager interface (after discussion with tzafrir on the -dev list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 16:45:00 +00:00
Russell Bryant
37f0ad57a7
Zaptel 1.4 now exposes FXO battery state as an alarm. However, Asterisk 1.4
...
does not know what to do with these alarms. Only Asterisk 1.6 cares about it.
So, if we get an unknown alarm in chan_zap, don't generate confusing log messages
about it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 00:54:29 +00:00
Russell Bryant
bc56a84c58
Merge changes from team/russell/smdi-1.4
...
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue. So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.
This code introduces a new interface to SMDI, with two dialplan functions. First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function. A side benefit of this is that
it now supports more than just chan_zap.
For example, with this implementation, you can have some FXO lines being terminated
on a SIP gateway, but the SMDI link in Asterisk.
Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box. There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.
Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link. The current code could only report a MWI change when the change
was made by someone calling into voicemail. If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent. The SMDI module can now poll for MWI changes if
configured to do so.
This work was inspired by and primarily done for the University of Pennsylvania.
(also related to issue #9260 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:25:29 +00:00
Jason Parker
aba8d8d763
IPTOS_MINCOST is not defined on Solaris.
...
(closes issue #12050 )
Reported by: asgaroth
Patches:
12050.patch uploaded by putnopvut (license 60)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:03:30 +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
Russell Bryant
c27732c38c
Ensure that the channel doesn't disappear in agent_logoff(). If it does, it
...
could cause a crash.
(fixes the crash reported in BE-396)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 18:38:10 +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
Mark Michelson
2d8f502132
And as a followup to revision 104026, completely remove event-related
...
calls from a section of code where we know there was no event to handle or get.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 21:05:42 +00:00
Mark Michelson
b3dd064bcb
Remove an incorrect debug message. It reported that it had received a specific event and tried to report
...
which event was received. What actually was happening was that it was reporting the number of bytes returned
from a call to read().
Thanks to Jared Smith for bringing the issue up on IRC
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 20:12:38 +00:00
Joshua Colp
11edc2ab8d
Don't wait for additional digits when overlap dialing is enabled if the setup message contains the sending_complete information element.
...
(closes issue #11785 )
Reported by: klaus3000
Patches:
sending_complete_overlap_asterisk-1.4.17.patch.txt uploaded by klaus3000 (license 65)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 22:06:59 +00:00
Mark Michelson
6835ca7d03
Fix a crash if the channel becomes NULL while attempting to lock it.
...
(closes issue #12039 )
Reported by: danpwi
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 21:40:08 +00:00
Joshua Colp
749f1e1963
Send CallerID Name in setup message.
...
(closes issue #11241 )
Reported by: tusar
Patches:
h323id_as_callerid_name.patch uploaded by tusar (license 344)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 20:28:08 +00:00
Russell Bryant
8c9a6024d9
Account for the fact that the "other" channel can disappear while the local pvt
...
is not locked.
(fixes a problem introduced in rev 100581)
(closes issue #12012 )
Reported by: stevedavies
Patch by me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 20:02:49 +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
Jason Parker
add30e2666
Fix previous commit so that we actually disable echocanbridged if echocancel is off.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 22:28:56 +00:00
Jason Parker
4ce44f1c28
Correct a message when echocancelwhenbridged is on, but echocancel is not.
...
Issue #12019
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 21:23:32 +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
Mark Michelson
a300034b08
Fix a linked list corruption that under the right circumstances
...
could lead to a looped list, meaning it will traverse forever.
(closes issue #11818 )
Reported by: michael-fig
Patches:
11818.patch uploaded by putnopvut (license 60)
Tested by: michael-fig
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 16:37:31 +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
Russell Bryant
6bf909cd2e
Fix a crash in chan_iax2 due to a race condition
...
(closes issue #11780 )
Reported by: guillecabeza
Patches:
bug_iax2_jb_1.4.patch uploaded by guillecabeza (license 380)
bug_iax2_jb_trunk.patch uploaded by guillecabeza (license 380)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 23:31:39 +00:00
Tilghman Lesher
e049bdfcfa
We aren't talking to ourselves; we're talking to someone else.
...
(closes issue #11771 )
Reported by: msetim
Patches:
ami_agent_talkingto-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, msetim
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-13 06:25:03 +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
Mark Michelson
19f5074cd8
Yield the thread and return -1 if the ioctl fails for Zaptel timing device.
...
(closes issue #11891 )
Reported by: tzafrir
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 18:00:38 +00:00
Joshua Colp
5e3cbd6f92
Make sure the presence of dbsecret is factored into user scoring.
...
(closes issue #11952 )
Reported by: bbhoss
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 15:08:20 +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
Mark Michelson
748609f25e
Clear the DTMF buffer on hangup.
...
(closes issue #11919 )
Reported by: eferro
Patches:
mgcp_dtmfclean_on_hangup.diff uploaded by eferro (license 337)
Tested by: eferro
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 20:02:44 +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
Kevin P. Fleming
8a2fd8fdbd
ensure that components of chan_misdn.so are built using any special build options that the configure script generated (reported by Philipp Kempgen on asterisk-dev)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 17:15:36 +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
Russell Bryant
fe59cfa7aa
Add some more sanity checking on IAX2 dial strings for the case that no peer
...
or hostname was provided, which is the one part of the dial string that is
absolutely required. If it's not there, bail out.
(closes issue #11897 )
Reported by sokhapkin
Patch by me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 00:32:49 +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
Russell Bryant
0343bf8348
Add more missing locking of the agents list ...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 19:17:05 +00:00
Russell Bryant
70200cec77
Move the locking from find_agent() into the agent dialplan function handler to
...
ensure that the agent doesn't disappear while we're looking at it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 19:07:46 +00:00
Russell Bryant
c6c7c3bf58
Add missing locking to the find_agent() function.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 19:04:52 +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
Jason Parker
f60be6bdb8
Initialize an array to 0s if config option not specified.
...
(closes issue #11860 )
Patches:
misdn_get_config.v1.diff uploaded by IgorG (license 20)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 17:41:43 +00:00