lib/trails/twilio/incoming.rb in trails-1.1.1 vs lib/trails/twilio/incoming.rb in trails-1.1.2
- old
+ new
@@ -5,14 +5,19 @@
def initialize( request, opts = {} )
@request = request
@account = Trails::Twilio::Account.from_request( request )
end
- protected
- attr_reader :request
def twilio_data
@twilio_data ||= request.params.slice( INCOMING_VARS ).dup
end
+
+ def is_sms?
+ !sms_message_sid.blank?
+ end
+
+ protected
+ attr_reader :request
INCOMING_VARS = [
# Always available:
'CallGuid', # A unique identifier for this call, generated by Twilio. It's 34 characters long, and always starts with the letters CA.
'Caller', # The phone number of the party that initiated the call. If the call is inbound, then it is the caller's caller-id. If the call is outbound, i.e., initiated by making a request to the REST Call API, then this is the phone number you specify as the caller-id.