Wednesday, May 16, 2012

Cisco Fax-to-mail configuration

Hi people!

Today I am going to show you how to configure Cisco ISR routers ( Callmanager Express or Voice Gateway) as a Fax-to-Mail Server. Below you can see the basic diagram of the Fax call flow.



Fax-to-mail / Mail-to-Fax flow

The procedure for sending Fax is as below:

  1. User sends an email via email client to "FAX address"
  2. Mail server forwards email to Cisco3825 via SMTP
  3. Cisco3825 extracts the remote fax machine phone number from the email's "To" field
  4. Cisco3825 calls the  remote fax machine via PSTN
  5. After remote fax machine answers the call Cisco3825 converts and sends the content of email.
"Fax address" should be "fax=8xxxx@fax.domain" format. In our case "8" is a Fax access code which could be any digit you want."fax.domain" is an address of the Cisco3825.

The procedure for accepting Fax is as below:
  1. Remote Fax machine calls the Fax number of Cisco3825
  2. Cisco3825 answers the call.
  3. Remote Fax machine sends file via PSTN
  4. After call disconnect Cisco3825 converts the fax file to .Tif extension and sends via email to certain email box as an attachment.
To begin configuration you need two TCL scripts which are available at cisco.com -> downloads -> callmanager express -> tcl scripts

 fax-to-mail - app-faxmail-onramp.2.0.1.3.zip
 mail-to-fax - app-faxmail-offramp.2.0.1.1.zip

extract and copy tcl files to flash:

From the configuration mode enter next commands:
------------------------------------------------------------------------------------------------------
fax interface-type fax-mail  ( reload your router after this command )

application
  service onramp flash:app_faxmail_onramp.2.0.1.3.tcl

application
  service offramp flash:app_faxmail_offramp.2.0.1.1.tcl


mta send server (ip address of your mail server) port 25
mta send subject RedJohn
mta send with-subject both
mta send mail-from hostname fax.domain
mta send mail-from username FAX
mta receive aliases fax.domain
mta receive maximum-recipients 10
mta receive generate permanent-error


dial-peer voice 123456 pots               ## Fax number 123456, incoming dp
 service onramp
 incoming called-number 123456
 direct-inward-dial
 port 0/2/0:15
!
dial-peer voice 741 mmoip                ## outgoing dp
 service fax_on_vfc_onramp_app out-bound
 destination-pattern 123456
 information-type fax
 session target mailto:faxinbox@domain    ## mailbox which is created on your companies mail server
!
dial-peer voice 742 mmoip               ##  incoming dp . "8" is a fax access code
 service offramp
 information-type fax
 incoming called-number 8T
 dsn delayed
 dsn success
 dsn failure
!
dial-peer voice 5590 pots                 ## outgoing dp to PSTN.
 destination-pattern 8T
 port 0/2/0:15

 ----------------------------------------------------------------------------------------------------------

Useful debug commands :

debug isdn q921
debug isdn q931

debug fax mta all
debug fax mspi all
debug voip dialpeer inout
 -----------------------------------------------------------------------------------------------------------

That's all you need. Do not hesitate to leave comments or ask questions.

Thanks,
Nuran Afrasiyabov(CCIEV#29273)

 

4 comments:

  1. in dial-peer voice 5590 pots
    needs to add "service onramp"

    it doesnt work like this

    ReplyDelete
  2. Hi.
    Can you please clarify why it will not work?

    ReplyDelete
  3. Hi
    service onramp dont work



    in every dial-peer connecting with "port 0/2/0:15" needs "service onramp" command

    ReplyDelete