Commit Graph

19629 Commits

Author SHA1 Message Date
David Yat Sin 2f5ac62433 added mod_distributor 2012-06-15 15:46:53 -04:00
David Yat Sin e05bd3fae8 Some changes to ss7 variables to be more consistent 2012-05-30 13:10:04 -04:00
James 91dfa062bf ss7: adding iam_fwd_ind_HEX channel variable to set forward indicator
IE's heximal value.
     - add <action application="export" data="freetdm_iam_fwd_ind_HEX=2301"/>
       to dialplan with expected hex value. If the outgoing ftdm channel's
       forward indicator needs to be changed, "export" needs to be put in the
       incoming channel's dialplan to set this variable value accordingly.
     - this implementation takes bits of A, CB, D, E, F, HG, I from the hex
       value. Bits of KJ, L, P-M are not taken from the hex.
     - How to calculate hex value with wanted bits:
       . the hex value is H-A-P-I, H is the highest bit to A, and next is P-I.
         I is the lowest bit in the whole field, and H is the highest bit in
         the whole field. Refer to Q.763 chapter 3.23.
       . use a text pad to fill in the bits with 0 and 1. eventually fill all
         the 16 bits
       . copy the binary value into a calculator and convert it to hex
2012-05-28 17:07:52 -04:00
David Yat Sin e91e4d6816 renamed sip_h_X-FreeTDM-Access-Transport to sip_h_X-FreeTDM-Access-Transport-URLENC 2012-05-18 09:57:51 -04:00
James Zhang ce46a57b85 ss7: Adding support of Access Transport IE in IAM message
Adding sip x-header and channel variable to set the value
     of Access Transport IE
2012-05-17 17:56:50 -04:00
James Zhang 4f5a6557fc freetdm: fix queue full problem
- restore flushing queue when channel state goes to down
2012-04-18 10:52:01 -04:00
James Zhang e2f1b4ab27 freetdm: fix REL receiving leg always stay in TERMINATING stae in
native bridge mode
         - This is supposed to be included in commit of
           b324f86797. Somehow it's
           not included in that commit. Without this change, the
           REL receiving leg always stay in TERMINATING state when
           received an incoming REL message.
2012-04-16 13:48:35 -04:00
James cd2d67ace1 freetdm: fixed group block/unblock state dead lock when signal link
is down and recovered later
         To re-produce this bug:
             1. do CGB on one side
             2. unplug signaling link cable
             3. plug signaling link cable back
             4. do CGU on the blocking side
             5. cic state stay in RESTART for ever
         Fix this problem by sending cic to SUSPENDED state after
         receiving/sending CGU message
2012-04-13 17:26:48 -04:00
James Zhang a796c6849c freetdm: fixed no ACM/CPG sending in some situations after native bridge
- clear up ACM_SENT & CPG_SENT flag in DOWN state in native
           bridge state machine
2012-04-13 11:18:53 -04:00
James Zhang 8d1c382632 freetdm: INR/INF implementation
- fill in IEs in INF according to INR request
         - print debug information if IE requested but not supported
2012-04-11 15:14:29 -04:00
James Zhang 16d4f1f063 freetdm: INR/INF implementation
- When NSG receives INR from network, send back INF with calling
         party category information IE and calling number information IE.
         - Introduced a new global setting of "force-inr" for testing
         purpose. Stinga generated INR/INF packets are not acceptable by
         trillium stack since it misses call related information in the
         packets. If configure force-inr to true in freetdm.conf.xml, when
         NSG receives an incoming IAM, it'll send out INR packet regardless
         of incoming IAM's IEs, and keep waiting for INF response from the
         calling side.
         - T.39 timer is introduced in order to handle INR timeout. The
         default value of T.39 is 12 seconds and is configurable according
         to spec.
         - Only supports calling number IE and calling party category IE in
         current fix. The customer only needs the calling number IE right now.
         In ISUP spec, there are 6 optional IEs. NSG only supports calling
         party number and calling category information IE since the other
         IEs are not configurable in freetdm.conf.xml or included in IAM
         message.
         - In collect state, INR/INF implementation needs to work with existed
         SAM messages. If NSG sent out INR and wait for SAM, collect state
         check both INF received and enough dialed numbers received. If one
         of these conditions are not met, it'll stay in collect state and wait
         until either conditions met or timeout. After received INF and enough
         dailed number, state moves to dailing and proceed as regular calls.
