49.5. Connecting Abilis and a SIP server

This section contains instructions for a correct set-up of Abilis CPX and SIP server interconnection.

49.5.1. Activation of the CTISIP resource

For the activation of the CTISIP resource refer to Section 49.1.4, “Activating the CTISIP resource”.

The basic parameters to configure are:

  • ACT: to activate the resource.

  • sesnum: to define the amount of simultaneous connections.

  • SRCADD: source IP address for outgoing connections [R-ID: the source IP address of the outgoing datagrams will be set to the current RouterID value; OUT-IP: the source IP address of the outgoing datagrams will be set on the base of the output IP interface; 1-126.x.x.x, 128-223.x.x.x: the source IP address of the outgoing datagrams will be set to the selected value; IP-nnn: use the current IPADD of the specified IP resource].

    [Tip]Tip

    If Abilis has only one IP resource (and only one IP address), you can use the default value; otherwise if Abilis has more IP resources and more IP addresses the suggested configuration is OUT-IP.

  • DOMAIN: if Abilis has clients in the public side you can also specify a FQDN.

49.5.2. Example: Abilis and a SIP server registered in Abilis domain (SIP-TYPE:LOCAL-PEER)

In this case the server is a “normal” user like a soft phone, but the SIP-TYPE is LOCAL-PEER.

[Note]Note

LOCAL-PEER handling is similar to PHONE but it allows calling/called number to pass unchanged.

In the figure there are the following elements:

Now you have to create a SIP user representing the user that is a client of the Abilis.

[14:49:07] ABILIS_CPX:a user:test pwd:secret sip:yes

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:test sip-type:local-peer sip-number:* sip-host:dynamic

COMMAND EXECUTED
[Note]Note

The SIP server isn't required to be only on the local network.

You can show the result in this way:

[14:49:07] ABILIS_CPX:d user:test

- Not Saved (SAVE CONF) -------------------------------------------------------
Parameter:          | Value:
--------------------+----------------------------------------------------------
USER:                 test
REAL-NAME:            test
ID:                   13            <Read Only>
PWD:                  ***
ACT:                  YES
GROUP:                
CTIP:                 #
CLUS:                 #
ADDRBOOK-SYNC:        SYS           
ADDRBOOK-NUMBER:      AUTO          
ADDRBOOK-OUTDIAL:     NONE          
ADDRBOOK-PRIV-MAX:    SYS
ADDRBOOK-PUB-ENABLED: SYS           
OPC-ROLE:             USER
OPC-VIEW:             *
OPC-HIDE-NUMBERS:     NO
OPC-MONITOR:          NONE
OPC-PRIVACY:          NO
CHAT:                 NO    
CHAT-USER:            SYS
CHAT-PWD:             SYS
SIP:                  YES   
SIP-TYPE:             LOCAL-PEER    
SIP-DOMAIN:           SYS
SIP-HOST:             DYNAMIC
SIP-TCP-REMPORT:      (DYNAMIC)
SIP-UDP-REMPORT:      (DYNAMIC)
sip-udp-locport:      SYS
SIP-SRCADD:           SYS
SIP-PROT:             UDP
SIP-IP-PERMIT:        *
SIP-MAXSES-BID:       2
SIP-MAXSES-IN:        0
SIP-MAXSES-OUT:       0
SIP-BUSY-INUSE:       NO
SIP-NUMBER:           *
SIP-ADDRBOOK-NUM:     SIP-NUMBER
SIP-CG-NUM:           AUTO
SIP-FWD-CG-NUM:       CALLER
SIP-DISPLAY-NAME:     SYS
SIP-CTIP-TYPE:        SYS
SIP-RG-IN:            SYS
SIP-ROUTE-BY-SD:      NO            
SIP-PROVIDE-SG:       NO
SIP-CLIP-RULE:        SYS
SIP-BUSY-NOCHAN:      NO
SIP-LCS-GROUP:        NONE
SIP-CPO-RTP:          SYS
SIP-CPO-SIGNALLING:   SYS
SIP-RCC-DISABLE:      SYS
SIP-SS:               NO
SIP-SS-PICKUP:        GROUPS
SIP-SS-PRES-CG:       YES
SIP-SS-CF-DND:        YES
SIP-SS-VM:            YES
SIP-AUTH:             SYS
SIP-CHAN-FREQ:        SYS
SIP-REMOTE-NAT:       NO
SIP-LOCAL-NAT:        NO
SIP-EXTERNAL-IP:      SYS
SIP-KEEPALIVE:        ENABLED
SIP-DTMF-MODE:        SYS
SIP-DISC-AUDIO:       SYS
SIP-BC-TRANSP:        UDI
SIP-T38:              SYS
SIP-T38-G711:         SYS
SIP-T38-PACKING:      SYS
SIP-T38-REDUND:       SYS
SIP-T38-REDUND-PCK:   SYS
SIP-UA:               SYS
SIP-UA-PERMIT:        *
SIP-REM-USER:         
SIP-REM-PASS:                 
SIP-REM-AUTH:         SYS
SIP-REM-AUTH-USER:    AUTO ()
SIP-REM-REG:          NO            
-------------------------------------------------------------------------------

The CTISIP table, used to route calls toward SIP users, gets automatically populated with a unique route because you set SIP-NUMBER:*.

[14:49:07] ABILIS_CPX:d ctisip numbers

