You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prevent and handle known errors, like Nexmo which reports "15: Illegal sender address" when sending SMS to recipients in the United States with a sender id violating the limited numeric sender only policy of US and Canada carriers. The solution is to use a a pre-approved virtual long number which you can purchase on the Nexmo site. In this case, the exception handler should do two things
Check (exceptions before sending sms)
Check if recipient address a home base (country) which requires a private number
It it does, check if a private number is associated with the account and replace default sender id with it
If it does, and no private number was found, notify user BEFORE sending the SMS
Handle (errors after sending sms)
Check if an exception handle exist for given error context
If it does, run exception handler
Implementation
These steps should be implemented using interfaces, for example
interface RescueMe\SMS\Check {
/**
* @param string $country Country code (ISO2)
* @param string $number Local number
* @param array $params Parameters to service
* @return boolean|array True if allowed, adapted parameters otherwise.
*/
public function recipient($country, $number);
}
interface RescueMe\SMS\Handle {
/**
* @param string $country Country code (ISO2)
* @param string $number Local number
* @param array $params Parameters used to invoke service
*/
public function error($error, $message, $params);
}
Important: Exception resolutions should be configurable from the SMS provider setup page.
The text was updated successfully, but these errors were encountered:
kengu
changed the title
Add SMS-provider spesific exception handlers to prevent and handle known errors
Add SMS-provider spesific exception handlers
Aug 19, 2014
To prevent and handle known errors, like Nexmo which reports "15: Illegal sender address" when sending SMS to recipients in the United States with a sender id violating the limited numeric sender only policy of US and Canada carriers. The solution is to use a a pre-approved virtual long number which you can purchase on the Nexmo site. In this case, the exception handler should do two things
Check (exceptions before sending sms)
Handle (errors after sending sms)
Implementation
These steps should be implemented using interfaces, for example
Important: Exception resolutions should be configurable from the SMS provider setup page.
The text was updated successfully, but these errors were encountered: