aboutsummaryrefslogtreecommitdiffstats
path: root/channels
AgeCommit message (Collapse)AuthorFilesLines
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
2008-08-15initialize condition variable ss_thread_complete using ast_cond_initjpeeler1-1/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138238 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15declared static mutexes using AST_MUTEX_DEFINE_STATIC macrojpeeler1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138151 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15Fixes the dahdi restart functionality. Dahdi restart allows one to restart ↵jpeeler1-62/+234
all DAHDI channels, even if they are currently in use. This is different from unloading and then loading the module since unloading requires the use count to be zero. Reloading the module is different in that the signalling is not changed from what it was originally configured. Also, this fixes not closing all the file descriptors for D-channels upon module unload (which would prevent loading the module afterwards). (closes issue #11017) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138119 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-14Oops, wrong directiontilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@137850 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-14When creating the secondary subchannel name, it is necessary to compare totilghman1-1/+1
the existing channel name without the "Zap/" or "DAHDI/" prefix, since our test string is also without that prefix. (closes issue #13027) Reported by: dferrer Patches: chan_zap-1.4.21.1_fix2.patch uploaded by dferrer (license 525) (Slightly modified by me, to compensate for both names) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@137847 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-14add support for Zaptel versions that contain the new transcoder interfacekpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@137677 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-13Register DAHDISendKeypadFacility application if dahdi_chan_mode is set to ↵jpeeler1-3/+27
DAHDI + Zap. Mark ZapSendKeypadFacility application as deprecated on usage. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@137580 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-13document dahdichanname option in doc/asterisk-conf.txtkpfleming1-8/+15
make chan_dahdi read its configuration from zapata.conf if dahdichanname has been set to 'no' git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@137527 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07Also, parse useincomingcalleridonzaptransfer (and add appropriate deprecationtilghman1-1/+7
warnings). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@136348 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07For backwards compatibility with previous 1.4 versions which used "zapchan"tilghman1-1/+1
in users.conf, ensure that we still support it. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@136304 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06* The allowed_bearers setting in misdn.conf misspelled onermudgett2-75/+90
of its options: digital_restricted. * Fixed some other spelling errors and typos. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@136241 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06Since adding the AST_CONTROL_SRCUPDATE frame type,mmichelson1-3/+1
there are places where ast_rtp_new_source may be called where the tech_pvt of a channel may not yet have an rtp structure allocated. This caused a crash in chan_skinny, which was fixed earlier, but now the same crash has been reported against chan_h323 as well. It seems that the best solution is to modify ast_rtp_new_source to not attempt to set the marker bit if the rtp structure passed in is NULL. This change to ast_rtp_new_source also allows the removal of what is now a redundant pointer check from chan_skinny. (closes issue #13247) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@136062 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05In a conversion to use ast_strlen_zero, the meaning of the flag IAX_HASCALLERIDtilghman1-19/+6
was perverted. This change reverts IAX2 to the original meaning, which was, that the callerid set on the client should be overridden on the server, even if that means the resulting callerid is blank. In other words, if you set "callerid=" in the IAX config, then the callerid should be overridden to blank, even if set on the client. Note that there's a distinction, even on realtime, between the field not existing (NULL in databases) and the field existing, but set to blank (override callerid to blank). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@135747 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-01fix some potential deadlocks in chan_skinnymvanbaak1-0/+4
(closes issue #13215) Reported by: qwell Patches: 2008080100_bug13215.diff.txt uploaded by mvanbaak (license 7) Tested by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@135055 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31In case we have some processing threads that free more frames than they ↵russell1-8/+19
allocate, do not let the frame cache grow forever. (closes issue #13160) Reported by: tavius Tested by: tavius, russell git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@134814 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-29build against the now-typedef-free dahdi/user.hkpfleming1-36/+36
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@134254 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-25Fix some errant device states by making the devicestate API more strict intilghman1-0/+8
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: http://svn.digium.com/svn/asterisk/branches/1.4@133649 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-25We need to make sure to null-terminate the "name"mmichelson1-0/+2
portion of SIP URI parameters so that there are no bogus comparisons. Thanks to bbryant for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133572 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-24Fix rtautoclear and rtcachefriendstilghman1-5/+11
(Closes issue #12707) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133488 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23inbandrelease is gone - it's now inbanddisconnectqwell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133295 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23make some more changes to the dahdi/zap channel name support stuff to ensure ↵kpfleming1-4/+4
allthe globals are 'const', and clean up mmichelson's changes to app_chanspy to simplify the code git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133226 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23As suggested by seanbright, the PSEUDO_CHAN_LEN in mmichelson1-1/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@133169 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-23Small cleanup. Move the declaration of the DAHDI_SPANINFOmmichelson1-3/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@133038 f38db490-d61c-443f-a65b-d21fe96a405b