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
9df29ba46f
When processing full frames, take sequence number wraparound into account when
...
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237 , reported and patched by mihai)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 15:49:42 +00:00
Russell Bryant
6b5a7a6f64
When traversing the queue of frames for possible retransmission after
...
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227 , reported and patched by mihai)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 21:09:13 +00:00
Russell Bryant
d359de6edb
Properly check for the length in the skinny packet to prevent an invalid memcpy.
...
(ASA-2007-016)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:57:09 +00:00
Russell Bryant
d0b4144eb4
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
...
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:45:27 +00:00
Russell Bryant
d2cb9b0d3b
After parsing information elements in IAX frames, set the data length to zero,
...
so that code later on does not think it has data to copy.
(ASA-2007-015)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:41:41 +00:00
Russell Bryant
460df0480b
(closes issue #9660 )
...
Reported by: mmacvicar
Patches submitted by: bbryant, russell
Tested by: mmacvicar, marco, arcivanov, jmhunter, explidous
When using a TDM400P (and probably other analog cards) there was a chance that
you could hang up and pick the phone back up where it has been long enough to
be not considered a flash hook, but too soon such that the device reports that
it is busy and the person on the phone will only hear silence. This patch
makes chan_zap more tolerant of this and gives the device a couple of seconds
to succeed so the person on the phone happily gets their dialtone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 19:10:00 +00:00
Russell Bryant
2c757b4ab7
The function make_trunk() can fail and return -1 instead of a valid new call
...
number. Fix the uses of this function to handle this instead of treating it
as the new call number. This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 22:53:26 +00:00
Mark Michelson
140c936792
The cli command "agent logoff Agent/x soft" did not work...at all. Now it does.
...
(closes issue #10178 , reported and patched by makoto, with slight modification for 1.4 and trunk by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 21:12:30 +00:00
Joshua Colp
7055d9fe45
Use some Makefile magic to determine if linux/compiler.h is present. (issue #10174 reported by francesco_r)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 17:15:11 +00:00
Jason Parker
5dd56e420c
Fix an issue with wrapuptime not working when using AgentLogin.
...
Issue 10169, patch by makoto, with a minor mod by me to not re-break issue 9618
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 19:03:45 +00:00
Jason Parker
29da454042
Several chan_zap options were not working on reload because they were arbitrarily
...
disallowed when reloading some/most PRI options (such as signalling) was disallowed.
Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload.
This corrects that behavior.
Issue 9186, patch by tzafrir.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 20:18:15 +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
Mark Michelson
3735871ed4
Fixed a bug wherein agents get stuck busy. (issue 9618, reported by jiddings, patched by moi)
...
closes issue #9618
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 15:26:40 +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
1dc2b9c0f7
Actually check to make sure a PBX was started on one of the Local channels instead of blindly assuming it was. (issue #10112 reported by makoto)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 13:26:02 +00:00
Christian Richter
ce99e9d955
bchannel configurations like echocancel and volume control, need to be setuped on inbound calls too.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-04 14:50:58 +00:00
Christian Richter
479d7e4738
bad bug in overlapdial case, we called start_pbx multiple times, because the state wasn't changed..
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-04 08:20:54 +00:00
Christian Richter
2676d6c595
fixed issue, that misdn_l2l1_check could only be called from mISDN Source channels.. #9449
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 08:04:35 +00:00
Russell Bryant
defd4eb3e2
Backport changes that make chan_iax2 not start the PBX on an incoming channel
...
until the three-way call setup is completed. These changes are already in 1.4
and trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 16:30:56 +00:00
Christian Richter
fc4111b44f
check if the bchannel stack id is already used, if so don't use it a second time. Also added a release_chan lock, so that the same chan_list object cannot be freed twice. chan_misdn does not crash anymore on heavy load with these changes.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 13:08:26 +00:00
Christian Richter
3637816f4c
simplified generation for dummy bchannels, also we mark them as dummies, so they are not used later as real-bchannels, optimized the RESTART mechanisms, we block a channel now on cause:44, and send out a RESTART automatically, then on reception of RESTART_ACKNOWLEDGE we unblock the channel again.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 13:22:37 +00:00
Christian Richter
5f272436b9
simplified channel finding and locking a lot. removed unnecessary #ifdefed areas.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 09:26:53 +00:00
Christian Richter
085065ac35
isdn_lib.c didn't compile
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 07:54:30 +00:00
Christian Richter
16ecedee04
for inbound TE calls, we setup the bchannel when we get the CONNECT_ACKNOWLEDGE, to make sure mISDN has everything ready. removed some #if 0 areas which weren't used anymore.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 07:49:27 +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
Christian Richter
d8d4454ae5
we activate the bchannels in TE mode on incoming calls only when we want to connect the call.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 13:11:29 +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
cfaead2b9c
Fix a problem where an established call would not be properly disconnected
...
when a PRI disconnect is received depending on which cause code was received.
(issue #9588 , original patch by softins, updated patch from jtexter3, and some
additional feedback from mhardeman)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 18:45:38 +00:00
Christian Richter
f5f018a209
forgot one place ..
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 15:42:39 +00:00
Christian Richter
7fc236e53b
fixed a bug that was introduced by copy and paste in the last commit ..bchannels weren't cleaned properly.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 15:29:09 +00:00
Christian Richter
ede913f976
on receiption of cause:44 we mark the channel as in use and inform the user about the situation, we need to test the RESTART stuff then. Also shuffled the empty_chan_in_stack function after the bchannel cleaning functions, to avoid race conditions.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 14:47:59 +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
Christian Richter
3322095dea
when we send out a SETUP, but get no response, we should cleanup everything after reception of a hangup.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 13:23:04 +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
Christian Richter
ba372aa9a4
restart indicator 0x80 is correct, at least that's what libpri does.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-13 09:55:54 +00:00
Christian Richter
37ded96cfa
if the bridged partner is mISDN too we should not send dtmf tones, they are transmitted inband always
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 08:35:22 +00:00
Christian Richter
7bb272f942
if we have already some digits, we just stop the tones.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 07:48:52 +00:00
Christian Richter
9809905c76
added check for NULL Pointer when calling misdn_new. Asterisk does not allow us to create channels anymore when stop gracefully is used :). also modified the restart_indicator to 0
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 16:49:00 +00:00
Christian Richter
5cc2b1078e
fixed problem that the dummybc chanels had no lock, checking for the lock now. Also fixed the channel restart stuff, we can now specify and restart particular channels too.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 09:18:01 +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
Christian Richter
f002ad09a3
briding is a bool, fixed copy and paste issue.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 15:42:03 +00:00
Christian Richter
e7590d0aec
simplified the EVENT_SETUP handling in the cb_events function a lot. Commented the different possibilities a bit and made functions of shared code. When the dialed extension does not exist in the extensions.conf we'll jump into the 'i' extension if this does exist, else we disconnect the call with the cause:1 = No Route to Destination.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 15:39:43 +00:00
Nadi Sarrar
e0f4f4969c
Backport of the overlap_dial functionality from asterisk-1.4's chan_misdn.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 11:18:45 +00:00
Christian Richter
3cd1c84e8d
added possibility to deactivate bridging per port
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 10:05:45 +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