2012-04-11 11:20:32 -04:00
Anthony Minessale 7155001c86 FS-3810 --resolve 2012-04-03 18:11:32 -04:00
James Zhang 339c45b2cb freetdm: Add documentation for SS7 native bridge 2012-04-03 11:27:25 -04:00
James Zhang b324f86797 freetdm: Clean up SS7 native bridge code to separate the call control, queuing and
resource-cleanup responsibilities clearly between the 2 channels involved in the bridge

   - Each channel is responsible for clearning its own peer_data and event queue
     at the end of the call (when moving to DOWN state)

   - Each channel dequeues messages only from its own queue and enqueues messages
     in the peer's queue, with the only exception being messages received before
     the bridge is stablished (IAM for sure and possible SAM messages) because
     if the bridge is not yet stablished the messages must be queued by the channel
     in its own queue temporarily until the bridge is ready

   - When the bridge is ready it is the responsibility of the incoming channel to
     move the messages that stored temporarily in its own queue to the bridged peer queue

   - During hangup, each channel is responsible for moving itself to DOWN. The procedure
     however differs slightly depending on the hangup conditions

     If the user requests hangup (ie, FreeSWITCH) the request will be noted by setting the
     FTDM_CHANNEL_USER_HANGUP flag but will not be processed yet because call control is
     driven only by the link messages (so no hangup from ESL or command line allowed)

     When REL message comes, the channel receiving it must move to TERMINATING state and:

           - If the user has not hangup yet (FTDM_CHANNEL_USER_HANGUP flag not set) then
             notify the user via SIGEVENT_STOP and wait for the user to move to HANGUP
             state by calling ftdm_channel_call_hangup() before sending RLC

           - If the user did hangup already (FTDM_CHANNEL_USER_HANGUP flag is set) then
             skip user notification and move to HANGUP state directly where the RLC message
             will be sent

   - On HANGUP state the RLC is sent and the channel is moved to DOWN, final state
     The peer channel will forward the REL message and wait for RLC from the network, when
     RLC is received the channel can move straight to DOWN itself because the peer channel
     is completing its own shutdown procedure when it received the REL message
2012-04-03 11:23:49 -04:00
James Zhang 8a589435de freetdm: Adding condition to parse sip headers only for non-freetdm channels.
This fixes an issue where ss7 native bridge was accidentally enabled
         any time two freetdm channels were bridged regardless of the freetdm_native_sigbridge
         variable value.
2012-03-30 16:50:00 -04:00
James Zhang a2db3c24b3 freetdm: fixing more potential null pointers in native bridge mode. 2012-03-27 18:00:24 -04:00
James Zhang bfefbb5522 freetdm: fix isup timers default values 2012-03-21 10:12:59 -04:00
James Zhang a8e21663ce Revert "freeswitch: taking out -Ox cflags and have them replaced with -O0"
This reverts commit e560ddccde.
2012-03-21 10:05:51 -04:00
James Zhang 012bc154b0 Revert "freetdm: fixing default values for ISUP"
This reverts commit f1d80cd25d.
2012-03-21 10:00:27 -04:00
James Zhang e560ddccde freeswitch: taking out -Ox cflags and have them replaced with -O0
we dont want to optimize out symbols for debugging
2012-03-20 11:56:29 -04:00
James Zhang f1d80cd25d freetdm: fixing default values for ISUP 2012-03-16 16:09:54 -04:00
James Zhang 10277be8d6 freetdm: synchronizing fixes in releases.3.5 version
- glare
         - cgb/cgu range bug
         - inhibit/uninhibit
2012-03-16 11:40:21 -04:00
James Zhang 19f01bf50a freetdm: fixing a potential crash on a rarely happened situation 2012-03-15 18:05:47 -04:00
Moises Silva 3c4fdca9e0 freetdm: Fix redmine issue #2931 - Crash on SIP to SS7 call after sigbridge call
The code was improperly using peer_data as an indicator that the sigbridge
         ss7 mode was enabled. The channel flag FTDM_CHANNEL_NATIVE_SIGBRDIGE should
         be used instead
