Knowlege base

PBX Configuration

Article ID: 75
Last updated: 01 Jun, 2020

Cisco Unified Communications configuration

StoneFax interacts with the Unified Communications system through both SIP or H.323 protocols using both T.38 or G.711 passthrough modes.

The SIP configuration is suggested and will be detailed. Remember to enable the new StoneFax engine and enable SIP in the Fax Server – Application Settings – IP Routes page on the Application Suite.

In the following examples, we are supposing the StoneFax server IP address is

General concepts

  • The PBX sees the StoneFax server as a SIP trunk or H.323 gateway
  • The signaling transport must be SIP over UDP or H.323 over TCP for both directions (PBX to StoneFax and StoneFax to PBX)
  • The audio encoding of the rtp stream must be T.38 or G.711alaw/G.711ulaw/
  • On the PBX you must configure routing rules to make incoming faxes reach StoneFax and outgoing faxes to exit on the PSTN

Note: if you configure StoneFax on H.323, remember that it listens for incoming faxes on the non-standard port 1721

Configuring Voice Gateways using SIP or H.323 protocol

In this configuration, StoneFax directly sends and receives SIP calls managing faxes through T.38 first and fallback to passthrough in case T.38 is not available (e.g.: sending fax internally to Cisco ATA devices).

This configuration can be chosen if you have CallManager Express or if you have CallManager with at least one voice port configured in h.323 or SIP. You cannot directly send faxes through the Voice Gateway if it is configured with MGCP.

On the voice gateway you must enable T.38 and fallback to G.711 passthrough in global configuration mode (G.711alaw in the examples)

    voice service voip
	fax protocol t38 fallback pass-through g711alaw

Then a dial-peer must be added to route incoming faxes to StoneFax. The session target points to the IAS machine and the codec is g711alaw.

   dial-peer voice 1 voip
   destination-pattern 4..
   session target ipv4:
   session protocol sipv2
   codec g711alaw
   no vad    

Quick troubleshooting tips

Warning: effective from IOS ver. 15.2(1)T calls from non trusted IP addresses are blocked by default. To allow outgoing faxes from StoneFax you must either add it to the ip address trusted list or disable the toll-fraud prevention application completely (with the no ip address trusted authenticate command).

  • If StoneFax does not seem to negotiate outgoing faxes, remember that you need the SIP to SIP, h323 to h323 or SIP to H323 commands on the VG global configuration
  • Install Wireshark on the StoneFax machine to check negotiation (from the Telephony Menu select "Voip Calls")
  • If incoming faxes do not reach the StoneFax machine, ensure that no dial-peer is diverting the call (usually dial-peers with destination pattern .T). Use the show dial-peer voice summary command
  • If you want the remote hardware fax machines sending faxes to your Stonefax to get a busy tone when all StoneFax licensed channels are in use, add the max-conn X command to the StoneFax incoming dial-peer, where X is the number of licensed channels

Configuring Cisco Unified CallManager

In this configuration, StoneFax interacts with Cisco CallManager to send and receive SIP calls managing faxes through T.38 first and fallback to passthrough in case of T.38 not available (ex: sending fax internally to Cisco ATA devices). This configuration must be chosen if you want to be able to bill outgoing faxes (for example with Imagicle Billing).

The CallManager must be configured by adding a new SIP trunk with the StoneFax address and the correct inbound calling search space for StoneFax to be able to send outgoing faxes.

Remember to set a valid CSS for inbound calls on the Trunk configuration, to allow StoneFax to send outgoing faxes.

The Calling Party Selection in the Outbound Calls section must be set to Originator.

Since the signaling must be transported over UDP only, a new SIP Secure Profile is needed. Select System - Security - SIP trunk Security Profile.

Click the Add New button. Leave all the options to default values except for the Outgoing transport type, which must be set to UDP. The security mode must be left "Non Secure".

Then go back to Device - Trunk, Edit the StoneFax trunk and ensure that the StoneFax SIP Security profile is selected in the SIP Information panel.

The last step is to add a Route Pattern, which is needed to route incoming faxes to the StoneFax SIP trunk. In the following example we configure all calls for destinations starting with 400 to 499 to be sent to StoneFax.

Then the voice gateway must be configured to enable T.38 and fallback to passthrough in global configuration mode (G.711alaw in the examples)

voice service voip
  fax protocol t38 fallback pass-through g711alaw

Configuring MGCP Gateways

While dealing with Cisco Unified CallManager using MGCP controlled voice gateways, specific commands must be issues on the gateways:

 Router(config)# no mgcp fax t38 inhibit
 Router(config)# mgcp package-capability fxr-package
 Router(config)# mgcp default-package fxr-package