Total:1        Sip-Number:1         Static:0 
        
NUMx: [SIP-NUMBER:]       USER:                             Provenience:
------------------------------------------------------------------------
[*]                       test                                SIP-NUMBER

49.5.3. Example: Server and Abilis registered in Server remote domain (SIP-TYPE:SERVER)

In the figure there are the following elements:

Now you have to create a SIP user representing the user that is a client of voip.it SIP server:

[14:49:07] ABILIS_CPX:a user:voipclient pwd:swordfish sip:yes

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-type:server sip-domain:voip.it

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-host:88.88.88.88

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-maxses-bid:10 sip-number:*

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-rem-reg:yes sip-rem-user:voipclient sip-rem-pass:swordfish

COMMAND EXECUTED

You can show the result in this way:

[14:49:07] ABILIS_CPX:d user:voipclient

- Not Saved (SAVE CONF) -------------------------------------------------------
Parameter:          | Value:
--------------------+----------------------------------------------------------
USER:                 voipclient
REAL-NAME:            voipclient
ID:                   8             <Read Only>
PWD:                  ***
ACT:                  YES
GROUP:                
CTIP:                 #
CLUS:                 #
ADDRBOOK-SYNC:        SYS           
ADDRBOOK-NUMBER:      AUTO          
ADDRBOOK-OUTDIAL:     NONE          
ADDRBOOK-PUB-ENABLED: SYS           
OPC-ROLE:             USER
OPC-VIEW:             *
OPC-HIDE-NUMBERS:     NO
OPC-MONITOR:          NONE
OPC-PRIVACY:          NO
CHAT:                 NO    
CHAT-USER:            SYS
CHAT-PWD:             SYS
SIP:                  YES   
SIP-TYPE:             SERVER        
SIP-DOMAIN:           voip.it
SIP-HOST:             088.088.088.088
SIP-TCP-REMPORT:      5060
SIP-UDP-REMPORT:      5060
sip-udp-locport:      SYS
SIP-SRCADD:           SYS
SIP-PROT:             UDP
SIP-IP-PERMIT:        *
SIP-MAXSES-BID:       10
SIP-MAXSES-IN:        0
SIP-MAXSES-OUT:       0
SIP-BUSY-INUSE:       NO
SIP-NUMBER:           *
SIP-ADDRBOOK-NUM:     SIP-NUMBER
SIP-CG-NUM:           AUTO
SIP-FWD-CG-NUM:       CALLER
SIP-DISPLAY-NAME:     SYS
SIP-CTIP-TYPE:        SYS
SIP-RG-IN:            SYS
SIP-ROUTE-BY-SD:      NO            
SIP-PROVIDE-SG:       NO
SIP-CLIP-RULE:        SYS
SIP-BUSY-NOCHAN:      NO
SIP-LCS-GROUP:        NONE
SIP-CPO-RTP:          SYS
SIP-CPO-SIGNALLING:   SYS
SIP-RCC-DISABLE:      SYS
SIP-SS:               NO
SIP-SS-PICKUP:        GROUPS
SIP-SS-PRES-CG:       YES
SIP-SS-CF-DND:        YES
SIP-SS-VM:            YES
SIP-AUTH:             SYS
SIP-CHAN-FREQ:        SYS
SIP-REMOTE-NAT:       NO
SIP-LOCAL-NAT:        NO
SIP-EXTERNAL-IP:      SYS
SIP-KEEPALIVE:        ENABLED
SIP-DTMF-MODE:        SYS
SIP-DISC-AUDIO:       SYS
SIP-BC-TRANSP:        UDI
SIP-T38:              SYS
SIP-T38-G711:         SYS
SIP-T38-PACKING:      SYS
SIP-T38-REDUND:       SYS
SIP-T38-REDUND-PCK:   SYS
SIP-UA:               SYS
SIP-UA-PERMIT:        *
SIP-REM-USER:         voipclient
SIP-REM-PASS:         ********
SIP-REM-AUTH:         SYS
SIP-REM-AUTH-USER:    AUTO (voipclient)
SIP-REM-REG:          YES           
-------------------------------------------------------------------------------

The CTISIP table, used to route calls toward SIP users, gets automatically populated with a unique route because you set SIP-NUMBER:*.

[14:49:07] ABILIS_CPX:d ctisip numbers

Total:1        Sip-Number:1         Static:0 

NUMx: [SIP-NUMBER:]       USER:                             Provenience:
------------------------------------------------------------------------
[*]                       voipclient                          SIP-NUMBER

Abilis and the Sip Server interconnection is now correctly configured.

[Note]Note

REMOTE-PEER handling is similar to SERVER but it allows calling/called number to pass unchanged.

49.5.4. Example: Server and Abilis registered in Server remote domain (SIP-TYPE:REMOTE-PEER)

In the figure there are the following elements:

Now you have to create a SIP user representing the user that is a client of SIP server

[14:49:07] ABILIS_CPX:a user:voipclient pwd:swordfish sip:yes

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-type:remote-peer sip-host:88.88.88.88

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-number:5678 sip-rem-reg:yes sip-rem-user:voipclient sip-rem-pass:swordfish 

COMMAND EXECUTED

[14:49:07] ABILIS_CPX:s user:voipclient sip-cg-num:*

COMMAND EXECUTED
[Note]Note

