Fax Detection for SIP Call and Transfer

Fax detection is the capability to detect automatically whether an incoming call is voice or fax. For calls coming from an IP trunk to the CUBE, the Fax Detection for SIP Call and Transfer feature is used to detect CNG tones (calling tones) so that the fax server can handle the actual fax transmission or redirect the fax call to a configured fax number. Once the tone is detected, the same will be reported to the session application on the incoming TDM call leg, and based on the configuration, the T.38 fax relay session is setup locally.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

Restrictions for Fax Detection for SIP Call and Transfer

  • For FAX detection to work, the cng-fax-detect command under DSP farm and the detect-fax command must be configured in the inbound dial-peer.
  • Only the g711ulaw codec can be used for detecting fax CNG tone.

  • The cng-fax-detect command can be configured up to maximum length of 256 characters.

  • The phone number can be of a maximum length of 32 characters.

  • SCCP-based transcoding is not supported; only LTI-based transcoder is supported.

Information About Fax Detection for SIP Call and Transfer

When a call comes in from an IP trunk to the CUBE, it loops the call to a locally present Voice XML (VXML) gateway, which establishes an auto-attended call. The CUBE monitors the incoming audio stream. The incoming call could be through a fax machine's handset and then switching to transmit a fax. When the CUBE detects a CNG tone, it can be handled in two modes based on the configuration:

  • Trigger a SIP-REFER message to a remote fax server that handles the actual fax transmission.

  • Redirect the fax call to a configured fax number(s) locally.

Mode 1—Local Redirect

In the local redirect mode, the call is redirected to local fax numbers and the redirect call setup will be initiated locally.

Local redirect can be configured with multiple fax numbers. The CUBE will try to set up call to the first configured fax number till the last fax number, until the call is successfully established. After a call setup is successful, the remaining fax numbers are ignored. There is no limit to the number of fax numbers that can be configured for local redirect. The maximum length of a command can be 256 characters.

Figure 1. Local Redirect Call Flow

For each call, a digital signal processor (DSP) channel or resource is allocated to detect CNG tone. In the call flow, as the first fax machine returned an error, the CUBE tries to establish the call with the second fax machine.


Note


CUBE will send out a normal VOICE SDP INVITE to the local FAX machine after the CNG tone is detected. It does not send out a FAX negotiation SDP.

Mode 2—Refer Redirect

In this mode, redirect through SIP-REFER message is configured for remote fax numbers.

Refer redirect can be configured with only one remote FAX number. A SIP REFER message is sent back to the incoming dial-peer to redirect the call (similar to blind transfer). The refer redirect can be configured for local fax numbers also.

Figure 2. Refer Redirect Call Flow

For each call, a DSP channel or resource is allocated to detect the CNG tone. Refer will be sent with the remote FAX number in the Refer-to header.

How to Configure Fax Detection for SIP Calls

Enabling CNG Fax Detection

SUMMARY STEPS

    1.    enable

    2.    configure terminal

    3.    dspfarm profile tag transcode universal

    4.    cng-fax-detect

    5.    end


