goto home

mod_sms - SMS (Short Message Service) transport.

Version : trunk 2007-04-06

Author: Oleg Palij (mailto,xmpp:o.palij@gmail.com)

Requirements: ejabberd 1.1.2.

DESCRIPTION:

  This module for ejabberd emplements SMS (Short Message Service) transport for those GSM mobile operators who allows to send SMS through e-mail.
  Tested against Ukrainian and Russian operators.
  Tested against Psi-0.10, Miranda-0.5.

INSTALL:

  1. Download this patch
  2. Change dir to your ejabberd sources:
  # cd /usr/local/src/ejabberd-1.1.2/src
  3. Apply patch:
  # patch -p0 < patch-src-mod_sms
  4. Rebuild/reinstall ejabberd
    Note: you should build ejabberd with --enable-mod_irc. Only build. mod_irc can be disabled in config if you do not want it to start.
  5. Add to ejabberd.cfg, 'modules' section, the configuration (see CONFIGURE)
  6. Add to DNS your SMS transport name
  7. Restart ejabberd.

INSTALL (Windows):

  1. Download this file.
  2. Unpack.
  3. Copy *.beam files to ejabberd ebin folder.
  4. Add to ejabberd.cfg, 'modules' section, the configuration (see CONFIGURE)
  5. Restart ejabberd.

CONFIGURE:

  host:
   Host name for sms transport.
   Default value - "sms." ++ virtual host name.

  from_override:
    Here you can place REAL email address for "mail from: " smtp, or atom no.
   Default value - no.

  smtp_server:
   Your smtp server address.
   Default value - "localhost".

  smtp_port:
   Your smtp server port.
   Default value - 25.

  limits:
   max_length:
    Maximum message length in symbols.
   Default value - 160.
   between_messages:
    Minimun interval between messages in seconds.
   Default value - 10.
   per_minute:
    Maximum number of messages per minute.
   Default value - 5.
   per_hour:
    Maximum number of messages per hour.
   Default value - 10.

  transliteration:
   By default transport does not support non ascii symbols, it simply ignore them.
   For supporing non ascii symbols custom transliteration rules (from your native encoding to ascii) must be created.
    possible values:
     none - ignore non ascii symbols
     bgn_pcgn_koi8 - translite russian/ukrainian symbols to ascii with BGN/PCGN table.
   Default value - none.

  operators:
   Here you can define rules how to make email address from phone number.
   It is a list tuples {"prefix", "suffix"}, where prefix - operator phone code, suffix - email domain suffix. (See EXAMPLE CONFIGURATION below).
   Default value - [] (no operators supported).

EXAMPLE CONFIGURATION:

  {mod_sms, [
   {from_override, "sms@example.org"},
   {smtp_server, "mail.example.org"},
   {transliteration, bgn_pcgn_koi8},
   {limits, [
    {max_length, 160},
    {between_messages, 20},
    {per_minute, 2},
    {per_hour, 5}
   ]},
   {operators, [
    {"38050", "sms.umc.com.ua"},
    {"38066", "sms.jeans.net.ua"},
    {"38067", "sms.kyivstar.net"},
    {"38068", "sms.beeline.ua"},
    {"38095", "sms.umc.com.ua"},
    {"38096", "2sms.kyivstar.net"},
    {"38097", "2sms.kyivstar.net"},
    {"38098", "2sms.kyivstar.net"},
    {"38099", "sms.umc.com.ua"},
    {"7903", "sms.beemail.ru"},
    {"7906", "sms.beemail.ru"},
    {"7920", "sms.megafoncenter.ru"}
   ]},
  ]},

Changelog:

  trunk - 2007-04-06
     * bugfix (operator codes not equal 5 symbols was not matched)
  trunk - 2007-02-12
     * added ability to change From field in sms body (while registration)
     * bugfixes and optimizations
     * added simple vcard response
  trunk - 2006-10-30
     * Initial version

USAGE:

Register on transport.

Add to roster users like PhoneNumber@sms.example.org .

Send messages.