2547 Commits

Author SHA1 Message Date
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
Jeff Lenk
f5abef2000 FS-3728 --resolve thanks 2011-11-30 08:57:11 -06: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
Stefan Knoblich
2de175b574 ftmod_libpri: Improve output of ftdm libpri api 'invalid span' error messages.
No more "invalid span", now it's either "'foo' not a libpri span" or
"'foo' span not found" which makes it a lot more useful.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-11-18 23:58:01 +01:00
Stefan Knoblich
5897ec5992 ftmod_libpri: Print usage if 'ftdm libpri' has no arguments.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-11-18 23:58:00 +01: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
Michael Jerris
4936b11cc8 remove log message being sent 100s of times a second until someone can figure out what is causing it 2011-11-10 22:59:43 -05:00
Michael Jerris
2be49bdf79 remove log message being sent 100s of times a second until someone can figure out what is causing it 2011-11-10 22:11:42 -05:00
Moises Silva
b9ad924e83 freetdm: ftmod_zt - Fix references to ftdmtel that should be Zaptel/DAHDI (screwed up during OpenZAP -> FreeTDM renaming) 2011-11-10 15:16:07 -05:00
Moises Silva
0153f603cb freetdm: fix pri tap progress event handling 2011-11-09 11:16:58 -05:00
David Yat Sin
8558ec9f0a Added support for freetdm_isdn.send_cid_name 2011-11-09 11:01:32 -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
David Yat Sin
3ecddde752 Support for sending Caller ID Name on 4ESS/5ESS 2011-11-03 19:37:05 -04:00
David Yat Sin
6f2e3f91ec Support for sending Caller ID Name on 4ESS/5ESS 2011-11-03 19:23:00 -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
Stefan Knoblich
91ef437bd5 FreeTDM: Add ax_compiler_vendor.m4 to acinclude.m4
This fixes a "AX_COMPILER_VENDOR: command not found" error on
systems with older autotools versions (CentOS 5.x in this case).

Not a problem on newer auto* toolchains, they either ignore
acinclude.m4 completely or handle it in a different way.

(In fact, acinclude.m4 is not even needed for the one on CentOS 5,
 but we'll keep it for now.)

Tested-on: CentOS 5.7 x86_64 autoconf 2.59 / automake 1.9.6 / libtool 1.5.22
Tested-on: Gentoo 20111031 x86_64 autoconf 2.68 / automake 1.11 / libtool 2.4
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-11-01 15:37:51 +01: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
David Yat Sin
5ee015610c freetdm: Added some code to differentiate between wanpipe_wait returning FTDM_TIMEOUT and FTDM_FAIL on transmit 2011-10-31 10:25:07 -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
Marc Olivier Chouinard
d185978f8d mod_freetdm/libpri: Fix problem with some destination using early-media for IVR. FS wasn't switching to accept the media of the early media provided in some type of ISDN msg. This fix it for the situation I've experienced. 2011-10-28 15:18:58 -04:00
Moises Silva
fe1294ba91 freetdm: ss7 - add china switchtype to the configuration options 2011-10-28 09:36:40 -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
Stefan Knoblich
ec72d8d7fc FreeTDM: Rework libpri detection code to accept a custom installation prefix.
Example: --with-libpri=/usr/local

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-10-26 19:41:07 +02: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