Commit Graph

5569 Commits

Author SHA1 Message Date
Nenad Corbic 485746305a Set the cpu thresholds to 92 and 82
Set the 3000ms warning to NOTICE not CRIT
2011-12-16 10:06:57 -05:00
Nenad Corbic 732a0ed2de Fix for 3000ms timeout on hangup.
Where FS does not hangup the channel with in 3sec.
Without this fix, it was possible that 2 FS sessions
use the single span/chan freetdm session.
Merged the feature from git master of freetdm
2011-12-15 20:39:38 -05:00
Nenad Corbic 494947bf59 Reverted the previous commit of doing nothing on RESTART while in PAUSE 2011-12-15 15:50:58 -05:00
Nenad Corbic b057d873cf Added a retry on configuraiton.
Its possible to timeout on ISUP ckt config in scenarios
of huge load.
2011-12-15 15:47:41 -05:00
Nenad Corbic ce9ce53b2d Fixed the previous commit 2011-12-14 20:06:57 -05:00
Nenad Corbic 9db322f2e0 Fixed hw alarm crash. When we get hw alarm in the middle of configuration.
It can happen with large number of circuits.

On RESTART if we are PAUSED do not try to send RESET and stay in RESTART state
2011-12-14 19:56:25 -05:00
James Zhang 1cbeb33b2d freetdm: adding support of x-headers for Redirection Information
X-FreeTDM-RDINF-Indicator
         X-FreeTDM-RDINF-OrigReason
         X-FreeTDM-RDINF-Count
         X-FreeTDM-RDINF-Reason
2011-12-06 15:38:05 -05:00
James Zhang e582586876 Freetdm: adding X-FreeTDM-ANI-NADI and X-FreeTDM-DNIS-NADI support 2011-12-05 16:58:26 -05:00
Moises Silva b3297c7f3b freetdm: fix license path to use sngss7 path limits
do not use strcpy, use ftdm_set_string which is safer
         do not use strcpy when snprintf is safer and cleaner
2011-12-02 11:37:55 -05:00
James Zhang 9bf25413ed Merge branch 'releases.3.4' of git.sangoma.com:smg_freeswitch into releases.3.4 2011-12-01 19:22:27 -05:00
James Zhang 35df4f468c Update to the SUSPEND state machine updated 2 commits ago.
SUSPEND will not only change the return state in few
cases.

I have retested all test cases from previous 2 commits.

What is missing is timer for each Tx Event.  RSC,BLO,UBL.
Its possible to loose a message from Slave via relay to Master.
If that ever occours we will not know what state we are in.
Thus we need a timer that will re-transmit a packet if
it does not get acknowledged.
2011-12-01 19:18:54 -05:00
Moises Silva 3432dccfc2 freetdm: fix cpu monitor inconsistent messages, variable names etc
changed parameter name from cpu_reset_alarm_threshold to cpu_clear_alarm_threshold
         (old parameter name still valid for backwards compatibility in configuration files)
2011-12-01 12:21:46 -05:00
wadam 16c2da1369 Merge branch 'releases.3.4' of ssh://git.sangoma.com/smg_freeswitch into releases.3.4 2011-12-01 11:43:08 -05:00
wadam 6dabe5409b Fixed Bug#2018 - The threshold of cpu warning message should be increased 2011-12-01 11:40:18 -05:00
James Zhang 7b83dd4c96 Fixed the exception condition - trigger reset
used to clear ckt_flags, this was wrong.
	if ctk_flags are blindly cleard a PAUSE might be cleared.
	changed the code to clear only TX RESET and try to reset again.

Release Collision
	If we get out of sync with other side we must
	reset the circuit.
    This condition occoured at 1+3 test box

Local Management Block
    Its possible for stack to send us a BLO indicating to us
    that we are local blocked.  This case never worked and
    we would get stuck there forever.
    If we never manaully sent a LOCAL block, the BLO from
    the stack will be acked and then unblocked.
    This condition occoured at 1+3 test box
2011-12-01 03:16:59 -05:00
James Zhang 997c127a94 Fixed following two secnarios
From previous commit, failed to clear the done flag _DN
which cause SUSPEND to think that there was a block
pending, causing state to remain in RESTART

S UP -> relay down -> Tx AIS -> relay up -> Tx AIS off
  -> confirm all back up
  -> In this condition BLO will not go out due to PAUSE