The SIP-CG-NUM parameter is set to "*" to pass calling number transparently, because by default, this parameter is AUTO (enforces caller id information element equal to SIP-NUMBER).

You can show the result in this way:

[14:49:07] ABILIS_CPX:d user:voipclient

- Not Saved (SAVE CONF) -------------------------------------------------------
Parameter:          | Value:
--------------------+----------------------------------------------------------
USER:                 voipclient
REAL-NAME:            voipclient
ID:                   8             <Read Only>
PWD:                  ***
ACT:                  YES
GROUP:                
CTIP:                 #
CLUS:                 #
ADDRBOOK-SYNC:        SYS           
ADDRBOOK-NUMBER:      AUTO          
ADDRBOOK-OUTDIAL:     NONE          
ADDRBOOK-PUB-ENABLED: SYS           
OPC-ROLE:             USER
OPC-VIEW:             *
OPC-HIDE-NUMBERS:     NO
OPC-MONITOR:          NONE
OPC-PRIVACY:          NO
CHAT:                 NO    
CHAT-USER:            SYS
CHAT-PWD:             SYS
SIP:                  YES   
SIP-TYPE:             REMOTE-PEER       
SIP-DOMAIN:           
SIP-HOST:             088.088.088.088
SIP-TCP-REMPORT:      5060
SIP-UDP-REMPORT:      5060
sip-udp-locport:      SYS
SIP-SRCADD:           SYS
SIP-PROT:             UDP
SIP-IP-PERMIT:        *
SIP-MAXSES-BID:       10
SIP-MAXSES-IN:        0
SIP-MAXSES-OUT:       0
SIP-BUSY-INUSE:       NO
SIP-NUMBER:           5678
SIP-ADDRBOOK-NUM:     SIP-NUMBER
SIP-CG-NUM:           *
SIP-FWD-CG-NUM:       CALLER
SIP-DISPLAY-NAME:     SYS
SIP-CTIP-TYPE:        SYS
SIP-RG-IN:            SYS
SIP-ROUTE-BY-SD:      NO            
SIP-PROVIDE-SG:       NO
SIP-CLIP-RULE:        SYS
SIP-BUSY-NOCHAN:      NO
SIP-LCS-GROUP:        NONE
SIP-CPO-RTP:          SYS
SIP-CPO-SIGNALLING:   SYS
SIP-RCC-DISABLE:      SYS
SIP-SS:               NO
SIP-SS-PICKUP:        GROUPS
SIP-SS-PRES-CG:       YES
SIP-SS-CF-DND:        YES
SIP-SS-VM:            YES
SIP-AUTH:             SYS
SIP-CHAN-FREQ:        SYS
SIP-REMOTE-NAT:       NO
SIP-LOCAL-NAT:        NO
SIP-EXTERNAL-IP:      SYS
SIP-KEEPALIVE:        ENABLED
SIP-DTMF-MODE:        SYS
SIP-DISC-AUDIO:       SYS
SIP-BC-TRANSP:        UDI
SIP-T38:              SYS
SIP-T38-G711:         SYS
SIP-T38-PACKING:      SYS
SIP-T38-REDUND:       SYS
SIP-T38-REDUND-PCK:   SYS
SIP-UA:               SYS
SIP-UA-PERMIT:        *
SIP-REM-USER:         voipclient
SIP-REM-PASS:         ********
SIP-REM-AUTH-USER:    AUTO (voipclient)
SIP-REM-REG:          YES           
-------------------------------------------------------------------------------

The CTISIP table, used to route calls toward SIP users, gets automatically populated with a unique route because you set SIP-NUMBER:5678.

[14:49:07] ABILIS_CPX:d ctisip numbers

Total:1        Sip-Number:1         Static:0 

NUMx: [SIP-NUMBER:]       USER:                             Provenience:
------------------------------------------------------------------------
[5678]                    voipclient                          SIP-NUMBER

It's needed to add a static SIP translation route to add several numbers to this user.

Use the following command to add a new SIP-NUMBER:

[14:49:07] ABILIS_CPX:a ctisip numbers numx:* user:voipclient

COMMAND EXECUTED

[18:05:18] ABILIS_CPX:d ctisip numbers

Total:2         Sip-Number:1         Static:1         

NUMx: [SIP-NUMBER:]       USER:                             Provenience:
------------------------------------------------------------------------
[5678]                    voipclient                          SIP-NUMBER
 *                        voipclient                              STATIC

Abilis and the SIP Server interconnection is now correctly configured.

[Note]Note

REMOTE-PEER handling is similar to SERVER but it allows calling/called number to pass unchanged.

49.5.5. CTI Routings configuration

Some routings in the CTIR table must be added in order to route the calls to and from the CTISIP resource.

49.5.5.1. Any coder, transcoding disallowed

Purpose of configuration: calls arriving from ISDN/POTS/GSM/CLUSTER are routed to SIP users, and calls arriving from SIP users are first sent to cluster test; in case of failure (NEXT:LIMITED) it's attempted on ISDN/POTS/GSM group G1.

In this situation any coder with maximal speed 6400 (the default for SP parameter) is allowed, but transcoding is disallowed. This means that the same coder must be used by the SIP proxy and Abilis.

[18:05:14] ABILIS_CPX:a ctir pr:0 poi:* out:sip cdi:* descr:From_ISDN/POTS/GSM_to_SIP 

COMMAND EXECUTED

