Personal tools
HylaFAX The world's most advanced open source fax server

Difference between revisions of "Send SMS with Hylafax in Germany"

 
(Instructions)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
==Scope of this Document==
 
==Scope of this Document==
This Document aims to be a help tp people who intend to setup Hylafax for Sending SMS messages in germany The Information included herein may also be helpful in general Setup of Hylafax for sending SMS messages as many of the Problems and Solutions described herein are of a general nature
+
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==
 
==Prerequisites==
The author assumes that the reader has sucessfully installed hylafax and is able to send faxes, as no help for general setup will be provided.
+
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.
It is assumed that the Reader has an well functioning modem (something like the pair of elsa 33.6TQV im using) as fiddling with the modem setup commands to get it to behave as expected is not covered here (my 33.6TQV worked with hylafax out of the box)
 
  
==Assumptions==
+
 
The Author assumes that Hylafax is installed with /var/spool/hylafax as spooling directory
+
We will also assume that HylaFAX is installed with /var/spool/hylafax as it's spooling directory.
  
 
==Instructions==
 
==Instructions==
First we ensure that Hylafax is running with SNPP (Simple Network Paging Protocol) Support For that to work you'll have to start Hylafax with the -s 444 option in addition to any others you already have
+
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.
  
Then well have to setup an configuration file for sendpage to get its alias to pagernumber mappings from: the pagermap file is consulted by the sendpage Program to map the user supplied PIN to an SMSC/phonenumber group There are two ways to accomplish this: First of all you can define aliases, enabling to do a sendpage -p someone thus yielding easy to remember PINs
+
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.
  
The other possibility is to use regex matching (in my eyes the preferable solution, as SMS messages will, as a rule, be generated by the server to notify people of unusual events, thus rendering the remeberability void) here we match the phone number part of the number using the static part of the number (in germany for example the 0172 for the provider D2) to know wich SMSC to contact then later expand the 'provider' stub with the receivers number (wich we matched earlier) For more information on how this works and on how to expand this mechanism for your specific needs see the manual page for pagermap
+
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.
  
Following find an example for an pagermapfile
+
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.
  
example for /var/spool/hylafax/etc/pagermap/
+
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'':
 +
 +
<pre>
 
     #----- PAGERMAP START -------------
 
     #----- PAGERMAP START -------------
 
     #----- hylafax pagermap  /var/spool/hylafax/etc/pagermap ----
 
     #----- hylafax pagermap  /var/spool/hylafax/etc/pagermap ----
     # SMS to D1 Handy
+
     # SMS to D1 cellphone
 
     0170(.*)        01712521001/49170\1
 
     0170(.*)        01712521001/49170\1
 
     0171(.*)        01712521001/49171\1
 
     0171(.*)        01712521001/49171\1
  
     #SMS to E-Plus Handy
+
    # SMS to D2 cellphone
 +
    0172(.*)        01722278020/0049172\1
 +
    # sic: ... 0049 ..., otherwise won't work.
 +
 
 +
     # SMS to E+ / BASE cellphone
 
     0177(.*)        01771167/49177\1
 
     0177(.*)        01771167/49177\1
 
    #SMS to D2 Handy
 
    0172(.*)        01722278020/0049172\1
 
 
     
 
     
     #example for an mapping of name to number
+
     # example for a name-to-number mapping:
     #someone        01712092522/49170xxxxxxx
+
     # someone        01712092522/49170xxxxxxx
  
     #SMS to VIAG Handy
+
     # SMS to O2 (formerly VIAG Interkom) cellphone
 
     #
 
     #
     # not possible at the moment
+
     # Currently not possible.
     # according to Viag Tech support Viag doesent currently offer
+
     # According to the former Viag Tech support the provider does not
     # its customers the possibilty of directly calling the SMSC
+
     # currently offer it's customers a way of directly calling the SMSC
     # thus it is not possible to send SMS to Viag handys
+
     # thus it is not possible to send SMS to O2 cellphones.
     # They plan to offer this in the future though
+
     # They plan to offer this in the future, though.
 
   
 
   
 
     #----- /var/spool/hylafax/etc/pagermap  ------
 
     #----- /var/spool/hylafax/etc/pagermap  ------
 
     #------- PAGERMAP END ------------
 
     #------- PAGERMAP END ------------
 +
</pre>
 +
 +
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.
  
IMPORTANT: the 00 after the / in the D2 mapping is correct, if it isnt there sending to D2 wont work, dont know why but thats how it is
+
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.
  
IMPORTANT: there must be NO trailing spaces after the mappings, if there are the SMSC will accept the SMS Messages but not deliver it
+
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.
  
Now that we have set up our pagermap we try to send an SMS to each of the providers (D1, D2, e-plus) (e.g. 'sendpage -p D1number test' or similar) These will fail but we still need to do it as we need the files in /var/spool/hylafax/info/ generated by our calls
 
  
Now that we have called (and subsequently failed) contacting the SMSC's there should be an file for each of the SMSC's numbers in the info dir of the 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
 
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
  

Latest revision as of 20:30, 13 May 2009

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


This page was last edited on 13 May 2009, at 20:30.

Powered by MediaWiki
Attribution-ShareAlike 2.5

Project hosted by iFAX Solutions