2017 © Pedro PelĂĄez
 

symfony-bundle sms-campaign-bundle

Symfony Bundle for SMS Campaigns

image

terox/sms-campaign-bundle

Symfony Bundle for SMS Campaigns

  • Monday, July 24, 2017
  • by terox
  • Repository
  • 2 Watchers
  • 7 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

SmsCampaignBundle

About The Project

The SmsCampaignBundle provides tools and services to create and send SMS campaigns to a high volume of users. Currently, it can send SMS though SMPP client, the most used protocol for send high volumes., (*1)

About the SMPP Client

Due the PHP limitations on persistent and async processes management, I have created the utility smpp-cli for NodeJS. This is a little daemon that implements a DNode protocol to connect the PHP consumers with smpp-cli processes that sent the SMS through SMPP server., (*2)

The impact of implement this architecture is minimum and solves a lot of headaches with SMPP providers like repetitive connections, timeouts, two processes (one to sent, one to receive) etc., (*3)

This is completely transparent for developer., (*4)

Note: The customized php-smpp is definitely deprecated., (*5)

Installation:

1. Require the bundle and its dependencies with composer:

composer require terox/sms-campaign-bundle

2. Install smpp-cli:

npm install -g smpp-cli

2. Register SmsCampaignBundle and RabbitMQBundle in your AppKernel.php:

public function registerBundles()
{
    $bundles = array(
        // ...
        new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
        new Terox\SmsCampaignBundle\TeroxSmsCampaignBundle()
        // ...
    );

    return $bundles;
}

3. Add the SmsCampaignBundle configuration to your config.yml:

terox_sms_campaign:
    providers:
        example_provider:
            host: "%smpp_host%"
            port: "%smpp_port%"
            login: "%smpp_login%"
            password: "%smpp_password%"
            rpc:
              port: 7070

4. If you haven't added the RabbitMQBundle configuration, add it to your config.yml:

You are free to configure the RabbitMQ bundle. The producers and consumers are preconfigured in SmsCampaignBundle., (*6)

old_sound_rabbit_mq:
    connections:
        default:
            host:     "%rabbitmq_host%"
            port:     "%rabbitmq_port%"
            user:     "%rabbitmq_user%"
            password: "%rabbitmq_password%"
            vhost:    "%rabbitmq_vhost%"
            lazy:     true
            connection_timeout: 3
            read_write_timeout: 3

            # requires php-amqplib v2.4.1+ and PHP5.4+
            keepalive: false

            # requires php-amqplib v2.4.1+
            heartbeat: 0

Usage

There are two ways to start the SMPP daemon (smpp-cli):, (*7)

A. Start the SMPP daemon manually (recommended):

This will execute the daemon and will listen the dnode port. You need to pass your credentials manually:, (*8)

smpp-cli listen 7070 -h smpp.example.com -p 2675 -L userLogin -P userPassword -C "/var/www/bin/console sms:dlr:update"

Note: You can use as many demons as you need, for example if you have more than one SMPP provider; only change the port number., (*9)

I recommend you that executes this command inside supervisor to keep it running if something was wrong (like server updates, unexpected errors...)., (*10)

Keep in mind:

  • The credentials could be shown at the process manager (like htop) depending on how you pass the credentials to smpp-cli.
  • If you use some deployment scripts, be sure to hide the sensitive data where you store these scripts.

B. Start the SMPP daemon with a Symfony console:

The propose of this command is to use the Symfony configuration params to configure the smpp-cli daemons:, (*11)

/var/www/bin/console sms:start:client

Warning! This command still not working as I expected. It need little more research. I hope fix it in the next major release, but you are free to sent your PR., (*12)

TODO

[ ] Message model extension, (*13)

License

See: LICENSE.md, (*14)

The Versions

04/04 2017

1.1.3

1.1.3.0 https://github.com/terox/SmsCampaignBundle

Symfony Bundle for SMS Campaigns

  Sources   Download

MIT

The Requires

 

by David PĂ©rez Terol

sms symfony bundle short message service send sms smpp sms campaigns

28/03 2017

1.1.2

1.1.2.0 https://github.com/terox/SmsCampaignBundle

Symfony Bundle for SMS Campaigns

  Sources   Download

MIT

The Requires

 

by David PĂ©rez Terol

sms symfony bundle short message service send sms smpp sms campaigns

28/03 2017

1.1.1

1.1.1.0 https://github.com/terox/SmsCampaignBundle

Symfony Bundle for SMS Campaigns

  Sources   Download

MIT

The Requires

 

by David PĂ©rez Terol

sms symfony bundle short message service send sms smpp sms campaigns

28/03 2017

1.1.0

1.1.0.0 https://github.com/terox/SmsCampaignBundle

Symfony Bundle for SMS Campaigns

  Sources   Download

MIT

The Requires

 

by David PĂ©rez Terol

sms symfony bundle short message service send sms smpp sms campaigns

04/01 2017

1.0.1

1.0.1.0 https://github.com/terox/SmsCampaignBundle

Symfony Bundle for SMS Campaigns

  Sources   Download

MIT

The Requires

 

by David PĂ©rez Terol

sms symfony bundle short message service send sms smpp sms campaigns

04/01 2017

1.0.0

1.0.0.0 https://github.com/terox/SmsCampaignBundle

Symfony Bundle for SMS Campaigns

  Sources   Download

MIT

The Requires

 

by David PĂ©rez Terol

sms symfony bundle short message service send sms smpp sms campaigns