-
Notifications
You must be signed in to change notification settings - Fork 130
Alternate gateway TMobileCZ
The provider's webpage requires 2FA instead of the original captcha. The gateway is therefore broken and cannot be fixed anymore.
You can send SMS via T-Mobile CZ web portal with this Alternate gateway. No support for receiving SMS. Customer registration in T-Zones needed. Please accept and follow their terms and conditions. Sending SMS to other mobile providers will cost you money!
Configure your application/config/kalkun_settings.php
:
/*
|--------------------------------------------------------------------------
| Gateway Engine (Default to Gammu)
|--------------------------------------------------------------------------
|
| Valid engine are:
| gammu <http://wammu.eu>
| kannel <http://kannel.org> - Experimental
| clickatell <http://clickatell.com> - Experimental
| ozeking <http://ozekisms.com> - Experimental
| nowsms <http://nowsms.com> - Experimental
| way2sms <http://way2sms.com> - Experimental
| tmobilecz <https://sms.t-mobile.cz/closed.jsp> - Experimental
*/
$config['gateway']['engine'] = 'tmobilecz';
// for tmobilecz you must specify the credentials to log-in to T-Mobile CZ portal
// numeric keys - credentials for specific kalkun user (user's ID from table "user")
// key "default" - credentials for all other Kalkun users
// subkey "user" and "pass" - string - username and password for T-Mobile CZ portal
// subkey "hist" - boolean - save copies of SMS in T-Mobile CZ portal
// subkey "eml" - string - T-Mobile CZ will send copy of SMS to specified e-mail. Leave empty to switch off.
$config['gateway']['tmobileczauth'] = array(
1 => array('user' => 'admins login', 'pass' => 'his_password', 'hist' => TRUE, 'eml' => ''),
2 => array('user' => '2nd users login', 'pass' => 'her_password', 'hist' => TRUE, 'eml' => ''),
'default' => array('user' => 'all others', 'pass' => 'their_password', 'hist' => TRUE, 'eml' => '')
);
To really send SMS you need to specify credentials for the portal. Above mentioned example shows credentials for Kalkun user ID=1 (admin), ID=2 (some user). Credentials on the last line would apply to all other Kalkun users.
You can configure single credentials for all Kalkun users:
$config['gateway']['tmobileczauth'] = array(
'default'=>array('user'=>'login','pass'=>'password','hist'=>true, 'eml'=>'')
);
Or you can configure credentials for each Kalkun user individually:
$config['gateway']['tmobileczauth'] = array(
1=>array('user'=>'admins login', 'pass'=>'his_password', 'hist'=>true, 'eml'=>''),
2=>array('user'=>'2nd users login','pass'=>'her_password', 'hist'=>true, 'eml'=>'')
);
The top-most configuration shows a mix - some users have their own credentials, the rest uses defaults.
- "user" and "pass" - strings - username and password for T-Mobile CZ portal
- "hist" - boolean - true=>save copies of SMS in T-Mobile CZ portal history
- "eml" - string - T-Mobile CZ will send copy of every SMS to specified e-mail. Leave empty to switch off.
- every user can set Delivery Report option (default/yes/no). Select YES to receive delivery reports. They will come to your real mobile phone.
- Multiple recipients - Kalkun will deliver your SMS one-by-one to each recipient (hard-coded in Kalkun)
- Send date - postponed sending - works via queue processing script
/scripts/outbox_queue.sh
. You must start it from crontab!! - Validity - Cannot be implemented.
- SMS Type - Normal/Flash/WAP_push_link (Flash will deliver to phone screen only,WAP cannot be implemented)
- Send as Unicode - not implemented (you can use national characters, but T-Mobile will replace them with closest ASCII variants)
The credentials to access T-Mobile CZ portal must be kept secret! Never post your kalkun_settings.php file to any forum with the real passwords! Change your password after any security incident (such as leaked password to FTP account used for Kalkun hosting or after webserver compromise).
Additionally care must be taken to limit access to cookie files. These files are stored in directory system/cache/ with a predictable name. A clever guy could read the cookies via HTTP access and then use your account to send SMS. To prevent this, there is a .htaccess file in directory "system". This should block direct HTTP access to all files under the system directory (recommended for all CodeIgniter applications).
Please double-check it really works on your site!