[18:05:18] ABILIS_CPX:a ctir pr:1 sr:* out:sip cdi:* descr:From_Cluster_to_SIP

COMMAND EXECUTED

[18:05:30] ABILIS_CPX:a ctir pr:2 poi:sip out:test cdi:* next:limited descr:From_SIP_to_Cluster

COMMAND EXECUTED

[18:05:38] ABILIS_CPX:a ctir pr:3 poi:sip out:g1 cdi:* descr:From_SIP_to_ISDN/POTS/GSM

COMMAND EXECUTED

[18:05:51] ABILIS_CPX:d ctir

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

---+------+-----------------+---------+--------------------+--------------------
PR |[DESCR]
   |BCI   |POI |SR      |GI |OUT      |CDI                 |CDO
ACT|NEXT        |LAST       |EEC |T301|CGI                 |CGO
EDT|SP    |SC   |DJ   |MJ   |FMDJ|FMMJ|SDI                 |SDO
   |SPOUT |SCOUT|DJOUT|MJOUT|LCS |LCST|SGI                 |SGO
   |                        |BCO      |RGI                 |RGO
   |FMRLY |FAXSP|MODSP|FMLVL|ECM |UDT |IG  |OG  |SG        |DL  |DH
   |CODERS
   |CODERSOUT
   |TI1 .. TI5
--------------------------------------------------------------------------------
0   [From_ISDN/POTS/GSM_to_SIP]
    VOICE  *    #        #   Sip       *                    *                   
--------------------------------------------------------------------------------
1   [From_Cluster_to_SIP]
    VOICE  #    *        #   Sip       *                    *                   
--------------------------------------------------------------------------------
2   [From_SIP_to_Cluster]
    VOICE  Sip  #        #   test      *                    *                   
    LIMITED      ANY         NO   Dft  *                    *                   
--------------------------------------------------------------------------------
3   [From_SIP_to_ISDN/POTS/GSM]
    VOICE  Sip  #        #   G1        *                    *                   
--------------------------------------------------------------------------------
[Note]Note

The routes PR:0 and PR:1 may be unified into one: a ctir pr:0 poi:* sr:* out:sip cdi:* descr:From_ISDN/POTS/GSM/Cluster_to_SIP

[Note]Note

The POI:* in CTIR routings identifies all CTIP ports: ISDN, POTS, VPOTS, CELL; and SR:* identifies all clusters. Refer to Table 46.2, “Special characters and values available in CTI routing table” to know more about special characters and values available in CTI routing.

[Tip]Tip

To allow G.729A you have to set SP:8000 in every routing.

49.5.5.2. Only G.711 on SIP proxy, any coder on Cluster, transcoding allowed

Purpose of example: calls arriving from ISDN/POTS/GSM/CLUSTER are routed to SIP users, and calls arriving from SIP users are first sent to cluster test; in case of failure (NEXT:LIMITED) it's attempted on ISDN/POTS/GSM group G1.

In this situation only G.711 A-law or u-law can be used by SIP proxy and Abilis. Since transcoding is enabled by CODERSOUT <> * the CTI routings will negotiate for the “C” side any coder with maximum speed up 6400 bps.

[18:12:28] ABILIS_CPX:a ctir pr:0 poi:* out:sip cdi:* sp:64000 descr:From_ISDN/POTS/GSM_to_SIP

COMMAND EXECUTED

[18:12:37] ABILIS_CPX:a ctir pr:1 sr:* out:sip cdi:* spout:64000 codersout:G.711 descr:From_Cluster_to_SIP

COMMAND EXECUTED

[18:12:45] ABILIS_CPX:a ctir pr:2 poi:sip out:test cdi:* next:limited sp:64000 coders:g.711 spout:6400 codersout:*,sys descr:From_SIP_to_Cluster

COMMAND EXECUTED

[18:12:53] ABILIS_CPX:a ctir pr:3 poi:sip out:g1 cdi:* sp:64000 descr:From_SIP_to_ISDN/POTS/GSM

COMMAND EXECUTED

[18:13:00] ABILIS_CPX:d ctir

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

---+------+-----------------+---------+--------------------+--------------------
PR |[DESCR]
   |BCI   |POI |SR      |GI |OUT      |CDI                 |CDO
ACT|NEXT        |LAST       |EEC |T301|CGI                 |CGO
EDT|SP    |SC   |DJ   |MJ   |FMDJ|FMMJ|SDI                 |SDO
   |SPOUT |SCOUT|DJOUT|MJOUT|LCS |LCST|SGI                 |SGO
   |                        |BCO      |RGI                 |RGO
   |FMRLY |FAXSP|MODSP|FMLVL|ECM |UDT |IG  |OG  |SG        |DL  |DH
   |CODERS
   |CODERSOUT
   |TI1 .. TI5
--------------------------------------------------------------------------------
0   [From_ISDN/POTS/GSM_to_SIP]
    VOICE  *    #        #   Sip       *                    *                   
    NO           ANY         NO   Dft  *                    *                   
    64000  Sys   Sys   Sys   Sys  Sys  *                    *                   
--------------------------------------------------------------------------------
1   [From_Cluster_to_SIP]
    VOICE  #    *        #   Sip       *                    *                   
    NO           ANY         NO   Dft  *                    *                   
    6400   Sys   Sys   Sys   Sys  Sys  *                    *                   
    64000  *     *     *     NO   Sys  *                    *                   
                             *         *                    *                   
    Sys    AUTO  AUTO  Sys   SYS  NO   Sys  Sys  Sys        Sys  Sys
    Sys
    G.711