S UP -> Tx AIS -> relay down -> Tx AIS off -> relay up
  -> confirm all back up
  -> In this condition UBL will not go out due to PAUSE
2011-11-30 20:02:25 -05:00
James Zhang fa64d3954d Sigificant changes to the core state machine :)
Visually status of channels will only be DOWN once all resets/blocks are cleared.
Therefore if any reset/block is active on a channel, the channel state will be in RESTART not DOWN.

Logic Change

SUSPENDED
   -> Originally used as intermediate state. Purpose is to handle a condition
      from any state and go back to the previous state.
      Conditions: such as  block/ucic.
   -> Updated logic is that SUSPEND will be smart enough not to
      go back to just any state.  SUSPEND will only go back to
      UP - if call is still up
      RESTART - if for any reason singaling is not up due to
                blocks/resets/etc...
      DOWN - if signaling is UP - no resets/blocks
      In this case we avoid infinite loops due to state jumping
      from STATE->SUSPEND->STATE->SUSPEND
HANGUP_COMPLETE
   -> If call is in use and a RESET comes on a call
      the RESTART state will first try the HANGUP_COMPLETE state.
      HANGUP_COMPLETE will Tx RSC and wait for it.
      Reset Response handle was updated if current state HANGUP/HANGUP_COMPLETE
      go back to RESTART state.  Which will call HANGUP COMPLETE due to
      channel in usage and HANDLE_COMPLETE will clear RESET condition and go back to DOWN
TERMINATING
   -> This state is used to hangup a call. Sends a signal to FS.
   -> Usually TERMINATING state stays in TERMINATING until FS comes back.
   -> I added a condition in case of RESET on the line though TERMINATING
      will go back to RESTART.
      This allows us to process RESET commands even though we are
      in the middle of hanging up.
Block Handler
   If BLO is received on circuit is already blocked,
   we failed to trasmit BLA.  We should always ack the BLO
   even though it was alrady in blocked state.

Fixed & Tested

S UP --> place call --> relay down --> hangup --> relay up-->
   Confirm that call is hungup properly.
   In this condition, on relay up the circuit  is put into RESET.
   Since circuit is still in use, it will HANGUP first, then RESET
   then clear pending BLOCK.

S UP --> place call -> Tx RSC on call.
   Used to cause infitie loop
   Confirm call is cleard properly

Re-Tested

S UP --> place call -> Rx RSC on call
   Confirm call is cleard properly

S UP --> place call -> Rx BLO -> hangup -> place call
   Confirm call cannot be placed
   Tx UBL
   Confirm call can be placed

S UP --> place call -> Rx BLO -> Tx BLO -> hangup -> place call
   Confirm call cannot be placed
   Tx UBL
   Confirm call cannot be placed
   Rx UBL
   Confirm call can be placed

S UP --> place call -> relay down --> Rx BLO on channel from telco
     --> relay up
   Confirm that relay detects the BLO channels even though relay was down

Tx AIS -> S Start -> Confirm HW block -> Tx AIS off
   -> Confirm hw block clear and UP

S UP -> Tx AIS -> Confirm HW block -> Tx AIS off
   -> confirm hw block clear and UP

S UP -> relay down -> Tx AIS -> relay up -> Tx AIS off
   -> confirm all back up
   -> In this condition BLO will not go out due to PAUSE

S UP -> Tx AIS -> relay down -> Tx AIS off -> relay up
   -> confirm all back up
   -> In this condition UBL will not go out due to PAUSE
2011-11-30 19:11:33 -05:00
James Zhang 96068d901d Fixed case
S UP - Place Call - relay down - Hangup - relay up -
Confirm Call hangsup up properly and unblock is set.

Fixed unexpeced reset condidtions.
2011-11-29 13:11:38 -05:00
James Zhang 5b8af78a89 Fixed 5 relay conditions
M UP  -> S UP
M Down -> S UP -> M UP
M UP -> S UP -> relay down -> relay up
M UP -> S UP -> Kill M -> M UP
M Up -> S UP -> relay down -> M link down -> relay up -> M link up
2011-11-25 21:05:39 -05:00
Nenad Corbic 69c62f7b38 Fixed the out of sequence frame condition
Redmine Bug#1966
IAM ->
<-REL
<-ACM
<-ANM

