46.7. Redirecting

46.7.1. What is redirecting

The purpose of the Redirecting number information element is to identify to the diverted-to user the number from which diversion was invoked.

In normal calls there are CALLED NUMBER and CALLING NUMBER information elements, where the CALLING NUMBER contains the number of the user that is originating the call.

When the user is receiving a call and wants to redirect the call to another number he has to make a second call and internally connect the two calls. The second call can be done in two ways:

  • Normal call

    CALLING NUMBER contains the number of the user which is making the second call, i.e. the redirecting user.

  • Redirecting call

    CALLING NUMBER contains the number of ORIGINAL CALLER and add a REDIRECTING NUMBER that contains the number of the redirecting user.

The REDIRECTING NUMBER can be inserted by Abilis when performing the call forwards, the unconditional call transfers, and the third part transfers (3pTransfer), but it can also be received from a peer over a ISDN, CLUS, VO, SIP, and may be IAX interfaces.

Both situations has to be handled appropriately, with a great attention to the calling number VALIDATION which is present in all interfaces (NUM/NUMx for CLUS, NET-NUM for CTIVO, SIP/IAX-CG-NUM and CTISIP/CTIIAX table, NUM for ISDN).

46.7.2. Redirecting call generated by Abilis

For all interfaces are added the corresponding parameters:

  • CTIP-CF-CGO:[*, USER]

  • CLUS-CF-CGO:[*, USER]

  • VO-CF-CGO:[*, USER]

  • SIP-CF-CGO:[*, USER]

  • IAX-CF-CGO:[*, USER]

    • USER: the call not include the RG element, the call becomes a Normal call.

    • *: the call include the RG (REDIRECTING NUMBER ) element, even if empty.

      • The CALLING NUMBER contain the original calling number.

      • The REDIRECTING NUMBER contain the number assigned to the user.

        [Note]Note

        If assigned number results empty (e.g. NUM:# or NUM:r*, etc), the REDIRECTING NUMBER is present but empty.

46.7.3. Redirecting call received by Abilis

To Enable/Disable support for incoming REDIRECTING NUMBER for CLUS, SIP, IAX is needed to configure the RG-IN:[DISABLE, ENABLE] parameter:

  • DISABLE:

    • For CLUS:

      • If NUM: not equal to "*" it is verified according to NUMx and NUM parameters, rewritten with NUM-IN-REWRITE then passed to CTIR.

      • If NUM:* it is passed unnmodified and NUM-IN-REWRITE ignored.

    • For SIP: The incoming CALLING NUMBER is verified according to SIP-CG-NUM parameter then passed to CTIR.

    • For IAX: The incoming CALLING NUMBER is verified according to IAX-CG-NUM parameter then passed to CTIR.

  • ENABLE

    • Incoming call WITHOUT REDIRECTING NUMBER

      • Same behaviour as for DISABLE.

    • Incoming call WITH REDIRECTING NUMBER:

      • For CLUS:

        • The incoming CALLING NUMBER is passed unmodified to CTIR.

        • If NUM: not equal to "*" the REDIRECTING NUMBER is verified according to NUMx and NUM parameters, rewritten with NUM-IN-REWRITE then passed to CTIR.

      • For SIP:

        • The incoming CALLING NUMBER is passed unmodified to CTIR.

        • The incoming REDIRECTING NUMBER is verified according to SIP-CG-NUM then passed to CTIR.

      • For IAX:

        • The incoming CALLING NUMBER is passed unmodified to CTIR.

        • The incoming REDIRECTING NUMBER is verified according to IAX-CG-NUM then passed to CTIR.

For ISDN, thanks to the fact that in practice NUM has been always left configured as *, the support of RG will not be disabled, therefore we do not need RG-IN parameter as in CLUSTER/SIP/IAX.

  • ISDN NT:

    • Incoming call WITHOUT REDIRECTING NUMBER

      • The incoming CALLING NUMBER is verified against NUM.

    • Incoming call WITH REDIRECTING NUMBER

      • The incoming CALLING NUMBER is passed unmodified to CTIR.

      • If NUM: not equal to "*" the REDIRECTING NUMBER is verified according to NUM parameter then passed to CTIR.

      • If NUM:* the REDIRECTING NUMBER is passed unmodified to CTIR.

  • ISDN TE:

    • Incoming CALLING NUMBER and REDIRECTING NUMBER are passed unmodified to CTIR.

46.7.4. RGI and RGO parameters

These two parameters have been introduced in the CTIR to manipulate the REDIRECTING NUMBER. The default for RGI and RGO is *.

A call originated by a call transfer may be identified because RG field isn't empty, while a normal call has RG field empty. This is used to create special routings which are effective only for call transfers.

Use the following values to intercept normal calls:

RGI:##Missing information element
RGI:#Missing or Empty information element

Set the RGI parameter to a specific value to intercept only calls originated by call transfers.

Setting RGI:*, the rule intercepts every kind of call (transferred or not). The following table shows the range of RGI values:

[14:43:43] ABILIS_CPX:help isdn values

Meaning of special values used in ISDN CDI/CGI/SGI/SDI/RGI fields:
-----------+-------------------------------------------------------------------
 Symbol    | Meaning
-----------+-------------------------------------------------------------------
 *         | Don't care.
 #         | Missing or Empty information element
 ##        | Missing information element
 $         | Empty or Non-empty information element
 ?*        | Non-empty information element
-----------+-------------------------------------------------------------------


Meaning of special values used in ISDN CDO/CGO/SGO/SDO/RGO fields:
-----------+-------------------------------------------------------------------
 Symbol    | Meaning
-----------+-------------------------------------------------------------------
 *         | Pass correspondent input field untouched.
 #         | Set an empty information element. An empty information element in
           | most cases is removed.
-----------+-------------------------------------------------------------------

The following are the log and CTI connection shown during a normal call from 901 to 902. Please note that there RGO field is empty.

[09:58:51] ABILIS_CPX:start ldme

Current Local Time: Wednesday 17/09/2015 14:10:29 (UTC+2.00)

Start Debug Log content real-time logging (Type CTRL+C + ENTER to stop):

Date   Time   Resource   Ses   Id   Event          Parameters
------ ------ ---------- ----- ---- -------------- --------------------------------------
170915 141035 CtiP-149       6    6 E-DialRx       CH:1 BC:Speech CG:uxq901 USER:test
170915 141035 CtiP-149       6    6 E-CallRx       CH:1 BC:Speech CD:ux902 CG:uxq901
170915 141035 CtiP-149       6    6 E-Route Match  PR:4  
170915 141035 CtiP-102       6    6 E-CallTx       BC:Speech TY:TR CD:ux902 
                                                   CG:uxq901
170915 141035 CtiP-149       6    6 E-NumComplete  CDI:ux902 CDO:ux902
170915 141035 CtiP-102       6    6 E-AlertRx      CH:1 USER:test2
170915 141035 CtiP-149       6    6 E-AlertTx      CH:1 PI:81 88


PREVIOUS COMMAND(s) ABORTED

[09:59:08] ABILIS_CPX:d ctice

-------------------------------------------------------------------------------
SES:6   TYPE:TR    ST:ALERT   PR:4            STI:07/00  STO:04/00  EEC:NO  
ID :6   START:17/09/2015 14:12:23        DURATION:0          REMAINING:-
       IN:149             BCI:Speech   OUT:102               BCO:Speech
      CDI:ux902                        CDO:ux902
      CGI:uxq901                       CGO:uxq901
      SDI:                             SDO:
      SGI:                             SGO:
      RGI:                             RGO:

The following are logs and CTI connection shown during a transferred call. User test (phone number 901) calls user:test2 (phone number 902). User test2 transfers calls to a cellphone (phone number 333xxxxxx). Please note that RGO field isn't empty, because there's a transferred call.

[12:28:00] ABILIS_CPX:start ldme

Current Local Time: Wednesday 17/09/2015 14:20:41 (UTC+2.00)

Start Debug Log content real-time logging (Type CTRL+C + ENTER to stop):

Date   Time   Resource   Ses   Id   Event          Parameters
------ ------ ---------- ----- ---- -------------- --------------------------------------
170915 142045 CtiP-149      10   10 E-DialRx       CH:1 BC:Speech CG:uxq901 USER:test
170915 142045 CtiP-149      10   10 E-CallRx       CH:1 BC:Speech CD:ux902 CG:uxq901
170915 142045 CtiP-149      10   10 E-Route Match  PR:4  
170915 142045 CtiP-102      10   10 E-CallTx       BC:Speech TY:TR CD:ux902 
                                                   CG:uxq901
170915 142045 CtiP-102      10   10 E-CallForward  RULE:ALWAYS USER:test2
170915 142045 CtiP-149      10   10 E-NumComplete  CDI:ux902 CDO:ux902
170915 142045 CtiP-102      10   11 E-CallRx       CH:0 BC:Speech CD:ux8333xxxxxx 
                                                   CG:uxq901 RG:uxay902 USER:test2
170915 142045 CtiP-102      10   11 E-Route Match  PR:10 
170915 142045 CtiCl-1       10   11 E-CallTx       BC:Speech TY:VtoC CD:ux8333xxxxxx 
                                                   CG:uxq901 RG:uxay902 
                                                   CODERS:Spirit
170915 142045 CtiP-102      10   11 E-NumComplete  CDI:ux8333xxxxxx CDO:ux333xxxxxx
170915 142045 CtiP-102      10   12 E-CallTransfer SES/ID-IN:11 SES/ID-OUT:10 
                                                   T301:179
170915 142046 CtiCl-1       10   12 E-ProgressRx   CODERS:Spirit
170915 142046 CtiCl-1       10   12 E-ProgressRx   CODERS:Spirit
170915 142046 CtiCl-1       10   12 E-AlertRx      CH:34 CODERS:Spirit
170915 142046 CtiP-149      10   12 E-AlertTx      CH:1 PI:81 88


PREVIOUS COMMAND(s) ABORTED


[12:28:35] ABILIS_CPX:d ctice

-------------------------------------------------------------------------------
SES:10  TYPE:VtoC  ST:ACTIVE  PR:TRS[4/10]    STI:10/00  STO:10/00  EEC:NO  
ID :12  START:17/09/2015 14:24:14        DURATION:2          REMAINING:-
       IN:149             BCI:Speech   OUT:Clus1             BCO:Speech
      CDI:ux902                        CDO:ux333xxxxxx
      CGI:uxq901                       CGO:uxq901
      SDI:                             SDO:
      SGI:                             SGO:
      RGI:                             RGO:uxay902
      CODER:Spirit   SP:6400   FMRLY:YES    FAXSP:7200   DJ:50      FMDJ:200
         CTIAC:2     BW:8800   SC:NO        MODSP:7200   MJ:250     FMMJ:400
         MODE:-      CurJ:0    TopJ:0       AvgJ:0       FaxPg:0    ECM:YES
                     UND:0                  OVR:0

The CTI routing PR:5 is used to call the cellphone. This rule intercept normal calls and transferred calls, because RGI:*.

[12:37:26] ABILIS_CPX:d ctire pr:5

Last change: 17/09/2015 10:01:34 CET

-------------------------------------------------------------------------------
PR:5  DESCR:
   ACT:YES  EDT:NO   BCI:VOICE                     BCO:*        EEC:NO
   NEXT:NO           POI:PBX   SR:#        GI:#    OUT:Clus1
   LAST:ANY          CDI:8?*                       CDO:'CDI.S2'
   T301:Dft          CGI:*                         CGO:*
   UDT:NO            SDI:*                         SDO:*
   LCS:NO            SGI:*                         SGO:*
   LCST:Sys          RGI:*                         RGO:*
   IG:Sys       OG:Sys      SG:Sys      DL:Sys       DH:Sys
   FMRLY:Sys    FAXSP:AUTO  MODSP:AUTO  FMLVL:Sys    FMDJ:Sys   FMMJ:Sys
   SP:6400      SC:Sys      DJ:Sys      MJ:Sys                  ECM:SYS
   CODERS:Sys
   SPOUT:*      SCOUT:*     DJOUT:*     MJOUT:*     
   CODERSOUT:*
   TI1:ALL,00:00-23:59                TI2:#  TI3:#  TI4:#  TI5:#  

Example: administrator can configure Abilis so that users cannot transfer calls to cellphones. Rule PR:5 must be modified setting RGI:## and rule PR:6 must be created.

[12:40:26] ABILIS_CPX:s ctir pr:5 rgi:##

COMMAND EXECUTED

[12:40:34] ABILIS_CPX:d ctire pr:5

Last change: 17/09/2015 10:01:34 CET

-------------------------------------------------------------------------------
PR:5  DESCR:
   ACT:YES  EDT:NO   BCI:VOICE                     BCO:*        EEC:NO
   NEXT:NO           POI:PBX   SR:#        GI:#    OUT:Clus1
   LAST:ANY          CDI:8?*                       CDO:'CDI.S2'
   T301:Dft          CGI:*                         CGO:*
   UDT:NO            SDI:*                         SDO:*
   LCS:NO            SGI:*                         SGO:*
   LCST:Sys          RGI:##                        RGO:*
   IG:Sys       OG:Sys      SG:Sys      DL:Sys       DH:Sys
   FMRLY:Sys    FAXSP:AUTO  MODSP:AUTO  FMLVL:Sys    FMDJ:Sys   FMMJ:Sys
   SP:6400      SC:Sys      DJ:Sys      MJ:Sys                  ECM:SYS
   CODERS:Sys
   SPOUT:*      SCOUT:*     DJOUT:*     MJOUT:*     
   CODERSOUT:*
   TI1:ALL,00:00-23:59                TI2:#  TI3:#  TI4:#  TI5:# 

[12:44:49] ABILIS_CPX:a ctir pr:6 poi:pbx out:none cdi:8* cdo:'cdi.s2' rgi:?* sp:64000 coders:g.711

COMMAND EXECUTED

[12:44:57] ABILIS_CPX:d ctire pr:6

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
Last change: 17/09/2015 10:01:34 CET

-------------------------------------------------------------------------------
PR:6  DESCR:
   ACT:YES  EDT:NO   BCI:VOICE                     BCO:*        EEC:NO
   NEXT:NO           POI:PBX   SR:#        GI:#    OUT:#
   LAST:ANY          CDI:8*                        CDO:'CDI.S2'
   T301:Dft          CGI:*                         CGO:*
   UDT:NO            SDI:*                         SDO:*
   LCS:NO            SGI:*                         SGO:*
   LCST:Sys          RGI:?*                        RGO:*
   IG:Sys       OG:Sys      SG:Sys      DL:Sys       DH:Sys
   FMRLY:Sys    FAXSP:AUTO  MODSP:AUTO  FMLVL:Sys    FMDJ:Sys   FMMJ:Sys
   SP:64000     SC:Sys      DJ:Sys      MJ:Sys                  ECM:SYS
   CODERS:G.711
   SPOUT:*      SCOUT:*     DJOUT:*     MJOUT:*     
   CODERSOUT:*
   TI1:ALL,00:00-23:59                TI2:#  TI3:#  TI4:#  TI5:#  

The following is the log of a transferred call to a cellphone: the call fails.

[12:46:17] ABILIS_CPX:start ldme

Current Local Time: Wednesday 17/09/2015 14:40:03 (UTC+2.00)

Start Debug Log content real-time logging (Type CTRL+C + ENTER to stop):

Date   Time   Resource   Ses   Id   Event          Parameters
------ ------ ---------- ----- ---- -------------- --------------------------------------
170915 144009 CtiP-149      16   16 E-DialRx       CH:1 BC:Speech CG:uxq901 USER:test
170915 144009 CtiP-149      16   16 E-CallRx       CH:1 BC:Speech CD:ux902 CG:uxq901
170915 144009 CtiP-149      16   16 E-Route Match  PR:4  
170915 144009 CtiP-102      16   16 E-CallTx       BC:Speech TY:TR CD:ux902 
                                                   CG:uxq901
170915 144009 CtiP-102      16   16 E-CallForward  RULE:ALWAYS USER:test2
170915 144009 CtiP-149      16   16 E-NumComplete  CDI:ux902 CDO:ux902
170915 144009 CtiP-102      16   17 E-CallRx       CH:0 BC:Speech CD:ux8333xxxxxx 
                                                   CG:uxq901 RG:uxay902 USER:test
170915 144009 CtiP-102      16   17 E-Route Match  PR:6 
170915 144009 CtiP-102      16   17 E-InternalFail PR:6  CAUSE:FF A8 (CPX, No port 
                                                   available (NO_PORT))
170915 144009 CtiP-102      16   17 E-Route Fail   PR:11  CAUSE:FF A8 (CPX, No port 
                                                   available (NO_PORT))
170915 144009 CtiP-102      16   17 E-CallFailTx   CH:0 CAUSE:81 83 (LPN, No route 
                                                   to destination)
170915 144009 CtiP-149      16   16 E-DiscTx       CH:1 CAUSE:80 80 (U, Description 
                                                   not available) USER:test