DETAILED STEPS
     Command or ActionPurpose
    Step 1 enable


    Example:
    Device> enable
     

    Enables privileged EXEC mode.

    • Enter your password if prompted.

     
    Step 2 configure terminal


    Example:
    Device# configure terminal
     

    Enters global configuration mode.

     
    Step 3 dspfarm profile tag transcode universal


    Example:
    Device(config)# dspfarm profile 5 transcode universal
     

    Enters DSP farm profile configuration mode and enables the profile for transcoding.

     
    Step 4 cng-fax-detect


    Example:
    Device(config-dspfarm-profile)# cng-fax-detect
     

    Enables CNG tone detection.

     
    Step 5 end


    Example:
    Device(config-dspfarm-profile)# end
     

    Returns to privileged EXEC mode.

     

    Verifying Fax Detection for SIP Calls

    SUMMARY STEPS

      1.    enable

      2.    show call active voice compact

      3.    show dspfarm dsp active

      4.    show call active voice compact


    DETAILED STEPS
      Step 1   enable


      Example:
      Device> enable
                

      Enables privileged EXEC mode.

      Step 2   show call active voice compact


      Example:

      This is a sample output of call setup when the call is connected to the VXML gateway after being looped:

      Device# show call active voice compact
      
             <callID>  A/O FAX T<sec> Codec     type     Peer Address       IP R<ip>:<udp>
      	      Total call-legs: 3
                	9    ANS   T4      g711ulaw    VOIP        P808808      9.42.25.145:17940
              		10    ORG   T4      g711ulaw    VOIP        P309903      9.42.25.149:16396
              		11    ANS   T4      g711ulaw    VOIP        P808808      9.42.25.149:16394
                
      Step 3   show dspfarm dsp active


      Example:

      This is a sample output of the DSP channel reserved to detect CNG tone after the call is set up.

      Device# show dspfarm dsp active
      
                 SLOT   DSP VERSION  STATUS CHNL USE   TYPE    RSC_ID BRIDGE_ID PKTS_TXED PKTS_RXED
      	           0      2   36.1.0   UP     1   USED  xcode    1      9         228       119      
      	           0      2   36.1.0   UP     1   USED  xcode    1      10        113       251      
       	    Total number of DSPFARM DSP channel(s) 1
                
      Step 4   show call active voice compact


      Example:

      This is a sample output of FAX call setup with local redirect in the CUBE:

      Device# show call active voice compact
      
             <callID>  A/O FAX T<sec> Codec       type      Peer Address     IP R<ip>:<udp>
      	      Total call-legs: 2
      		       28     ANS      T4     g711ulaw    VOIP        P808808      9.0.0.174:14662
      		       29     ORG      T4     g711ulaw    VOIP        P12101       9.0.0.174:14652
                

      Troubleshooting Fax Detection for SIP Calls

      You can enable the logs of the following debug or show commands, which are helpful in debugging fax detection for SIP calls:

      • debug ccsip verbose
      • debug voip ccapi all
      • debug voip dsmp all
      • debug voip hpi all
      • debug media resource provisioning all
      • show call active voice compact
      • show dspfarm dsp active
      • show voip rtp connections

      Configuration Examples for Fax Detection for SIP Calls

      Example: Configuring Local Redirect

      In this example, three dial-peers are used. Each incoming dial-peer is associated with one service. If customers want to run their own VXML script, then can run the script in the initial incoming dial-peer (dial-peer 410 in the example below) The call is looped using translation profile to get one more incoming dial-peer in which VXML script is run for default IVR session (dial-peer 412 in the example below).

      voice translation-rule 1 //Translation Rule//
       rule 1 /903309/ /309903/
       
      voice translation-profile vxml
       translate called 1
      
      dial-peer voice 410 voip
       description "Incoming dial-peer to GW"
       translation-profile incoming vxml
       session protocol sipv2
       incoming called-number 903309
       codec g711ulaw
       detect-fax mode local 12101 12102 12103 12104 //Local Redirect command//
      
      dial-peer voice 411 voip
       description "Outgoing dial-peer to VXML GW"
       destination-pattern 309903
       session protocol sipv2
       session target ipv4:9.42.25.149 //CUBE IP for looping the call//
       codec g711ulaw
      
      dial-peer voice 412 voip
       description "Incoming dial-peer to VXML GW"
       service tx_n50_1 //VXML Service//
       session protocol sipv2
       incoming called-number 309903
       codec g711ulaw
      

      Example: Configuring Refer Redirect

      In Refer mode, only one fax number can be configured.

      voice translation-rule 1 //Translation Rule//
       rule 1 /903309/ /309903/
       
      voice translation-profile vxml
       translate called 1
      
      dial-peer voice 410 voip
       description "Incoming dial-peer to GW"
       translation-profile incoming vxml
       session protocol sipv2
       incoming called-number 903309
       codec g711ulaw
       detect-fax mode refer 332211 //Refer Redirect command//
      
      dial-peer voice 411 voip
       description "Outgoing dial-peer to VXML GW"
       destination-pattern 309903
       session protocol sipv2
       session target ipv4:9.42.25.149 //CUBE IP for looping the call//
       codec g711ulaw
      
      dial-peer voice 412 voip
       description "Incoming dial-peer to VXML GW"
       service tx_n50_1 //VXML Service//
       session protocol sipv2
       incoming called-number 309903
       codec g711ulaw
      

      Feature Information for Fax Detection for SIP Call and Transfer

      The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

      Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.
      Table 1 Feature Information for Fax Detection for SIP Call and Transfer

      Feature Name

      Releases

      Feature Information

      Fax Detection for SIP Call and Transfer

      15.4(2)T

      Fax detection is the capability to detect automatically whether an incoming call is voice or fax. For calls coming from an IP trunk to a the CUBE, the Fax Detection for SIP Call and Transfer feature is used to detect CNG tones (calling tones) so that the fax server can handle the actual fax transmission or redirect the fax call to a configured fax number.

      The following commands were introduced: cng-fax-detect and detect-fax mode.