Commit Graph

12764 Commits

Author SHA1 Message Date
Mark Michelson
ba642db1f4 Update the "last" channel in next_channel in app_chanspy so
that the same pseudo channel isn't constantly returned.

related to issue #13124



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 18:57:17 +00:00
Mark Michelson
1fbde6a2f3 Small cleanup. Move the declaration of the DAHDI_SPANINFO
variable to the block where it is used. This allows one
less #ifdef HAVE_PRI to clutter things up.

Thanks to Tzafrir for pointing this out on #asterisk-dev



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 17:50:01 +00:00
Mark Michelson
32bc585a57 Fix building of chan_dahdi when HAVE_PRI is not
defined.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 17:05:04 +00:00
Kevin P. Fleming
b134688e7e ensure that after a channel is created, if it happened to be in 'channel alarm' state, when that alarm clears we won't generate a spurious 'alarm cleared' message
(closes issue #12160)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 15:52:29 +00:00
Kevin P. Fleming
f6d7c63346 minor optimization for stringfields: when a field is being set to a larger value than it currently contains and it happens to be the most recent field allocated from the currentl pool, it is possible to 'grow' it without having to waste the space it is currently using (or potentially even allocate a new pool)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 11:52:18 +00:00
Christian Richter
b6ca1a1b06 another Fix because of r119585, this commit has broken high frequented BRI Ports, there was a possibility that a channel, that was marked as in_use would be reused later, the corresponding port could got stuck then. So it is recommended to upgrade for chan_misdn users.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 11:37:50 +00:00
Mark Michelson
d6aef7347a Allow Spiraled INVITEs to work correctly within Asterisk.
Prior to this change, a spiraled INVITE would cause a 482
Loop Detected to be sent to the caller. With this change,
if a potential loop is detected, the Request-URI is inspected
to see if it has changed from what was originally received. If
pedantic mode is on, then this inspection is fully RFC 3261
compliant. If pedantic mode is not on, then a string comparison
is used to test the equality of the two R-URIs.

This has been tested by using OpenSER to rewrite the R-URI
and send the INVITE back to Asterisk.

(closes issue #7403)
Reported by: stephen_dredge



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 22:14:24 +00:00
Kevin P. Fleming
6a0bcc4754 fix up namespace pollution for dahdi_chan_mode enum
correct registration of AMI actions in chan_dahdi; in zap-only mode, only register the Zap flavors of the actions (and use Zap prefixes for headers and acks), but in dahdi+zap mode, register both Zap and DAHDI flavors of actions



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 22:11:01 +00:00
Kevin P. Fleming
99d9727a84 add rules to create preprocessor output... useful for debugging macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 22:09:37 +00:00
Tilghman Lesher
04614238c5 Merged revisions 132711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r132711 | tilghman | 2008-07-22 16:14:10 -0500 (Tue, 22 Jul 2008) | 2 lines

Fixes for AST-2008-010 and AST-2008-011

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 21:19:39 +00:00
Kevin P. Fleming
08a0f08234 ensure that if any alarms exist at channel creation time, they are handled identically to if they occurred later, so that later alarm clearing will work properly and 'make sense'
(closes issue #12160)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 21:17:23 +00:00
Kevin P. Fleming
5ef465d386 make AST_C_COMPILE_CHECK able to print a 'pretty' description of what it is doing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 20:49:41 +00:00
Olle Johansson
fe25fe728c The most common question on the #asterisk iRC channel and on mailing lists
seems to be in regards to an error message when retransmit fails. This
is frequently misunderstood as a failure of Asterisk, not a failure of
the network to reach the other party.

This document tries to assist the Asterisk user in sorting out these
issues by explaining the logic and pointing at some possible 
causes. Hopefully, we will get other questions now :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 20:10:26 +00:00
Kevin P. Fleming
e2c41c9ee4 correct wording in comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 19:57:43 +00:00
Kevin P. Fleming
0faccba9cb use renamed libpri API call for controlling this feature (was improperly named before)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 19:49:11 +00:00
Kevin P. Fleming
6ef40852de teach chan_dahdi how to find the D-channel on BRI spans, and don't attempt to use channel 24 as a D-channel on spans of unexpected sizes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 22:45:16 +00:00
Brett Bryant
222f6d733a Fix a bug where SENDTEXTSTATUS isn't set properly when it isn't
supported on a channel (yet _another_ useful patch by eliel).

(issue #13081)
Reported by: eliel
Patches:
      app_sendtext1.4.c uploaded by eliel (license 64)
Tested by: eliel


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 20:51:45 +00:00
Brett Bryant
2172cc71b1 Fix a bug in 1.4 branch with iax2 channels not being removed when a call was rejected (from the calling box, not the box that denied the
registration). Related to revisions 132466 in trunk, and 132467 in 1.6.0. Earlier I had accidently tested 1.4 with a backport from those revisions, 
so I didn't see this problem (oops).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 20:30:12 +00:00
Kevin P. Fleming
00228e42d0 grant a license exception to allow distribution of Asterisk binaries that use the UW IMAP Toolkit (which is licensed under a non-GPL-compatible license)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-19 16:45:52 +00:00
Tilghman Lesher
31fec93dca Fix for Taiwanese number syntax
(closes issue #12319)
 Reported by: CharlesWang
 Patches: 
       saynumber-tw-1.4.18.1.patch uploaded by CharlesWang (license 444)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 19:06:10 +00:00
Tilghman Lesher
678b90e2a0 Textual clarification
(closes issue #13106)
 Reported by: flefoll
 Patches: 
       config.c.br14.120173.patch-unknown-directive uploaded by flefoll (license 244)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 18:47:50 +00:00
Tilghman Lesher
79b6c3f9d6 Spinlock within the destroy, to allow a scheduled job to continue, if it's
waiting on the mutex which the destroy thread has.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@132042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 17:33:42 +00:00
Tilghman Lesher
0f738146e8 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 17:10:01 +00:00
Tilghman Lesher
89b6e63a8b Preserve ABI compatibility with last change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:46:23 +00:00
Tilghman Lesher
64bbce9b9b Make the ast_assert call within ast_sched_del report something useful.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:30:31 +00:00
Kevin P. Fleming
ced50934cb remove the dlfcn compatibility stuff, because no platforms that Asterisk currently runs on it use it, and it doesn't build anyway
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:15:41 +00:00
Brett Bryant
5d4058b41a Fix a bug in blind transfers where the BLINDTRANSFER variable isn't always set to the other end of the blind transfer.
(closes issue #12586)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 15:34:42 +00:00
Tilghman Lesher
e0baf8a871 Revert part of issue #5620 (revision 6965) as it appears that it was in error.
This should fix talk call progress on analog lines.
(closes issue #12178)
 Reported by: michael-fig
 Patches: 
       20080717__bug12178.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 20:35:44 +00:00
Brett Bryant
8a427aed77 Fix a bug in iax2 registration that allowed peers to register with
case-insensitive names (user_cmp_cb and peer_cmp_cb are now both 
case-sensitive).

(closes issue #13091)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 22:17:07 +00:00
Tilghman Lesher
b0586bd055 Apparently, in certain cases, a callno is already destroyed when iax2_destroy is called.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 21:46:06 +00:00
Russell Bryant
4fb20c3291 Always ensure that the channel's tech_pvt reference is NULL after calling the
destroy callback.
(closes issue #13060)
Reported by: jpgrayson
Patches:
      chan_iax2_tech_pvt_crash.patch uploaded by jpgrayson (license 492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 20:47:53 +00:00
Mark Michelson
592497392b Move the init_queue call back to where it used to be (changed
Sept 12 last year). It was moved then to prevent a memory leak.
Since then, the same memory leak recurred and was fixed in a 
better way.

Now it has been found that the placement of this init_queue
call can cause problems if a realtime queue has values changed
to an empty string. The problem is that the default value
for that queue parameter would not be set.

(closes issue #13084)
Reported by: elbriga



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 20:23:02 +00:00
Mark Michelson
47924ba64d Apparently, "thread safety" is important, whatever
that means. :P

(Thanks Russell!)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 19:37:08 +00:00
Mark Michelson
e10908c6d2 Make absolutely certain that the transfer datastore
is removed from the calling channel once the caller
is finished in the queue. This could have weird con-
sequences when dialing local queue members when multiple
transfers occur on a single call.

Also fixed a memory leak that would occur when an
attended transfer occurred from a queue member.

(closes issue #13047)
Reported by: festr



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 18:57:34 +00:00
Steve Murphy
3fcfa47611 (closes issue #13090)
Reported by: murf

The problem was that, esoteric as it is, because the hangerupper
context immediately preceded the std-priv-extent macro, that 
the checking code accidentally would fall from traversing hangerupper
into the std-priv-exten macro, where it would hit the hangerupper
in the 'includes', and proceed into an infinite recursion.

A small fix to traverse into the statements of the context instead
of the context solves this issue.

I also added some commented out printfs for debug, which were pretty
handy in the face of a dorky gdb.

This was a problem around since the package was first written;
but evidently pretty rare in turning up in the field.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 17:53:43 +00:00
Michiel van Baak
4a3a733924 remove 4 lines of redundant code.
(closes issue #13080)
Reported by: gknispel_proformatique
Patches:
      trunk_ast_cdr_setapp.patch uploaded by gknispel (license 261)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@131012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-15 17:47:15 +00:00
Tilghman Lesher
9fda1e767c astman_send_error does not need a newline appended -- the API takes care of
that for us.
(closes issue #13068)
 Reported by: gknispel_proformatique
 Patches: 
       asterisk_1_4_astman_send.patch uploaded by gknispel (license 261)
       asterisk_trunk_astman_send.patch uploaded by gknispel (license 261)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-15 17:19:13 +00:00
Tilghman Lesher
b2947c0348 Override the callerid in all cases when the callerid is set in the user, not
just when a remote callerid is set.  Also, if not set in the user, allow the
remote CallerID to pass through.
(closes issue #12875)
 Reported by: dimas
 Patches: 
       20080714__bug12875.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 23:59:13 +00:00
Mark Michelson
cb503c4cb4 Add a check to the CAN_EARLY_BRIDGE macro in app_dial to
be sure there are no audiohooks present on the channels
involved. This fixed a one-way audio situation I had in
my test setup. I couldn't find any open issues that suggested
one-way audio with regards to mixmonitor (or other audiohook)
usage, though.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 17:50:21 +00:00
Michiel van Baak
dd1c912f45 notify the user that dnsmgr refresh wont work when dnsmgr is not enabled.
Previously this command would automagically appear and disappear.
This was confusing.

(closes issue #12796)
Reported by: chappell
Patches:
      dnsmgr_refresh_3.diff uploaded by chappell (license 8)
Tested by: russell, chappell, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 17:10:21 +00:00
Russell Bryant
2d8ce72343 Bump up the debug level for a message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 10:38:14 +00:00
Michiel van Baak
b47deb444c fix memory leak when originate from manager cannot create a thread
(closes issue #13069)
Reported by: gknispel_proformatique
Patches:
      asterisk_trunk_action_originate.patch uploaded by gknispel (license 261)
	  Tested by: gknispel_proformatique, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-13 22:48:51 +00:00
Tilghman Lesher
95c8fc64bc Reverting 2 changesets, as it breaks incoming IAX2 calls
(Related to issue #12963)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-13 17:56:10 +00:00
Michiel van Baak
32a392ae0c in 1.4 the functions still have | as argument seperator.
This commit fixes the use of RAND in the ael random function.

(closes issue #13061)
Reported by: danpwi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-12 10:25:52 +00:00
Kevin P. Fleming
17c5dbc3a5 forcibly remove the modules that are changing names
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 22:23:29 +00:00
Kevin P. Fleming
75c6f9ab0f a whole pile of Zaptel/DAHDI compatibility work, with lots more to come... this tree is not yet ready for users to be easily upgrading or switching, but it needs to be :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 22:12:26 +00:00
Mark Michelson
c6d393a0bf Remove redundant logic
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 20:03:23 +00:00
Mark Michelson
6edecf4598 Fix a typo in audiohook_read_frame_both.
While this change has not been proven to fix any
specific issue, it is incorrect and could cause
unforeseen problems.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 19:13:29 +00:00
Tilghman Lesher
4e59c52935 Ensure that a destination callno of 0 will not match for frames that do not
start a dialog (new, lagrq, and ping).
(closes issue #12963)
 Reported by: russellb
 Patches: 
       chan_iax2_dup_new_fix4.patch uploaded by jpgrayson (license 492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:51:56 +00:00
Tilghman Lesher
f29986aac8 Pass the devicestate from an underlying channel up through the Agent channel.
This should make the Agent always report the correct device state, even when
the underlying channel is used for other purposes.
(closes issue #12773)
 Reported by: davidw
 Patches: 
       20080710__bug12773.diff.txt uploaded by Corydon76 (license 14)
 Tested by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 16:50:42 +00:00