Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow several phone numbers in SMS action [ To be closed] #337

Closed
manucarrace opened this issue May 22, 2019 · 2 comments
Closed

Allow several phone numbers in SMS action [ To be closed] #337

manucarrace opened this issue May 22, 2019 · 2 comments
Labels

Comments

@manucarrace
Copy link
Collaborator

manucarrace commented May 22, 2019

Allow several phone numbers in SMS action

This is an example of message received by acdc:
{"to":["tel:+6666666666"],"message":"Nivel de tanque AV_MEDVO_CA_0001 por debajo del umbral. Última medida 239","from":"tel:666666666;phone-context=+34"}

Do you mean that ACDC would receive something like: ?

{"to":["tel:+6666666666", "tel:+6666666666"],"message":"Nivel de tanque AV_MEDVO_CA_0001 por debajo del umbral. Última medida 239","from":"tel:66666666666;phone-context=+34"}

This new feature would imply modify "vrules".

iot-perseo-fe               | time=2019-05-24T08:13:32.919Z | lvl=INFO | corr=d0bb7621-5de8-497c-975a-f45b16c2d890; perseocep=79 | trans=d0bb7621-5de8-497c-975a-f45b16c2d890 | op=/m2m/vrules/sdfgsdfgsdfg | path=/m2m/vrules/sdfgsdfgsdfg | comp=perseo-fe | srv=smartcity | subsrv=/ | from=::ffff:172.17.0.15 | msg=incoming request {"method":"PUT","url":"/m2m/vrules/sdfgsdfgsdfg","headers":{"host":"iot-pep-perseo-fe:1026","connection":"close","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0","accept":"application/json","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://localhost/visualrules/sdfgsdfgsdfg/view","content-type":"application/json;charset=utf-8","x-auth-token":"b119e06c909041ae83610635425904aa","fiware-service":"smartcity","fiware-servicepath":"/","cookie":"menuPanel=visible; menuPanelType=main; region3_registry_menu=visible; region1_identity_menu=none; region1_manage_menu=visible; region1_dashboard_main_menu=visible; region3_metadata_menu=none; userObligationsViewed=true; authToken=%7B%22XAuthToken%22%3A%22b119e06c909041ae83610635425904aa%22%2C%22domainName%22%3A%22smartcity%22%2C%22projectName%22%3Anull%2C%22extras%22%3A%7B%22password_creation_time%22%3A%222019-04-09T09%3A28%3A32Z%22%2C%22last_login_attempt_time%22%3A%222019-05-22T05%3A52%3A28.000000%22%2C%22pwd_user_in_blacklist%22%3Afalse%2C%22password_expiration_time%22%3A%222020-04-08T09%3A28%3A32Z%22%7D%7D","x-forwarded-for":"172.17.0.25","content-length":"572"},"body":{"name":"sdfgsdfgsdfg","active":1,"cards":[{"id":"card_2","type":"SensorCard","sensorCardType":"regexp","configData":{},"connectedTo":["card_3"],"conditionList":[{"scope":"XPATH","parameterValue":"aaaa","parameterName":"id","not":false,"operator":"MATCH","userProp":""}],"sensorData":{}},{"type":"ActionCard","actionData":{"userParams":[{"name":"sms","value":""},{"name":"sms.to","value":"+346666666 +347777777"},{"name":"sms.message","value":"Loreipsun message "}],"name":"SendSmsMibAction","type":"SendSmsMibAction"},"id":"card_3","connectedTo":[]}],"id":"sdfgsdfgsdfg"},"subservice":"/","service":"smartcity"}

sms_to value of visual rule would be composed of several numbers: "+346666666 +347777777" we only need deefine which could be the format for multiple numbers (splited with a separator like )

and then split options.to according with that separator: https://github.com/telefonicaid/perseo-fe/blob/master/lib/models/smsAction.js#L42

@fgalan
Copy link
Member

fgalan commented May 30, 2019

Implemented in PR #341

@fgalan
Copy link
Member

fgalan commented Jun 4, 2019

After the PR #341 merge, the following is yet pending to close this issue (#341 (comment)):

Apart from this acceptance test (which I'm not sure is in use now), I'd suggest adding a component test. You can base in existing "should return ok with a valid action with a rule for sms", just adding a new case (a new JSON) which the new syntaxis for multi-SMS.

@AlvaroVega AlvaroVega changed the title Allow several phone numbers in SMS action Allow several phone numbers in SMS action [ To be closed] Jul 11, 2019
@telefonicaid telefonicaid deleted a comment from manucarrace Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants