Send SMS with Hylafax in Germany

Scope of this Document
This document aims to help you set up HylaFAX to send Short Messages (SMS) via the Short Message Service Centers (SMSC) of german cellphone service providers.

Prerequisites
It is assumed that you have sucessfully installed HylaFAX, are able to send faxes, and your modem functions well, as no help for general HylaFAX setup or fiddling with setup commands to get a certain modem to behave as expected will not be provided in this document.

We will also assume that HylaFAX is installed with /var/spool/hylafax as it's spooling directory.

Instructions
Step 1: Ensure that HylaFAX is running with support for the Simple Network Paging Protocol (SNPP) activated by adding the option -s 444 to any other options you already use.

Step 2: Set-up a configuration file for the sendpage command to tell it were to get it's alias-to-pagernumber mappings from. The pagermap file is consulted by the sendpage command to map from a user supplied PIN to a SMSC/phonenumber group.

There are basically two ways to accomplish this: Firstly, you can define aliases, enabling to do a sendpage -p someone, thus yielding easy-to-remember PINs.

Secondly, you may want to use regular expression matching. This may be the preferable way because Short Messages will, as a rule, be generated by the server to notify people of unusual events, thus rendering the need for easy-to-remember PINs void.

In the approach below, we'll use the "area" code part of the mobile phone number (e.g. the number prefix 0172 for the D2 cellphone network in Germany) to tell which SMSC is to be contacted, and subsequently expand the "provider" stub with the receiver's number matched before.

For more information on how this works and on how to expand this mechanism for your specific needs, please see the manual page of pagermap.

Example for a pagermap file at /var/spool/hylafax/etc/pagermap:

#- PAGERMAP START - #- hylafax pagermap /var/spool/hylafax/etc/pagermap # SMS to D1 cellphone 0170(.*)       01712521001/49170\1    0171(.*)        01712521001/49171\1

# SMS to D2 cellphone 0172(.*)       01722278020/0049172\1    # sic: ... 0049 ..., otherwise won't work.

# SMS to E+ / BASE cellphone 0177(.*)       01771167/49177\1    # example for a name-to-number mapping: # someone       01712092522/49170xxxxxxx

# SMS to O2 (formerly VIAG Interkom) cellphone #   # Currently not possible. # According to the former Viag Tech support the provider does not # currently offer it's customers a way of directly calling the SMSC # thus it is not possible to send SMS to O2 cellphones. # They plan to offer this in the future, though. #- /var/spool/hylafax/etc/pagermap -- #--- PAGERMAP END

IMPORTANT: The "00" (double "0") after the "/" (slash) in the D2 mapping is correct! If it isn't there, sending to D2 won't work. (We don't know why, but that's how it is.)

IMPORTANT: Positivly no trailing whitespace is allowed after the mappings! If there is trailing whitespace, the SMSC will accept Short Messages, but won't deliver them.

Now that the pagermap file is set-up, we try to send a SMS to each of the cellphone network providers (D1, D2, E+ / BASE), e.g. by saying sendpage -p D1number test or similar. This will fail (!) but will nevertheless generate files in the directory /var/spool/hylafax/info/ which we need to proceed.

After calling the SMSCs, there should be a file for each of the SMSCs numbers in the above mentioned info directory of your HylaFAX installation.

What we do now is add &pagerTTYParity:"none" to the files named after the D1 and e-plus numbers this is to set the call to N-8-1 parity instead of the 7-E-1 as is the default, this is the parity the german providers use

Then we add &pagerTTYParity:"none" and &pagingProtocol:"ucp" to the file named after the number of the D2 SMSC This is to tell sendpage to use the UCP (instead of the standard IXO protocol) when talking to D2 and to change the parity to N-8-1 (see above)

Now sending of SMS should work. If not check your Pagermap and the info files and see if you correctly added the extensions mentioned above

All this was done on a stock RH 6.1 system with Hylafax4.1Beta2 and two ELSA TQV 33.6 Modems