--------------------------------------------------------------------------------
2   [From_SIP_to_Cluster]
    VOICE  Sip  #        #   test      *                    *                   
    LIMITED      ANY         NO   Dft  *                    *                   
    64000  Sys   Sys   Sys   Sys  Sys  *                    *                   
    6400   *     *     *     NO   Sys  *                    *                   
                             *         *                    *                   
    Sys    AUTO  AUTO  Sys   SYS  NO   Sys  Sys  Sys        Sys  Sys
    G.711
    *,Sys
--------------------------------------------------------------------------------
3   [From_SIP_to_ISDN/POTS/GSM]
    VOICE  Sip  #        #   G1        *                    *                   
    NO           ANY         NO   Dft  *                    *                   
    64000  Sys   Sys   Sys   Sys  Sys  *                    *                   
--------------------------------------------------------------------------------
[Tip]Tip

To allow G.729A you have to set SP:8000 in PR:1 and SPOUT:8000 in PR:2.

49.5.5.2.1. Transcoding optimization

When the Abilis-SIP proxy interconnection occurs via local LAN, (i.e. With high speed, minimal delays, minimal jitter), optimizing the transcoding can be done so that the SIP proxy side uses minimal jitter, minimal delays.

This is obtained by properly setting DJ, MJ, DJOUT, MJOUT.

[18:15:17] ABILIS_CPX:s ctir pr:1 djout:0 mjout:80

COMMAND EXECUTED

[18:15:29] ABILIS_CPX:s ctir pr:2 dj:0 mj:80 djout:sys mjout:sys

COMMAND EXECUTED
[Tip]Tip

DJ and MJ in PR:1 as well as DJOUT and MJOUT in PR:2 may assume other values appropriate for the WAN link or specifically required by calls matching the routing.

49.5.5.2.2. Fax

When transcoding takes place in CTI routing table, with G.711 toward the SIP proxy, something interesting happens: on the WAN FAX relay can be used! The Abilis can exchange FAX with following characteristics:

  • UIse G.711, 64 kbps plus IP overhead on the Abilis-SIP proxy interconnection;

  • Use G3 Fax relay, 2400/4800/9600/14400 kbps plus IP overhead on the WAN link.

Set FMRELAY:NO in the desired routing to disable fax relay:

[18:18:2] ABILIS_CPX:s ctir pr:0 fmrly:no

COMMAND EXECUTED

[18:18:35] ABILIS_CPX:s ctir pr:1 fmrly:no

COMMAND EXECUTED

[18:18:29] ABILIS_CPX:s ctir pr:2 fmrly:no

COMMAND EXECUTED

[18:15:29] ABILIS_CPX:s ctir pr:3 fmrly:no

COMMAND EXECUTED
49.5.5.2.3. CTI Routing using subaddress called field

Type the following command for enable routing using the subaddress called field:

[10:39:13] ABILIS_CPX_2:s p ctisip route-by-sd:yes 

COMMAND EXECUTED

Type the following command for change CTIR Routing:

[10:39:13] ABILIS_CPX_2:s ctir pr:0 sdo:voipclient 

COMMAND EXECUTED

[16:42:17] ABILIS_CPX_1:d ctir

Last change: 29/07/2015 10:01:34 CET

---+------+-----------------+---------+--------------------+--------------------
PR |[DESCR]
   |BCI   |POI |SR      |GI |OUT      |CDI                 |CDO
ACT|NEXT        |LAST       |EEC |T301|CGI                 |CGO
EDT|SP    |SC   |DJ   |MJ   |FMDJ|FMMJ|SDI                 |SDO
   |SPOUT |SCOUT|DJOUT|MJOUT|LCS |LCST|SGI                 |SGO
   |                        |BCO      |RGI                 |RGO
   |FMRLY |FAXSP|MODSP|FMLVL|ECM |UDT |IG  |OG  |SG        |DL  |DH
   |CODERS
   |CODERSOUT
   |TI1 .. TI5
--------------------------------------------------------------------------------
0   [From_ISDN/POTS/GSM_to_SIP]
    VOICE  *    #        #   Sip       *                    *                   
    NO           ANY         NO   Dft  *                    *                   
    64000  Sys   Sys   Sys   Sys  Sys  *                    VOIPCLIENT                       
--------------------------------------------------------------------------------

The match for CTIR Routing in this example is SDO (The SIP user "voipclient") but not CDO (SIP number).

[Note]Note

If SDO does not match any SIP user then it uses the matching with CDO.

49.5.6. Last Calling Service for a SIP user

Assuming to have a SIP user (voipclient), let's configure the Last Calling Service so that a call received by the SIP server is routed to the last number which called the calling number.

[Warning]Warning

Last Calling number Service requires a separate licence.

Suppose to have this situation:

  • CTIP 149 (for example number 49) makes a call to a phone (number 3201234567);

  • The call is routed through the SIP user "voipclient" (which corresponds to a number 0671061045);

  • The LCS saves calling and called numbers in the LCS table;

  • A call is received by SIP user "voipclient": the called number is 0671061045, the calling number is 3201234567;

  • The call is automatically routed toward CTIP 149 (number 49).

