RestComm / smscgateway

RestComm SMS Gateway (SMSC) to send/receive SMS from/to Operators Network (GSM)
http://www.restcomm.com/
GNU Affero General Public License v3.0
126 stars 112 forks source link

Mproc rule: remove of an prefix from dest address digits #267

Closed vetss closed 6 years ago

vetss commented 6 years ago

We need to add an action into default mproc rules implementation:

"removedestdigprefix"

This action will remove first digits count from a dest address digits. The action will leave at least one (last) digit if value is too long. Default value "0". values "0" and negative values will make no actions. We need to update CLI / GUI / manual.

scottbarstow commented 6 years ago

@vetss i think we want more control than just "remove prefix." It needs to be flexible enough to support the following options:

questions / comments?

vetss commented 6 years ago

Hello @scottbarstow

We will use this action with other existing functionality - conditions. Example (we will remove one leading sign if oigina ESME name matches to ^(test)$ and a dest address digits match to mask <mask for processing>) :

smsc mproc add mproc 1 destdigmask <mask for processing> origesmenamemask ^(test)$ removedestdigprefix 1
olenara commented 6 years ago

Fixed by: https://github.com/RestComm/smscgateway/commit/1f70a2c6e090bcab7cc7d6a9b52079343f4f75fe https://github.com/RestComm/smscgateway/commit/0aed184f1e4bd9500c89ba0cb90792a2d9a1a4a7 https://github.com/RestComm/smscgateway/commit/5c63e10e80a01664467f608674f6e8e57605b268