ACM sets the reset flag
ANM sets the group reset flag
when both reset flags are set we got into infinite loop
2011-11-24 19:19:58 -05:00
James Zhang cb1d5be5e6 freetdm: fix redirection presentation number in X-header 2011-11-17 15:43:40 -05:00
James Zhang e293c12535 freetdm: fix loc_nadi value 2011-11-15 18:26:13 -05:00
James Zhang 552405024a freetdm: fixing relay must start after master.
relay - configuring circuits only when resume is recieved.
	 master - configuring relay after all the others are configured.
2011-11-15 14:46:57 -05:00
James Zhang dcdb5f18eb freetdm: fixing RDNIS-Screen value mis-displaying string in decimal format 2011-11-14 16:42:23 -05:00
wadam 5c4a3f81a2 Fix error in call reference conversion to string.
src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
  cc1: warnings being treated as errors
  src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c: In function
  'handle_con_ind':
  src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c:255: warning: format '%x'
  expects type 'unsigned int', but argument 3 has type 'U32'
  make[6]: *** [ftmod_sangoma_ss7_la-ftmod_sangoma_ss7_handle.lo] Error 1
2011-11-07 22:26:02 -05:00
root 08e01bb5a2 freetdm: fix generic number 2011-11-07 17:32:02 -05:00
root f0631fc87e freetdm: change call reference number to HEX string format 2011-11-07 16:37:11 -05:00
root 3552e329ca freetdm: fix sip header wrong value of NADI
error was caused by printing string value to integer
2011-11-07 12:53:32 -05:00
Nenad Corbic 5dd076c81f freetdm: Allow for backward compatibility.
cpg_on_progress_media is default to TRUE if not xml option exists.
         transparent_iam_max_size added to ccspan.  Gloal value is used
         if transparent_iam_max_size is not in ccSpan.
2011-11-07 00:08:38 -05:00
Nenad Corbic 4b25044ac6 freetdm: Made CPG optional on configuration file
Fixes in hw alarm - no need to set hw unblock if hw block did not execute yet.
         Minor bug fixes
2011-11-03 20:04:26 -04:00
Nenad Corbic 69f6f20fd2 freetdm: on hander do not go up unless all channel blocks/restes are cleared
Added more documentation in main
2011-11-03 14:29:47 -04:00
Nenad Corbic 953cd77f95 freetdm: Fixed blocks/unblocks resets. Performed conformance tests
Fixed hw alarm handling: physical ids were not used which caused alarms
         read wrong.
         Tested sip hold
         Group blocks/unblock
         Group reset
         Link down-> block -> unblock
         FS start with link down then link up
         FS start with link up, take link down and up -> make incoming call
2011-11-02 20:53:14 -04:00
Nenad Corbic 503a898b98 Merge remote branch 'qa-master/releases.3.4' into releases.3.4 2011-11-02 12:34:28 -04:00
Nenad Corbic 429b2944e5 freetdm: reset to reset not GRS - take2 2011-10-31 23:57:45 -04:00
Nenad Corbic c98d8b49d9 freetdm: Default to individual reset not GRS 2011-10-31 23:56:39 -04:00
Nenad Corbic d5e90dfbf0 Merge remote branch 'qa-master/releases.3.4' into releases.3.4 2011-10-29 00:08:47 -04:00
Moises Silva acfdddabbb freetdm: ss7 - add china switchtype to the configuration options 2011-10-28 09:35:49 -04:00
Nenad Corbic 08768608e6 freetdm: on handle alarm must check TRAP or CLEAR cannot use default case 2011-10-26 16:56:47 -04:00
Nenad Corbic d442c188eb freetdm: More debugging 2011-10-26 16:37:44 -04:00
Nenad Corbic 44895d738d freetdm: On alarm off event make sure that we had alarm on before issuing HW UNBLOCK 2011-10-26 16:34:56 -04:00
Nenad Corbic d0188836f8 freetdm: Do not set hw block clear flag on startup if port is already up 2011-10-26 16:17:11 -04:00
Nenad Corbic 0e2b85ddf4 freetdm: Add debugging 2011-10-26 16:09:32 -04:00
Nenad Corbic de2836e76a freetdm: Its possible to get HW ALARM clear even though we never got the initial alarm.
Only send out an unblock if block was sent from hw alarm and there are no
         maintenance blocks pending.