show mgcp command should then list the fax properties as shown below:

    MGCP supported packages: gm-package dtmf-package trunk-package line-package
    hs-package ms-package dt-package res-package mt-package fxr-package
    MGCP T.38 Fax is ENABLED
    MGCP T.38 Fax NSF Override is DISABLED
    MGCP T.38 Fax Low Speed Redundancy: 0
    MGCP T.38 Fax High Speed Redundancy: 0

This would enable propagation of t38 capabilities in SDP and notifications of t38start and t38stop events as defined in fax package.

An example of IOS configuration for MGCP T.38 support follows:

voice-port 0/0/0
   bearer-cap Speech
 ccm-manager mgcp
 ccm-manager music-on-hold
 ccm-manager config server CCM-IP
 ccm-manager config
 mgcp call-agent CCM-IP 2427 service-type mgcp version 0.1
 mgcp dtmf-relay voip codec all mode out-of-band
 mgcp rtp unreachable timeout 1000 action notify
 mgcp modem passthrough voip mode nse
 mgcp package-capability rtp-package
 no mgcp package-capability res-package
 mgcp package-capability sst-package
 mgcp package-capability pre-package
 no mgcp timer receive-rtcp
 mgcp sdp simple
 mgcp rtp payload-type g726r16 static
 mgcp profile default
 dial-peer voice 2 pots
   service mgcpapp
   port 0/0/0

Warning: after configuring the voice gateway in MGCP mode, please save your configuration and reboot it.

To troubleshoot MGCP T.38 fax relay, perform the following steps:

   Router# show mgcp
  1. Make sure that you have a working MGCP network and that you can make a voice call
  2. Make sure that T.38 fax relay for MGCP is configured on both the originating and terminating gateways
  3. Use the following commands to debug problems while making the call:
    1. The show mgcp [connection | endpoint | statistics] command displays information about MGCP calls.
    2. The show voice call summary command indicates, during a T.38 fax transmission, a change of state from S_CONNECT to S_FAX in the VTSP STATE column and a change from the codec name to a numeric fax rate in the CODEC column (for example, g711u changes to 14400)
  4. For CA-controlled T.38 fax relay, you can verify the MGCP side of the call flow by using the debug mgcp packets command. You should see the following output:
    1. CRCX from the call agent with "fxr/fx:t38-loose" or "fxr/fx:t38" parameter
    2. RQNT from the call agent with "R: fxr/t38" parameter
    3. NTFY from the gateway with "O: fxr/t38(start)" parameter (optionally)
    4. MDCX from the call agent with either "m=image" in the SDP message, or "a:image/t38" in the Local Connection Options message, or both
  5. For CA-controlled T.38 fax relay, you should see the following messages in the output from a show voice call summary command on the MGCP gateway during a T.38 fax transmission: Change of state from S_CONNECT to S_FAX in the VTSP STATE column; change from codec name to numeric fax rate (such as "g711u" to 14400") in the CODEC column.

General troubleshooting tips for Cisco Unified CallManager

  • On CuCm most issues are related to the partitions or Calling search spaces. The CSS for Inbound Calls on the SIP trunk must be suitable to reach the PSTN through the voice gateway
  • Test incoming and outgoing faxes separately
  • If you need to change the properties of the default SIP profile, remember to create a custom SIP profile for StoneFax so that its SIP trunk remains unaffected by the changes
  • Warning for CuCM cluster installations: Placing the StoneFax SIP trunk in the Default device pool does not ensure it can be always reached. In CCM cluster installations, ensure that the Cisco Unified CallManager Group associated with the Default device pool contains all the CuCms in the "Cisco Unified Communications Manager Group Members" selection list

Direct Inward Dial (DID) Or Shared Numbers?

StoneFax manages the dnis (called number) and ani (caller number) to directly address the incoming fax to the specific user. This feature requires DID (Direct-Inward-Dial) configuration from the TELCO, in order to manage a pool of public numbers. If you don't have DID, you can have:

  • Only a public number dedicated to fax
  • A unique public number to share between voice and fax

In the former case, you have a simpler context with one user only (the company fax). So you can follow the sample provided in this guide and apply it to the unique available user.

In the latter case, you can use the IVR feature of Application Suite in order to provide an automated voice response to choose between voice and fax. You simply need to configure the IVRMANAGER with a special script called DirectInwardDial.tcl.

The script is able to answer the incoming call prompting the message: "Please dial the extension you wish to reach".

If no extension is dialled, the script will automatically connect to the default extension after a timeout. If you specify the fax extension as the default one, the fax calls will be connected to that fax.

Please refer to Imagicle IVR Manager Enterprise configuration guide for details.

Article ID: 75
Last updated: 01 Jun, 2020
Revision: 8
Views: 3203
Print Export to PDF Subscribe Share
This article was:  
Prev   Next
Configuration Task List     Product Administration