Joshua Colp [Tue, 19 Jun 2007 12:57:55 +0000 (12:57 +0000)]
Add parked call extension AFTER the parking slot has been announced, otherwise two threads will try to handle the same channel and it will go kaboom. (issue #9191 reported by japple)
Joshua Colp [Mon, 18 Jun 2007 18:13:03 +0000 (18:13 +0000)]
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)
Russell Bryant [Thu, 14 Jun 2007 20:56:19 +0000 (20:56 +0000)]
Backport rev 69010 from the 1.4 branch ...
In ast_channel_make_compatible(), just return if the channels' read and write
formats already match up. There are code paths that call this function on a
pair of channels multiple times. This made calls fail that were using g729
in some cases. The reason is that codec_g729a will unregister itself from the
list of available translators will all licenses are in use. So, the first
time the function got called, the right translation path was allocated.
However, the second time it got called, the code would not find a translation
path to/from g729 and make the call fail, even if the channel actually already
had a g729 translation path allocated.
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
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.
Joshua Colp [Fri, 8 Jun 2007 00:15:33 +0000 (00:15 +0000)]
Don't call ast_waitstream_full when the control file descriptor and audio file descriptor are not set, simply call ast_waitstream! (issue #8530 reported by rickead2000)
Russell Bryant [Thu, 7 Jun 2007 23:13:33 +0000 (23:13 +0000)]
Fix a problem where saying a character wouldn't properly break out when the caller pressed '#'
(issue #8113, reported by patbaker82, patch from jamesgolovich (hey, long time no see!) and patbaker82)
Russell Bryant [Wed, 6 Jun 2007 16:40:51 +0000 (16:40 +0000)]
We have some bug reports showing crashes due to a double free of a channel.
Add a sanity check to ast_channel_free() to make sure we don't go on trying
to free a channel that wasn't found in the channel list.
(issue #8850, and others...)
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.
Joshua Colp [Thu, 31 May 2007 16:12:39 +0000 (16:12 +0000)]
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)
we should only activate the generator in chan_misdn, when asterisk hask not yet taken the call (WAITING4DIGS state). Alerting audio will be generated fomr asterisk for example.
Russell Bryant [Tue, 22 May 2007 13:07:03 +0000 (13:07 +0000)]
Fix a memory leak that I just noticed in the device state handling in app_queue.
On most device state changes, it would leak roughly 8 to 64 bytes (the length of
the name of the device).
we stop the tones only when we're in the pre-call phase, otherwise e.g. when in CONNECTED state we should not stop tones when we receive an Information Message
Steve Murphy [Fri, 18 May 2007 20:56:20 +0000 (20:56 +0000)]
This update will fix the situation that occurs as described by 9717, where when several targets are specified for a dial, if any one them reports FAIL, the whole call gets FAIL, even though others were ringing OK. I rearranged the priorities, so that a new disposition, NULL, is at the lowest level, and the disposition get init'd to NULL. Then, next up is FAIL, and next up is BUSY, then NOANSWER, then ANSWERED. All the related set routines will only do so if the disposition value to be set to is greater than what's already there. This gives the intended effect. So, if all the targets are busy, you'd get BUSY for the call disposition. If all get BUSY, but one, and that one rings is not answered, you get NOANSWER. If by some freak of nature, the NULL value doesn't get overridden, then the disp2str routine will report NOANSWER as before.
Olle Johansson [Fri, 18 May 2007 15:12:09 +0000 (15:12 +0000)]
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.
in the case immediate=yes, we directly jump into the dialplan, where people can use PlayTones to indicate a Dialtone, so we don't need to to that by ourself. also we should not do a dialtone_indicate for incoming calls on a TE port in overlapdialmode.
Joshua Colp [Mon, 14 May 2007 18:34:06 +0000 (18:34 +0000)]
Only perform stripping of - strings from the channel name for Zap channels. Anywhere else we might remove a legitimate part of a device name. (issue #9668 reported by stevedavies)
Joshua Colp [Wed, 9 May 2007 16:51:03 +0000 (16:51 +0000)]
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)
added application misdn_check_l2l1 which tries to pull up the L1/L2 on all ports that have the layers down in a group. It waits then for a timeout. This helps for scenarios where multiple PMP BRIs are grouped together, or where a provider has a faulty PTP Implementation, that looses the L2 after a while.
Joshua Colp [Thu, 3 May 2007 16:42:19 +0000 (16:42 +0000)]
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)
when we're in state WAITING4DIGS, we use the asterisk tone-generator which prods us, so we can't just return -1 in misdn_write in this case. Added a MISDN_KEYPAD channel variable, and fixed the sending of keypad. this enables us to modify the call forward parameters in the switch.
fixed the problem that misdn_write did not return -1 when called with 0 samples in a frame this resultet in a deadlock in some circumstances, when the call ended because of a busy extension. added encoding of keypad.
increase reliability and efficiency of static Realtime config loading via ODBC:
don't request fields we aren't going to use
don't request sorting on fields that are pointless to sort on
explicitly request the fields we want, because we can't expect the database to always return them in the order they were created
(reported by blitzrage in person (!), patch by me)
Tilghman Lesher [Wed, 2 May 2007 17:38:16 +0000 (17:38 +0000)]
Issue 9638 - if a text frame is sent with no terminating NULL through a bridged
IAX connection, the remote end will receive garbage characters tacked onto the
end.
Russell Bryant [Tue, 1 May 2007 21:55:19 +0000 (21:55 +0000)]
Remove an unnecessary check that makes it so if you hang up after doing an
attended transfer before the target extension answers the channel, the transfer
is not successful. (issue #9338, patch by svanlund)
Russell Bryant [Mon, 30 Apr 2007 15:57:26 +0000 (15:57 +0000)]
This patch fixes an issue where depending on the cause code, when the network
sends a PRI disconnect, the call may not be properly hung up.
(issue #9588, reported and patched by softins)
Olle Johansson [Fri, 27 Apr 2007 13:57:45 +0000 (13:57 +0000)]
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.
Revert previous fix for when the IAX2 channel goes funky (that's the technical term). This is causing legit calls to be prematurely hung up. (issue #9600 reported by justdave)
Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)
Russell Bryant [Tue, 24 Apr 2007 21:33:59 +0000 (21:33 +0000)]
Don't crash if a manager connection provides a username that exists in
manager.conf but does not have a password, and also requests MD5
authentication. (ASA-2007-012)
added lock for sending messages to avoid double sending. shuffled some empty_chans after the cb_event calls, this avoids that a release_complete from a quite different call releases a fresh created setup by accident.
Jason Parker [Fri, 20 Apr 2007 19:49:54 +0000 (19:49 +0000)]
If the '* to hangup' option is not enabled, we don't need to disable * as a valid exit key.
If it was enabled, this statement would've never been checked in the first place.
Bug 9557 - Specifying the GetVar AMI action without a Channel parameter can
cause Asterisk to crash. The reason this needs to be fixed in the functions
instead of in AMI is because Channel can legitimately be NULL, such as when
retrieving global variables.
Add OUTBOUND_GROUP_ONCE variable to app_dial. This behaves the same as OUTBOUND_GROUP except it will get unset after use so it won't get accidentally inherited. (issue #BE-140)
Russell Bryant [Wed, 11 Apr 2007 16:01:25 +0000 (16:01 +0000)]
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)
Russell Bryant [Wed, 11 Apr 2007 15:05:36 +0000 (15:05 +0000)]
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)
Russell Bryant [Wed, 11 Apr 2007 14:02:54 +0000 (14:02 +0000)]
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)