1 /* 2 * Copyright (c) 2009, Konrad Hammel <konrad@sangoma.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * * Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * * Neither the name of the original author; nor the names of any contributors 17 * may be used to endorse or promote products derived from this software 18 * without specific prior written permission. 19 * 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 25 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34 /* INCLUDE ********************************************************************/ 35 #include "ftmod_sangoma_ss7_main.h" 36 /******************************************************************************/ 37 38 /* DEFINES ********************************************************************/ 39 /******************************************************************************/ 40 41 /* GLOBALS ********************************************************************/ 42 43 /******************************************************************************/ 44 45 /* PROTOTYPES *****************************************************************/ 46 void handle_isup_t35(void *userdata); 47 /******************************************************************************/ 48 49 /* FUNCTIONS ******************************************************************/ 50 void handle_isup_t35(void *userdata) 51 { 52 SS7_FUNC_TRACE_ENTER(__FUNCTION__); 53 54 sngss7_timer_data_t *timer = userdata; 55 sngss7_chan_data_t *sngss7_info = timer->sngss7_info; 56 ftdm_channel_t *ftdmchan = sngss7_info->ftdmchan; 57 58 /* now that we have the right channel...put a lock on it so no-one else can use it */ 59 ftdm_mutex_lock(ftdmchan->mutex); 60 61 SS7_ERROR("[Call-Control] Timer 35 expired on CIC = %d\n", sngss7_info->circuit->cic); 62 63 /* set the flag to indicate this hangup is started from the local side */ 64 sngss7_set_flag(sngss7_info, FLAG_LOCAL_REL); 65 66 /* hang up on timer expiry */ 67 ftdmchan->caller_data.hangup_cause = 28; 68 69 /* end the call */ 70 ftdm_set_state_locked(ftdmchan, FTDM_CHANNEL_STATE_CANCEL); 71 72 /*unlock*/ 73 ftdm_mutex_unlock(ftdmchan->mutex); 74 75 SS7_FUNC_TRACE_EXIT(__FUNCTION__); 76 return; 77 } 78 /******************************************************************************/ 79 /* For Emacs: 80 * Local Variables: 81 * mode:c 82 * indent-tabs-mode:t 83 * tab-width:4 84 * c-basic-offset:4 85 * End: 86 * For VIM: 87 * vim:set softtabstop=4 shiftwidth=4 tabstop=4: 88 */ 89 /******************************************************************************/ 90