2012-03-07 19:04:31 -05:00
James Zhang eeec65265a freetdm: fixing format and loc_nadi value according to review board No. 98 2012-02-24 16:32:44 -05:00
James Zhang 713b55cd58 freetdm: fixing improper log position in tx acm function 2012-02-16 18:33:00 -05:00
James Zhang 3f43b053a0 freetdm: adding x-ocn-* headers for incoming sip calls 2012-02-16 16:49:51 -05:00
Moises Silva 1f34c9301e freetdm: Remove optimistic sanity check, prints spurious error messages 2012-02-16 16:08:21 -05:00
James Zhang 4ccc26f08b freetdm: Fix improper logging statement when doing native ss7 bridge (peer_chan was set to the SIP leg) 2012-02-16 15:15:22 -05:00
James Zhang 8c8d649221 freetdm: Add support to set/receive location and original call number SS7 elements through variables (including SIP X headers) 2012-02-16 15:14:06 -05:00
Moises Silva a6e868f588 freetdm: Fix spirou certification native bridge issue
- The outgoing tdm leg should not move to UP until
           after the IAM is sent at the end of the function
         - The UP state should be processed immediately otherwise
           the state processor is not run due to the way the main
           ss7 processing loop currently works
2012-02-16 14:49:18 -05:00
Moises Silva cca407d09a freetdm: Fix bug in SS7 state processing introduced during the changes
for native bridging that caused infinite SUSPEND state executions
         due to peer member not being cleared at the end of the call
2012-01-31 15:18:53 -05:00
James Zhang c9c68a7759 freetdm: Some more clean up for ss7 event cloning
- The queue size has been bumped again, long calls could potentially require more elements (multiple resume/suspend)
         - The queue is only used when there is a call active
2012-01-30 19:15:02 -05:00
James Zhang b6c02364a7 freetdm: Reduce the size of the span peer channels and ss7 info per channel clone event queues 2012-01-30 18:26:08 -05:00
James Zhang d1a772bfe9 freetdm: Only hangup with user message when release location information is set 2012-01-30 18:02:26 -05:00
James Zhang c1ad567742 freetdm: removing sus|res|rel commands 2012-01-30 17:37:57 -05:00
James Zhang 14d8b42e58 freetdm: testing code of sending suspend message 2012-01-30 13:19:36 -05:00
James Zhang 777f946e2f freetdm: adding susp/resm/rels but not finished.
disable t6 finished.
2012-01-30 10:28:08 -05:00
Moises Silva 8476d66465 freetdm: Cancel ISUP T6 timer when using native bridge (Spirou certification fix) 2012-01-27 18:54:06 +01:00
Moises Silva 3199513c96 freetdm: More spirou certification changes
- Send RLC immediately even when in native bridge mode
         - Do not enqueue RLC coming from the network
2012-01-27 16:22:45 +01:00
Moises Silva 572154693e freetdm: spirou certification specific changes about RDNIS/RDINF usage 2012-01-27 16:21:53 +01:00
Moises Silva de56f3c465 freetdm: spirou transparent IAM fix for called number 2012-01-27 14:42:33 +01:00
Moises Silva 0ff8a087c6 freetdm: Fix incorrect state transition from DOWN to UP when processing an SS7 clone event 2012-01-27 06:44:11 -05:00
Moises Silva 2db41c5c79 freetdm: Fix uninitialized var leading to segfault 2012-01-27 06:34:36 -05:00
Moises Silva a83f04ab6a freetdm: Relay the rest of SS7 messages supported by libsng_ss7 when in native bridge mode 2012-01-27 00:13:59 -05:00
Moises Silva 1aa4f87b6a freetdm: Tweaks to SS7 native bridge feature
- Enable native bridge also when receiving the UUID via SIP header
         - Remove some debug CRIT messages and set a more proper log level
2012-01-26 23:51:21 -05:00
Moises Silva 9fc8395b31 Merge remote branch 'origin/jz.SPIROU' into releases.3.4.bridge_hack 2012-01-26 23:34:20 -05:00
Moises Silva f2cdb8c6c7 freetdm: Fixes for native signaling bridge (now tested, and works for basic call flows)
- Fix typo when unlocking channel that resulted in deadlock
         - Defer clearing of the peer data until it is completely safe (next call)
2012-01-26 23:31:29 -05:00
Moises Silva 23a328389b freetdm: Initial attempt to bridge natively SS7 signaling between 2 channels 2012-01-26 22:44:19 -05:00
James Zhang 71c3cf365a FreeTDM: adding sip_h_X-FreeTDM-RDNIS-Presentation in redirecting number
to give the ability to change RDNIS Presentation value for
           Transparent IAM
2012-01-26 19:25:04 -05:00