Suppose we have a SIP user "voipclient" with the following configuration:

[14:49:07] ABILIS_CPX:d user:voipclient

- Not Saved (SAVE CONF) -------------------------------------------------------
Parameter:          | Value:
--------------------+----------------------------------------------------------
USER:                 voipclient
REAL-NAME:            voipclient
ID:                   8             <Read Only>
PWD:                  ***
ACT:                  YES
GROUP:                
CTIP:                 #
CLUS:                 #
ADDRBOOK-SYNC:        SYS           
ADDRBOOK-NUMBER:      AUTO          
ADDRBOOK-OUTDIAL:     NONE          
ADDRBOOK-PUB-ENABLED: SYS           
OPC-ROLE:             USER
OPC-VIEW:             *
OPC-HIDE-NUMBERS:     NO
OPC-MONITOR:          NONE
OPC-PRIVACY:          NO
CHAT:                 NO    
CHAT-USER:            SYS
CHAT-PWD:             SYS
SIP:                  YES   
SIP-TYPE:             SERVER        
SIP-DOMAIN:           voip.it
SIP-HOST:             088.088.088.088
SIP-TCP-REMPORT:      5060
SIP-UDP-REMPORT:      5060
sip-udp-locport:      SYS
SIP-SRCADD:           SYS
SIP-PROT:             UDP
SIP-IP-PERMIT:        *
SIP-MAXSES-BID:       10
SIP-MAXSES-IN:        0
SIP-MAXSES-OUT:       0
SIP-BUSY-INUSE:       NO
SIP-NUMBER:           *
SIP-ADDRBOOK-NUM:     SIP-NUMBER
SIP-CG-NUM:           AUTO
SIP-FWD-CG-NUM:       CALLER
SIP-DISPLAY-NAME:     SYS
SIP-CTIP-TYPE:        SYS
SIP-RG-IN:            SYS
SIP-ROUTE-BY-SD:      NO            
SIP-PROVIDE-SG:       NO
SIP-CLIP-RULE:        SYS
SIP-BUSY-NOCHAN:      NO
SIP-LCS-GROUP:        NONE
SIP-CPO-RTP:          SYS
SIP-CPO-SIGNALLING:   SYS
SIP-RCC-DISABLE:      SYS
SIP-SS:               NO
SIP-SS-PICKUP:        GROUPS
SIP-SS-PRES-CG:       YES
SIP-SS-CF-DND:        YES
SIP-SS-VM:            YES
SIP-AUTH:             SYS
SIP-CHAN-FREQ:        SYS
SIP-REMOTE-NAT:       NO
SIP-LOCAL-NAT:        NO
SIP-EXTERNAL-IP:      SYS
SIP-KEEPALIVE:        ENABLED
SIP-DTMF-MODE:        SYS
SIP-DISC-AUDIO:       SYS
SIP-BC-TRANSP:        UDI
SIP-T38:              SYS
SIP-T38-G711:         SYS
SIP-T38-PACKING:      SYS
SIP-T38-REDUND:       SYS
SIP-T38-REDUND-PCK:   SYS
SIP-UA:               SYS
SIP-UA-PERMIT:        *
SIP-REM-USER:         voipclient
SIP-REM-PASS:         ********
SIP-REM-AUTH:         SYS
SIP-REM-AUTH-USER:    AUTO (voipclient)
SIP-REM-REG:          YES   

It's necessary to create a LCSG (Last Calling number Service Group):

[13:14:47] ABILIS_CPX:a lcsg id:1 descr:SIP_LCS

COMMAND EXECUTED 

[13:15:03] ABILIS_CPX:d lcsg                  

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
----+--------------------------------------------------------------------------
ID: |[DESCR:]
    |CPS-LIST:              NAT-PREFIX:            INT-PREFIX:    COUNTRY-CODE:
    |CB-PERMIT-CD:
    |CB-UNK-CDO:            CB-NAT-CDO:            CB-INT-CDO:
    |CB-SDO:                CB-SGO:                CB-CDO-DFT:
    |[CTI Ports, CTI Clusters, IAX users, SIP users]
----+--------------------------------------------------------------------------
 1   [SIP_LCS]
     #                      SYS                    SYS            SYS   
     *
     ux'CALLING'            ux0'CALLING'           ux00'CALLING'          
     *                      *                      *                      
----+--------------------------------------------------------------------------
[Warning]Warning

To activate the changes made on the LCSG, execute the initialization command init ctisys. Remember to save the configuration (save conf).

For the SIP user "voipclient" is necessary to configure the SIP-LCS-GROUP parameter, where "1" is the ID:1 of LCSG.

[14:21:43] ABILIS_CPX:s user:voipclient sip-lcs-group:1 

COMMAND EXECUTED 

[14:21:43] ABILIS_CPX:d user:voipclient

