Feature request for prefix settings and outgoing routings

Hi Anton.
I installed playSMS yesterday, and i would like to raise the following issue to your attention:

I am using services from two different SMS services providers.
One of them in the API for submitting the message, expects the destination number to be in short international format, aka. 40712123456 where 40 is the country code and the rest is the effective phonenumber.
The other provider expects the phone number to be presented as 0712123456 - so without the 4, from the country code.

Here in Romania, for local calls (inclusive national calls) we are using the second format of the phone number (0712123456), so for the first provider in the site-s “main configuration” -> “default config” i have to set the “Default prefix or country code” to be 40, and in the “Route outgoing sms” menu i have to set “Prefix” to 40 too, but this settings unfortunately breaks the second providers usability, aka. for the second provider i have to remove “Default prefix or country code” and i have to set “Prefix” to 07 (because 7XX are the mobile numbers range in Romania) and viceversa.

So, it owuld be benefic if the prefix settings (meaning transformations of the phone number before submitting), and the individual outgoing routings could be managed from one place to acomodate use of both providers.

Thank you in advance.


I see what you mean, but not sure when this can be done. What you can do right now probably not to use default prefix and modify your gateway plugin for one provider to transform 0XXX. to 40XXX. I suppose.


Yes, it could be a solution.

Could you be so kind to give me some clues how sould i do that?

modify prefix on gateway plugin ? which gateway plugin do you use ? if you made yourself then I dont have the source.

changing 07… to 407… shouldn’t be too hard


Hmm … I am using the “factory” plugins in install, and did not find in gateway plugins where i could modify prefixes…
Btw, for both providers i am using generic gateway plugin, with SMScs configured appropiately …

Maybe, are you talking about routing outgoing sms settings?
That’s the only place (except “User configuration” and “Main configuration”) where i can specify prefixes.

Ic, what I suggested was modfiying the gateway plugin (in your case generic gateway plugin) codes, so its not something available on menus/UI

you can insert here (after global… before _log…):

insert this:

$sms_to = preg_replace('/^07?/', '407', $sms_to);

basically if the $sms_to (the destination) is 07… then the 07 will be replaced with 407


Ahh … ok. Understood.
I will give it a try.
Thank you.