12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/notifu/actors/twilio_call.rb', line 12
def act
contacts = self.contacts.map { |contact| contact.cell }
req_string = Notifu::CONFIG[:actors][:twilio_call][:api] +
"?token=" + Notifu::CONFIG[:actors][:twilio_call][:token] +
"&status=" + self.issue.code.to_state +
"&hostname=" + self.issue.host +
"&service=" + self.issue.service +
"&description=" + ERB::Util.url_encode(self.issue.message.to_s) +
"&call_group=" + ERB::Util.url_encode(contacts.to_json) +
"&init=1"
Excon.get req_string if self.issue.code.to_i == 2
end
|