- Not Saved (SAVE CONF) -------------------------------------------------------
Parameter:          | Value:
--------------------+----------------------------------------------------------
USER:                 voipclient
REAL-NAME:            voipclient
ID:                   8             <Read Only>
PWD:                  ***
ACT:                  YES
GROUP:                
CTIP:                 #
CLUS:                 #
ADDRBOOK-SYNC:        SYS           
ADDRBOOK-NUMBER:      AUTO          
ADDRBOOK-OUTDIAL:     NONE          
ADDRBOOK-PUB-ENABLED: SYS           
OPC-ROLE:             USER
OPC-VIEW:             *
OPC-HIDE-NUMBERS:     NO
OPC-MONITOR:          NONE
OPC-PRIVACY:          NO
CHAT:                 NO    
CHAT-USER:            SYS
CHAT-PWD:             SYS
SIP:                  YES   
SIP-TYPE:             SERVER        
SIP-DOMAIN:           voip.it
SIP-HOST:             088.088.088.088
SIP-TCP-REMPORT:      5060
SIP-UDP-REMPORT:      5060
sip-udp-locport:      SYS
SIP-SRCADD:           SYS
SIP-PROT:             UDP
SIP-IP-PERMIT:        *
SIP-MAXSES-BID:       10
SIP-MAXSES-IN:        0
SIP-MAXSES-OUT:       0
SIP-BUSY-INUSE:       NO
SIP-NUMBER:           *
SIP-ADDRBOOK-NUM:     SIP-NUMBER
SIP-CG-NUM:           AUTO
SIP-FWD-CG-NUM:       CALLER
SIP-DISPLAY-NAME:     SYS
SIP-CTIP-TYPE:        SYS
SIP-RG-IN:            SYS
SIP-ROUTE-BY-SD:      NO            
SIP-PROVIDE-SG:       NO
SIP-CLIP-RULE:        SYS
SIP-BUSY-NOCHAN:      NO
SIP-LCS-GROUP:        1
SIP-CPO-RTP:          SYS
SIP-CPO-SIGNALLING:   SYS
SIP-RCC-DISABLE:      SYS
SIP-SS:               NO
SIP-SS-PICKUP:        GROUPS
SIP-SS-PRES-CG:       YES
SIP-SS-CF-DND:        YES
SIP-SS-VM:            YES
SIP-AUTH:             SYS
SIP-CHAN-FREQ:        SYS
SIP-REMOTE-NAT:       NO
SIP-LOCAL-NAT:        NO
SIP-EXTERNAL-IP:      SYS
SIP-KEEPALIVE:        ENABLED
SIP-DTMF-MODE:        SYS
SIP-DISC-AUDIO:       SYS
SIP-BC-TRANSP:        UDI
SIP-T38:              SYS
SIP-T38-G711:         SYS
SIP-T38-PACKING:      SYS
SIP-T38-REDUND:       SYS
SIP-T38-REDUND-PCK:   SYS
SIP-UA:               SYS
SIP-UA-PERMIT:        *
SIP-REM-USER:         voipclient
SIP-REM-PASS:         ********
SIP-REM-AUTH:         SYS
SIP-REM-AUTH-USER:    AUTO (voipclient)
SIP-REM-REG:          YES 
[Warning]Warning

Remember to save the configuration (save conf).

After configuration of the SIP user the LCSG group will be shown in the following way:

[15:16:11] ABILIS_CPX:d lcsg

----+--------------------------------------------------------------------------
ID: |[DESCR:]
    |CPS-LIST:              NAT-PREFIX:            INT-PREFIX:    COUNTRY-CODE:
    |CB-PERMIT-CD:
    |CB-UNK-CDO:            CB-NAT-CDO:            CB-INT-CDO:
    |CB-SDO:                CB-SGO:                CB-CDO-DFT:
    |[CTI Ports, CTI Clusters, IAX users, SIP users]
----+--------------------------------------------------------------------------
 1   #                      SYS                    SYS            SYS   
     *
     ux'CALLING'            ux0'CALLING'           ux00'CALLING'          
     *                      *                      *                      
     - SIP users --------------------------------------------------------------
     voipclient                        
----+--------------------------------------------------------------------------

Purpose of example: calls arriving from PBX are routed to SIP users, and calls arriving from SIP users are sent to PBX.

[18:12:28] ABILIS_CPX:a ctir pr:0 poi:pbx out:sip cdi:?* sp:64000 lcs:yes descr:From_PBX_to_SIP

COMMAND EXECUTED

[18:12:53] ABILIS_CPX:a ctir pr:1 poi:sip out:pbx cdi:* sp:64000 descr:From_SIP_to_PBX

COMMAND EXECUTED

[18:13:00] ABILIS_CPX:d ctir

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
Last change: 16/12/2015 09:05:16 EET

---+------+-----------------+---------+--------------------+--------------------
PR |[DESCR]
   |BCI   |POI |SR      |GI |OUT      |CDI                 |CDO
ACT|NEXT        |LAST       |EEC |T301|CGI                 |CGO
EDT|SP    |SC   |DJ   |MJ   |FMDJ|FMMJ|SDI                 |SDO
   |SPOUT |SCOUT|DJOUT|MJOUT|LCS |LCST|SGI                 |SGO
   |                        |BCO      |RGI                 |RGO
   |FMRLY |FAXSP|MODSP|FMLVL|ECM |UDT |IG  |OG  |SG        |DL  |DH
   |CODERS
   |CODERSOUT
   |TI1 .. TI5
--------------------------------------------------------------------------------
0   [From_PBX_to_SIP]
    VOICE  PBX  #        #   Sip       ?*                   *                   
    NO           ANY         NO   Dft  *                    *                   
    64000  Sys   Sys   Sys   Sys  Sys  *                    *                   
    *      *     *     *     YES  Sys  *                    *                   