2011-10-26 14:57:27 -04:00
Nenad Corbic fd6d18d56c freetdm: Fixed GRA - added group reset by default on startup 2011-10-26 14:33:28 -04:00
Nenad Corbic 859d3b0ed5 Added GRS on startup by default 2011-10-26 13:05:12 -04:00
Nenad Corbic 79c1ed7dc1 freetdm: fixed reset tx after unequiped cic; reset sent flag was not being cleared 2011-10-25 20:29:22 -04:00
Nenad Corbic 982bcf4146 freetdm: added debugging - changed order of block/unblock 2011-10-25 19:04:50 -04:00
Nenad Corbic f8ae7e7464 freetdm: ftmod_ss7_enable_grp_mtp3Link - wait no wait based on proc 2011-10-25 18:44:28 -04:00
Nenad Corbic 7f746b4298 freetdm: added nowait mtp3 commands if proc ids dont match 2011-10-25 18:36:37 -04:00
Nenad Corbic 1d3d165822 freetdm: ftdm_running checks on handle, implemented no wait block 2011-10-25 18:05:41 -04:00
Moises Silva 13e6e7bb04 freetdm: added debug ftdm_print_stack macro 2011-10-25 17:13:07 -04:00
Nenad Corbic fc997aaea4 freetdm: logging fixes, ss7 events sanity checks 2011-10-24 19:40:45 -04:00
Moises Silva 563460ce15 freetdm: mod_freetdm - add SIP x header for FreeTDM-NADI value 2011-10-24 13:21:15 -04:00
Moises Silva d79f95f2d6 freetdm: * Avoid acquiring the span mutex if the pendingchans queue is available for use *
* FreeTDM modules using the old FTDM_SPAN_STATE_CHANGE flag should be updated   *
         * until then, they are still vulnerable to deadlock situations                  *
         * Modules pending update: (ftmod_analog, ftmod_libpri, ftmod_isdn)              *
         * Fixes Sangoma redmine ticket #1791 0 FTDM span stop deadlock                  *
2011-10-24 12:43:54 -04:00
James Zhang 4aa0285a22 freetdm: CDR - location number implementation (for incoming and outgoing calls) 2011-10-12 17:44:52 -04:00
James Zhang 711091751b Merge remote branch 'origin/releases.3.4' into releases.3.4 2011-10-06 18:55:57 -04:00
James Zhang 8ccd5f0e13 freetdm: ss7 - fixing reset on in-use channel causing signaling down in the receiving side 2011-10-06 18:53:38 -04:00
Moises Silva 4ece7e6ffd freetdm: ftmod_wanpipe - remove debug idle messages for good, not worth the noise 2011-10-06 17:55:45 -04:00
yannick f1257ab8b5 ftdm: fixing reset on in-use channel causing infinite state loop. 2011-10-06 17:36:50 -04:00
Moises Silva c82f1ecabd freetdm: Added SS7 variables for location number (pending SIP-X header integration) 2011-10-06 12:46:30 -04:00
James Zhang ccc81f3207 ftdm: change max_path length from 255 to 4096 2011-09-30 16:03:08 -04:00
root 595454126b freetdm: changing call reference to generic header; removing location area code 2011-09-30 13:09:13 -04:00
James Zhang dbd6bb9a83 fixing bug 1625 - relay status not reported properly in the cli 2011-09-30 11:52:33 -04:00
James Zhang f43eecbab3 ftdm_ss7: Adding OPC and Call Reference Number to SIP x-headers 2011-09-30 10:25:21 -04:00
Moises Silva b828442052 freetdm: Fix SS7 ISUP T10 (Overlap digit timeout) - issue #1445 2011-09-28 19:17:40 -04:00
Moises Silva 1ba6d277fa freetdm: Fix SS7 T35 timer 2011-09-28 13:24:54 -04:00
James Zhang d9fe71f024 freetdm: changing git user to be James Zhang - last commit of mtp2 relay fixing was mine 2011-09-27 15:46:40 -04:00
yannick 5ca31e9fbf freetdm: resolve mtp2 on relay always down problem 2011-09-27 15:44:20 -04:00
Moises Silva d89f3afdc2 freetdm: Manually merged relay code from branch jz.smg_ss7 (based on releases.3.3)
- Added relay and other misc commands
        - Misc fixes in hardware blocks, hw alarm etc
	- Fix crash on shutdown in relay
