aboutsummaryrefslogtreecommitdiffstats
path: root/channels
AgeCommit message (Collapse)AuthorFilesLines
2008-10-17Correctly allow chan_dahdi to compile against older versions of Zaptel.qwell1-2/+2
Don't always define HAVE_ZAPTEL_CHANALARMS (since we check if it's defined..) Minor cleanup to make things clear. (closes issue #13726) Reported by: tzafrir Patches: dahdi_def.diff uploaded by tzafrir (license 46) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@150557 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-16Fix memory leak found by customerrmudgett1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@150124 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-15fix some problems when parsing SIP messages that have the maximum number of ↵kpfleming1-13/+24
headers or body lines that we support git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@149452 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14Change this warning to an error message. Suggestionmmichelson1-1/+1
comes from Sean Bright. Thanks Sean! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@149266 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14Call register_peer_exten even in the case that the peer'smmichelson1-9/+11
IP/port does not change. (closes issue #13309) Reported by: dimas Patches: v2-13309.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@149207 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14Don't allow reserved characters to be used in registermmichelson1-0/+21
lines in sip.conf. (closes issue #13570) Reported by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@149130 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14Deadlock prevention in chan_local.mmichelson1-0/+4
(closes issue #13676) Reported by: tacvbo Patches: 13676.patch uploaded by putnopvut (license 60) Tested by: tacvbo git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@148912 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08when parsing a text configuration option, ensure that the buffer on the ↵kpfleming1-2/+3
stack is actually large enough to hold the legal values of that option, and also ensure that sscanf() knows to stop parsing if it would overrun the buffer (without these changes, specifying "buffers=...,immediate" would overflow the buffer on the stack, and could not have worked as expected) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@147681 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-07revert this change until i can understand why it results in locking order ↵kpfleming1-20/+14
changes git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@147430 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-07don't start a PBX on incoming PRI call channels until after we're done ↵kpfleming1-14/+20
setting channel variables and other things on the channel, otherwise the channel might go away (if the dialplan hangs up quickly) before we are done, which results in a spectacular crash git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@147429 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Dialplan functions should not actually return 0, unless they have modified thetilghman2-0/+8
workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Check whether an extension exists in the _call method, rather than the _alloctilghman1-0/+12
method, because we need to evaluate the callerid (since that data affects whether an extension exists). (closes issue #13343) Reported by: efutch Patches: 20080915__bug13343.diff.txt uploaded by Corydon76 (license 14) Tested by: efutch git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146711 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06ensure that the private structure for pseudo channels is created without ↵kpfleming1-7/+6
'leaking' configuration data from other configured channels (closes issue #13555) Reported by: jeffg Patches: issue_13555.patch uploaded by kpfleming (license 421) Tested by: jeffg git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146643 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-05Fix silly formatting.qwell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146448 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-30channels/chan_misdn.crmudgett5-2158/+2254
channels/misdn/isdn_lib.c * Miscellaneous other fixes from trunk to make merging easier later. ........ r145200 | rmudgett | 2008-09-30 16:00:54 -0500 (Tue, 30 Sep 2008) | 7 lines * Miscellaneous formatting changes to make v1.4 and trunk more merge compatible in the mISDN area. channels/chan_misdn.c * Eliminated redundant code in cb_events() EVENT_SETUP ........ r144257 | crichter | 2008-09-24 03:42:55 -0500 (Wed, 24 Sep 2008) | 9 lines improved helptext of misdn_set_opt. ........ r142181 | rmudgett | 2008-09-09 12:30:52 -0500 (Tue, 09 Sep 2008) | 1 line Cleaned up comment ........ r138738 | rmudgett | 2008-08-18 16:07:28 -0500 (Mon, 18 Aug 2008) | 30 lines channels/chan_misdn.c * Made bearer2str() use allowed_bearers_array[] * Made use the causes.h defines instead of hardcoded numbers. * Made use Asterisk presentation indicator values if either of the mISDN presentation or screen options are negative. * Updated the misdn_set_opt application option descriptions. * Renamed the awkward Caller ID presentation misdn_set_opt application option value not_screened to restricted. Deprecated the not_screened option value. channels/misdn/isdn_lib.c * Made use the causes.h defines instead of hardcoded numbers. * Fixed some spelling errors and typos. * Added all defined facility code strings to fac2str(). channels/misdn/isdn_lib.h * Added doxygen comments to struct misdn_bchannel. channels/misdn/isdn_lib_intern.h * Added doxygen comments to struct misdn_stack. channels/misdn_config.c configs/misdn.conf.sample * Updated the mISDN presentation and screen parameter descriptions. doc/misdn.txt (doc/tex/misdn.tex) * Updated the misdn_set_opt application option descriptions. * Fixed some spelling errors and typos. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@145293 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-25(closes issue #12101)murf1-1/+8
Reported by: MVF Tested by: neutrino88, urzedo, murf, thiagofernandes Many thanks to neutrino88 for this patch, which solves a problem whereby channels get a CANCEL request, respond to it properly, but end up in a hung state, infinitely being rescheduled. This fix is a bit crude, in that catches the problem at a rather late phase, but it may prevent infinite rescheduling problems that might still arise. It might have been better to find out why, in the course of protocol handling, the channel was not destroyed, but we leave that to future generations. Many thanks to urzedo and thiagofernandes for their work in verifying that the patch code indeed is being executing, and averting the problem. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@144420 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-24improved helptext of misdn_set_opt.crichter1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@144238 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-18A micro-fix, in sip_park_thread, where d is freed before the func is done ↵murf1-1/+1
using it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@143534 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-15Set the raw formats at the same time as the other formats.tilghman1-2/+2
(closes issue #13240) Reported by: jvandal Patches: 20080813__bug13240.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@143140 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12(closes issue #12965)jpeeler1-0/+4
Reported by: rlsutton2 Prevents local channels from playing MOH at each other which was causing ast_generic_bridge to loop much faster. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@142927 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create rules for disallowing contacts at certain addresses, which maytilghman1-7/+37
improve the security of various installations. As this does not change any default behavior, it is not classified as a direct security fix for anything within Asterisk, but may help PBX admins better secure their SIP servers. (closes issue #11776) Reported by: ibc Patches: 20080829__bug11776.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, blitzrage git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@142865 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-09Make sure that the branch sent in CANCEL requestsmmichelson1-1/+6
matches the branch of the INVITE it is cancelling. (closes issue #13381) Reported by: atca_pres Patches: 13381v2.patch uploaded by putnopvut (license 60) Tested by: atca_pres (closes issue #13198) Reported by: rickead2000 Tested by: rickead2000 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@142218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-09When determining if codecs used by SIP peers allowmmichelson1-1/+1
the media to be natively bridged, use the jointcapability instead of the peercapability. It seems that the intent of using the peercapability was to expand the choice of codecs for the call to increase the chances of being able to native bridge the channels. The problem is that if a codec were settled on for the native bridge and that wasn't a codec that was configured to be used by Asterisk for that peer, then Asterisk would send a REINVITE with no codecs in the SDP which is a bug no matter how you slice it. (closes issue #13076) Reported by: ramonpeek Patches: 13076.patch uploaded by putnopvut (license 60) Tested by: tbelder git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@142079 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-08Fix pedantic mode of chan_sip to only check themmichelson1-7/+23
remote tag of an endpoint once a dialog has been confirmed. Up until that point, it is possible and legal for the far-end to send provisional responses with a different To: tag each time. With this patch applied, these provisional messages will not cause a matching problem. (closes issue #11536) Reported by: ibc Patches: 11536v2.patch uploaded by putnopvut (license 60) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@141809 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-06This fix comes from Joshua Colp The Brilliant, who, given the trace, came up ↵murf1-0/+2
with a solution. This will most likely will close 13235 and 13409. I'll wait till Monday to verify, and then close these bugs. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@141565 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-05Agent's should not try to call a channel's indicate callbackmmichelson1-1/+1
if the channel has been hung up. It will likely crash otherwise ABE-1159 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@141366 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-05Commit 140417 had a logic flaw in it whichmmichelson1-3/+3
caused port 5060 to always be used when dialing a peer if no explicit port was specified. This broke the behavior of implicitly using the port from which the peer registered if no port is specified. This commit fixes the logic flaw. (closes issue #13424) Reported by: mdu113 Patches: 13424.patch uploaded by putnopvut (license 60) Tested by: mdu113 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@141217 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-02Make sure to use the correct length of the mohinterpret and mohsuggestseanbright1-2/+2
buffers when copying configuration values. (closes issue #13336) Reported by: decryptus_proformatique Patches: chan_iax2_mohinterpret_mohsuggest_general_settings.patch uploaded by decryptus (license 555) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140605 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29After working on the ao2_containers branch, I noticedmmichelson1-3/+3
something a bit strange. In all cases where we provide a callback function to ao2_container_alloc, the callback function would only return 0 or CMP_MATCH. After inspecting the ao2_callback() code carefully, I found that if you're only looking for one specific item, then you should return CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue traversing the current bucket until the end searching for more matches. In cases like chan_iax2 where in 1.4, all the peers are shoved into a single bucket, this makes for potentially terrible performance since the entire bucket will be traversed even if the peer is one of the first ones come across in the bucket. All the changes I have made were for cases where the callback function defined was passed to ao2_container_alloc so that calls to ao2_find could find a unique instance of whatever object was being stored in the container. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140488 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-29Fix SIP's parsing so that if a port is specifiedmmichelson1-1/+5
in a string to Dial(), it is not ignored. (closes issue #13355) Reported by: acunningham Patches: 13355v2.patch uploaded by putnopvut (license 60) Tested by: acunningham git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140417 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-27Fix tag checking in get_sip_pvt_byid_locked whenmmichelson1-8/+17
in pedantic mode. The problem was that the wrong tags would be compared depending on the direction of the call. (closes issue #13353) Reported by: flefoll Patches: chan_sip.c.br14.139015.patch-refer-pedantic uploaded by flefoll (license 244) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140299 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-26add HAVE_PRI if define around dahdi_close_pri_fdjpeeler1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140115 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-26Fix some bogus scheduler usage in chan_sip. This code used the return valuerussell1-5/+9
of a completely unrelated function to determine whether the scheduler should be run or not. This would have caused the scheduler to not run in cases where it should have. Also, leave a note about another scheduler issue that needs to be addressed at some point. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140060 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-26(closes issue #12071)jpeeler1-58/+31
Reported by: tzafrir Patches: dahdi_close.diff uploaded by tzafrir (license 46) Tested by: tzafrir, jpeeler This patch fixes closing open file descriptors in the case of an error. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140056 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-26Fix a race condition with the IAX scheduler thread. A lock and condition arerussell1-3/+2
used here to allow newly scheduled tasks to wake up the scheduler just in case the new task needs to run sooner than the current wakeup time when the thread is sleeping. However, there was a race condition such that a newly scheduled task would not properly wake up the scheduler or affect the wake up period. The order of execution would have been: 1) Scheduler thread determines wake up time of N ms. 2) Another thread schedules a task and signals the condition, with an execution time of < N ms. 3) Scheduler thread locks and goes to sleep for N ms. By moving the sleep time determination to inside the critical section, this possibility is avoided. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140051 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-26correct a file location in an error messagekpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140029 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-25Make SIPADDHEADER() propagate indefinitelytwilson1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139869 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-22Fix the build. Thanks, mvanbaak!mmichelson1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139466 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-22Prevent a deadlock in chan_iax2 resulting frommmichelson1-1/+4
incorrect locking order between iax2_pvt and ast_channel structures. AST-13 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139456 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-21Fixes loop that could possibly never exit in the event of a channel never ↵jpeeler1-1/+3
being able to be opened or specify after a restart. (closes issue #11017) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139387 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-21Apply fix for issue #13310 to branch 1.4, too.phsultan1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139283 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-20Backport support for Zaptel/DAHDI channel-level alarms from trunk/1.6, ↵kpfleming1-3/+22
because not doing so just makes it difficult for people with channels that are in alarm when Asterisk starts up to get them going once the alarm is cleared (closes issue #12160) Reported by: tzafrir Patches: asterisk-chanalarms_14.patch uploaded by tzafrir (license 46) Tested by: tzafrir git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139145 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-20sip_read should properly handle a NULL return from sip_rtp_read.mmichelson1-1/+1
(closes issue #13257) Reported by: travishein git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139015 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-19Reset agent_pvt variables back to the values in agents.confmmichelson1-1/+9
(from what the corresponding channel variables were set to) when the agent logs out. (closes issue #13098) Reported by: davidw Patches: 20080731__issue13098_agent_ackcall_not_reset.diff uploaded by bbryant (license 36) Tested by: davidw git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138942 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-19Add configuration option to chan_dahdi.conf to allow buffering policy and ↵jpeeler1-17/+38
number of buffers to be configured per channel. Syntax: buffers=<num of buffers>,<policy> Where the number of buffers is some non-negative integer and the policy is either "full", "half", or "immediate". git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138938 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-18You know what's awesome? Code that compiles... ;)seanbright1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138569 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-18fix compilation warningsjpeeler1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138516 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-16fixes use count to properly decrement if an active dahdi channel is ↵jpeeler1-0/+1
destroyed allowing module to be unloaded git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138360 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15add forgotten locks around ss_thread_count in ss_thread for dahdi restartjpeeler1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138309 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15More fixes for realtime peers.tilghman1-30/+41
(closes issue #12921) Reported by: Nuitari Patches: 20080804__bug12921.diff.txt uploaded by Corydon76 (license 14) 20080815__bug12921.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138258 f38db490-d61c-443f-a65b-d21fe96a405b