Commit Graph

2906 Commits

Author SHA1 Message Date
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
Christian Richter
17175c7d54 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 09:19:58 +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
Kevin P. Fleming
9edd1e094c if we are going to set variables on a newly created channel, it should be done *before* we start the PBX on it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 20:06:13 +00:00
Russell Bryant
2f0f1f5e00 Revert revision 62417 as someone reported problems with it to Mark. This was
related to issue #9588.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 13:06:17 +00:00
Christian Richter
0b6da8d56e 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
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 07:46:39 +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
Christian Richter
58bcd919d5 fixed a warning regarding Keypad encoding. encode the IE sending_complete at the right position.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 11:23:11 +00:00
Christian Richter
06b2955d26 we *need* to send a PROCEEDING when sending_complete is set, even if need_more_infos is requested.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 08:24:08 +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
Christian Richter
b60fd4bc20 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 08:23:42 +00:00
Jason Parker
074cc21291 Fix an issue with trying to kill a thread before it gets created.
Issue 9709, patch by nic_bellamy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 23:14:55 +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
Matthew Fredrickson
818c25352e Make sure we only create a DSP if it's requested on SUB_REAL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 17:20:20 +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
Christian Richter
fcad34fd9f release_chan frees ch, so we should never touch ch after release_chan, this may cause segfaults.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 11:26:16 +00:00
Christian Richter
048000f9d6 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 15:07:37 +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
Christian Richter
2102128500 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 15:39:21 +00:00
Christian Richter
70e95c4846 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 13:59:00 +00:00
Tilghman Lesher
9b71a5799b 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 17:38:16 +00:00
Russell Bryant
274afdc345 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 15:57:26 +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
babe9cbbef 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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 16:30:57 +00:00
Kevin P. Fleming
cd3ef82ba4 handle a very bizarre race condition with channels being redirected before a simple switch can be started on them (issue #9286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 22:24:59 +00:00
Russell Bryant
bc604c9e9a If the callerid= option is specified, but empty, clear any previous data.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 21:55:23 +00:00
Russell Bryant
85cff883ee Ensure that callerid settings are reset on a reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 21:06:22 +00:00
Russell Bryant
eab557da86 Fix a typo where cid_num got copied instead of cid_ani.
(issue #9587, reported and patched by xrg)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 16:20:38 +00:00