2011-09-21 15:15:19 -04:00
David Yat Sin b2fa7e3139 freetdm: Fix for sending CPG without sending ACM prior to that 2011-09-20 19:17:04 -04:00
Moises Silva 8a3c697794 Merge branch 'master' into smgmaster 2011-09-15 12:57:25 -04:00
Moises Silva 4cdd74dccd freetdm: ss7 test pattern should be SANGOMA 2011-09-15 12:51:01 -04:00
Moises Silva 199e4397b5 freetdm: do not warn on io status changes, leave as debug messages 2011-09-15 12:50:30 -04:00
Moises Silva efc3de5934 Merge branch 'master' into smgmaster 2011-09-15 12:09:20 -04:00
Moises Silva d6f3a02b94 freetdm: fix compile issue with previous commit (undeclared function) 2011-09-15 12:08:32 -04:00
Moises Silva 9aa887fe2b freetdm: SS7 - CIC value stored in freetdm_ss7_cic variable (cherry-picked from releases.3.3)
Conflicts:

	libs/freetdm/mod_freetdm/mod_freetdm.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
2011-09-15 12:04:23 -04:00
Moises Silva ccdd76b126 Merge branch 'master' into smgmaster 2011-09-15 09:53:55 -04:00
David Yat Sin fa858fa3cc chlog: freetdm: SS7 - added TX of CPG message in progress media state 2011-08-08 13:23:30 -04:00
Moises Silva 3b2203b71b freetdm: default iostats to yes and allow configuration thru freetdm.conf 2011-08-03 20:30:39 -04:00
Moises Silva 8735906a5d freetdm: fix typo in ftmod_sangoma_isdn.h causing compilation error 2011-08-03 20:12:26 -04:00
Moises Silva bdf4b99238 Merge remote branch 'smgfs/master' 2011-08-03 17:46:45 -04:00
David Yat Sin 0b7d857545 freetdm: fixed errors introduced when Redirection Number was implemented 2011-08-03 17:28:56 -04:00
Moises Silva c3f719c80d freetdm: fix typo in iostats command - print proper tx queue size and length 2011-08-03 13:05:02 -04:00
David Yat Sin 6fe23b69d2 freetdm: ISDN - added #ifdef for backward compatibility 2011-08-03 13:04:22 -04:00
David Yat Sin 4e020e2f23 Merge remote branch 'smgfs/master' 2011-08-03 11:57:55 -04:00
David Yat Sin 473fd0ce89 freetdm: ISDN - allow reception of NOTIFY msg 2011-08-03 11:53:40 -04:00
David Yat Sin 65bac44b32 freetdm: ISDN - Added function to transmission of NOTIFY msg 2011-08-03 10:52:18 -04:00
Jeff Lenk 5d37bc9455 OPENZAP-171 --resolve 2011-08-03 09:05:01 -05:00
Anthony Minessale bc177a4b28 FS-3475 --resolve 2011-08-02 13:51:57 -05:00
Anthony Minessale 71dd3ca86c force an update on sqlite build 2011-08-02 13:05:45 -05:00
Anthony Minessale b6bed14ff6 make strdup NULL return strdup("") in sqlite for mac bug 2011-08-01 10:02:31 -05:00
Anthony Minessale ed23847574 fix mac build 2011-08-01 10:01:50 -05:00
Jeff Lenk 02bb35148d trivial compiler warning 2011-08-01 10:39:11 -05:00
Jeff Lenk 2b6a4f97c3 trivial portability issues c89 2011-08-01 09:48:08 -05:00
Anthony Minessale 3e029f0dfb add capture hooks to libsofia 2011-07-31 18:36:05 -05:00
Moises Silva 68b887c760 freetdm: allow IO statistics access to users
added ftdm iostats command
2011-07-30 17:40:32 -04:00
Moises Silva f68d351fdd freetdm: refactoring of the CLI, it was getting way too ugly! 2011-07-29 19:35:10 -04:00
Moises Silva 43a8683a4a Merge branch 'master' into smgmaster 2011-07-29 17:07:24 -04:00
Moises Silva dcbfa9a876 Merge remote-tracking branch 'fsorig/master' 2011-07-29 17:06:00 -04:00
Moises Silva d07d4896d4 Merge branch 'master' into smgmaster 2011-07-29 17:03:11 -04:00