--------------------------------------------------------------------------------
1   [From_SIP_to_PBX]
    VOICE  Sip  #        #   PBX       *                    *                   
    NO           ANY         NO   Dft  *                    *                   
    64000  Sys   Sys   Sys   Sys  Sys  *                    *                   
--------------------------------------------------------------------------------
[Important]Important

For routes towards SIP user is necessary to set the LCS parameter to YES, to activate the Last Calling Service. Another important parameter of CTIR routing is the LCST: Last Calling number Service records Timeout.The value Sys means the default value and will be the one setup by the CTISYS resource.

[Warning]Warning

Changes made on the CTI routing table aren't immediately active. To activate them, execute the initialization command init ctir.

Type the following command to show the LCST entries.

[08:55:54] ABILIS_CPX:d lcst

-----+----------------------+----------------------+---------------------+-----
GROUP|          CD          |         CG           |   Updated on (UTC)  |TOUT
     |                      |                      |  [Expiry on (UTC)]  |
-----+----------------------+----------------------+---------------------+-----
                      *** NO LCS TABLE ENTRY DEFINED ***   

The user 49 from CTIP:149 (number 49) make a call to 3201234567. The PR:0 of CTIR router sends this call to SIP user "voipclient". The following is the log of call.

[15:51:30] ABILIS_CPX:start ldme

Current Local Time: Wednesday 16/12/2015 15:51:35 (UTC+2.00)

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

Date   Time   Resource   Ses   Id   Event          Parameters
------ ------ ---------- ----- ---- -------------- --------------------------------------
161215 155147 CtiP-149      94   94 E-DialRx       CH:1 BC:Speech CG:uxq49 USER:49
161215 155147 CtiP-149      94   94 E-CallRx       CH:1 BC:Speech CD:ux3201234567 
                                                   CG:uxq49 USER:49
161215 155147 CtiP-149      94   94 E-Route Match  PR:0  
161215 155147 CtiSip        94   94 E-CallTx       BC:Speech TY:VtoS CD:ux3201234567 
                                                   CG:uxq49 
                                                   CODERS:G.711A,G.711u,Spirit,G.729A
161215 155147 CtiP-149      94   94 E-NumComplete  CDI:ux3201234567 CDO:ux3201234567
161215 155149 CtiSip        94   94 E-ProgressRx   PI:81 88 USER:voipclient CODERS:G.711A
161215 155149 CtiP-149      94   94 E-ProgressTx   PI:81 88
161215 155150 CtiSip        94   94 E-AlertRx      CH:84 CODERS:G.711A
161215 155150 CtiP-149      94   94 E-AlertTx      CH:1 PI: 81 88
161215 155152 CtiP-149      94   94 E-DiscRx       CH:1 CAUSE:80 90 (U, Normal call 
                                                   clearing) USER:49
161215 155152 CtiSip        94   94 E-DiscTx       CH:84 CAUSE:80 90 (U, Normal call 
                                                   clearing) USER:voipclient
161215 155152 CtiP-149      94   94 E-DiscConfTx   CH:0

After this call, type again the command to show the LCST entries. Now the LCST table contains entries.

[15:52:28] ABILIS_CPX:d lcst

-----+----------------------+----------------------+---------------------+-----
GROUP|          CD          |         CG           |   Updated on (UTC)  |TOUT
     |                      |                      |  [Expiry on (UTC)]  |
-----+----------------------+----------------------+---------------------+-----
1     ux3201234567           ux49                   16/12/2015 13:51:52   6   
                                                    16/12/2015 19:51:52   
[Note]Note

The LCST table entries expires after 6 hours (TOUT is equal with 6), because the LCST: Last Calling number Service records Timeout is equal with 6.

The phone 3201234567 has received a call from 0671061045. If the phone 3201234567 make a call to 0671061045 the call is routed to number 49 (CTIP:149). The following is the log of call.

[15:54:20] ABILIS_CPX:start ldme

Current Local Time: Wednesday 16/12/2015 15:56:08 (UTC+2.00)

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

Date   Time   Resource   Ses   Id   Event          Parameters
------ ------ ---------- ----- ---- -------------- --------------------------------------
161215 155615 CtiSip        95   95 E-CallRx       CH:85 BC:Speech CD:ue0671061045 
                                                   CG:uxq3201234567 USER:voipclient 
                                                   CODERS:G.711A,G.729A
161215 155615 CtiSip        95   95 E-LCS          CD:ue0671061045 CG:uxq3201234567 
                                                   LCS-CD:ux49
161215 155615 CtiSip        95   95 E-Route Match  PR:1  
161215 155615 CtiP-149      95   95 E-CallTx       BC:Speech TY:StoV CD:ux49 
                                                   CG:uxq3201234567
161215 155615 CtiSip        95   95 E-NumComplete  CDI:ux49 CDO:ux49
161215 155615 CtiP-149      95   95 E-AlertRx      CH:1 USER:49
161215 155615 CtiSip        95   95 E-AlertTx      CH:85 CODERS:G.711A
161215 155630 CtiSip        95   95 E-DiscRx       CH:85 CAUSE:80 90 (U, Normal call 
                                                   clearing) USER:voipclient
161215 155630 CtiSip        95   95 E-DiscConfTx   CH:85
161215 155630 CtiP-149      95   95 E-DiscTx       CH:1 CAUSE:80 90 (U, Normal call 
                                                   clearing) USER:49