Commit Graph

4487 Commits

Author SHA1 Message Date
Kevin P. Fleming
7b61edde36 build against the now-typedef-free dahdi/user.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@134254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-29 22:05:57 +00:00
Tilghman Lesher
c5b4e1aec8 Fix some errant device states by making the devicestate API more strict in
terms of the device argument (only without the unique identifier appended).
(closes issue #12771)
 Reported by: davidw
 Patches: 
       20080717__bug12771.diff.txt uploaded by Corydon76 (license 14)
 Tested by: davidw, jvandal, murf


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-25 17:19:39 +00:00
Mark Michelson
a99f3d9365 We need to make sure to null-terminate the "name"
portion of SIP URI parameters so that there are no
bogus comparisons.

Thanks to bbryant for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-25 14:40:10 +00:00
Tilghman Lesher
580ca7408c Fix rtautoclear and rtcachefriends
(Closes issue #12707)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-24 21:17:55 +00:00
Jason Parker
82e28307c0 inbandrelease is gone - it's now inbanddisconnect
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 21:49:03 +00:00
Kevin P. Fleming
cd12517eeb make some more changes to the dahdi/zap channel name support stuff to ensure allthe globals are 'const', and clean up mmichelson's changes to app_chanspy to simplify the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 20:42:30 +00:00
Mark Michelson
252c5728fc As suggested by seanbright, the PSEUDO_CHAN_LEN in
app_chanspy should be set at load time, not at compile
time, since dahdi_chan_name is determined at load time.

Also changed the next_unique_id_to_use to have the 
static qualifier.

Also added the dahdi_chan_name_len variable so that
strlen(dahdi_chan_name) isn't necessary. Thanks to
seanbright for the suggestion.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@133169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-23 19:39:47 +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
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
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
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
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
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
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
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
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
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
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
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
Kevin P. Fleming
92ef406265 new installations should be using DAHDI instead of Zaptel, so the sample config file is now chan_dahdi.conf instead of zapata.conf
also, convert remaining references to zapata.conf in various places



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 16:08:03 +00:00
Kevin P. Fleming
2ea77b3508 add support for a configuration parameter for 'inband audio during RELEASE', which is currently mandatory in libpri-1.4.4 but will become configurable in libpri-1.4.5 later today
(related to issue #13042)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 15:41:56 +00:00
Tilghman Lesher
411e8582c3 Correctly deal with duplicate NEW frames (due to retransmission). Also, fixup
the destination call number matching to be more strict and reliable.
(closes issue #12963)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_dup_new_fix3.patch uploaded by jpgrayson (license 492)
 Tested by: jpgrayson, Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-10 21:57:05 +00:00
Tilghman Lesher
e46bb5f5bc Cause SIP to return a 480 instead of a 404 when a sip peer exists, but is not
registered.
(closes issue #12885)
 Reported by: ibc
 Patches: 
       20080701__bug12885__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: ibc


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 20:27:47 +00:00
Tilghman Lesher
56e30a7677 Timestamp decoding for video mini-frames is bogus, because the timestamp only
includes 15 bits, unlike voice frames, which contain a 16-bit timestamp.
(closes issue #13013)
 Reported by: jpgrayson
 Patches: 
       chan_iax2_unwrap_ts.patch uploaded by jpgrayson (license 492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:45:23 +00:00
Olle Johansson
3b0f179912 Don't hangup the call if we can't resolve the Contact if there's a proxy
route set for the call.
----
This comment was added a while ago and today it hit me badly. 

/* OEJ: Possible issue that may need a check:
	If we have a proxy route between us and the device,
	should we care about resolving the contact
	or should we just send it?
*/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 09:52:21 +00:00
Olle Johansson
9a253f3fe6 Fix issues where repeated messages where ignored, but retransmitted reliably instead of unreliably.
Reported by: johan
Patches: 
      12746.txt uploaded by oej (license 306)
Tested by: johan
(issue #12746)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 09:06:08 +00:00
Russell Bryant
626914d267 Fix handling of when a pvt disappears. Properly return the pvt locked
and don't hold the pvt lock while destroying the ast_channel.

(closes issue #13014)
Reported by: jpgrayson
Patches:
      chan_iax2_ast_iax2_new2.patch uploaded by jpgrayson (license 492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 22:41:48 +00:00
Sean Bright
bb95fdcdab Remove spurious trailing whitespace from log messages and fix a spelling error
in a log message.

(closes issue #13017)
Reported by: jpgrayson
Patches:
      chan_iax2_space_after_newline.patch uploaded by jpgrayson (license 492)
      chan_iax2_spelling.patch uploaded by jpgrayson (license 492)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 20:47:56 +00:00
Mark Michelson
2ac560c495 By using the iaxdynamicthreadcount to identify a thread, it was possible
for thread identifiers to be duplicated. By using a globally-unique monotonically-
increasing integer, this is now avoided.

(closes issue #13009)
Reported by: jpgrayson
Patches:
      chan_iax2_dyn_threadnum.patch uploaded by jpgrayson (license 492)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@128639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-07 17:02:28 +00:00
Steve Murphy
e9f5152eba The CDRfix4/5/6 omnibus cdr fixes.
(closes issue #10927)
Reported by: murf
Tested by: murf, deeperror

(closes issue #12907)
Reported by: falves11
Tested by: murf, falves11


(closes issue #11849)
Reported by: greyvoip

As to 11849, I think these changes fix the core problems 
brought up in that bug, but perhaps not the more global
problems created by the limitations of CDR's themselves
not being oriented around transfers.

Reopen if necc, but bug reports are not the best
medium for enhancement discussions. We need to start
a second-generation CDR standardization effort to cover
transfers.

(closes issue #11093)
Reported by: rossbeer
Tested by: greyvoip, murf




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 00:16:25 +00:00
Mark Michelson
27a3ead8a7 Fix thread-safety of some of the pbx_builtin_getvar_helper calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 20:47:38 +00:00
Tilghman Lesher
a904d0f74f Disable the old, slow search for matching callno in chan_iax2 (but allow it to be reenabled for debugging)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 20:25:37 +00:00
Tilghman Lesher
be6ac151e8 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 19:05:28 +00:00
Tilghman Lesher
00b8646ae2 Change around how we schedule pings and lagrqs, and fix a reason why the
jobs were not getting properly cancelled.
(closes issue #12903)
 Reported by: stevedavies
 Patches: 
       20080620__bug12903__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: stevedavies


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 18:52:53 +00:00
Tilghman Lesher
f2946061d0 Suppress annoying warning by finding the remaining cases where the callno is not in the hash.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@126999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 16:50:46 +00:00
Olle Johansson
d3ba59fdc7 Use domain part of SIP uri in register= configuration as fromdomain.
Reported by: one47
Patches: 
      sip-reg-fromdom2.dpatch uploaded by one47 (license 23)
(closes issue #12474)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@126902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 14:59:31 +00:00
Olle Johansson
c68c56c3f6 Handle escaped URI's in call pickups. Patch by oej and IgorG.
Reported by: IgorG
Patches: 
      bug12299-11062-v2.patch uploaded by IgorG (license 20)
Tested by: IgorG, oej
(closes issue #12299)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@126899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 14:27:33 +00:00