Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8651871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:10:27+00:00 2026-06-12T14:10:27+00:00

After Michael Hartl’s tutorial on rails, I’m trying to build a call tracking app,

  • 0

After Michael Hartl’s tutorial on rails, I’m trying to build a call tracking app, to learn more rails and Twilio.

So far I’ve managed to create —

  • Authentication
  • Integration With Stripe
  • Every User who registers automatically gets a Twilio Subaccount
  • Users Can Search for Phone Numbers, And Buy them

(This has been done with 20 Stackoverflow questions in the last 5 days!)

Now, What I would like to do is to actually create the functionality for recording call data via Twilio.

They have a php tutorial here :
http://www.twilio.com/docs/howto/call-tracking

I’m having trouble conceptualizing how I’m going to make this work. I.e What Combination of Controllers/Actions will I need to route calls through a twilio number, and receive the information?

So far, I have 3 models

Plan Model

#  name              :string(255)
#  max_phone_numbers :integer
#  max_minutes       :integer
#  price             :integer
has_many :users

User Model

#  name                  :string(255)
#  email                 :string(255)
#  twilio_account_sid    :string(255)
#  twilio_auth_token     :string(255)
#  plan_id               :integer
#  stripe_customer_token :string(255)
belongs_to :plan
has_many :phones

Phone Model

#  campaign_       :string(255)
#  twilio_number   :integer
#  original_number :integer
#  user_id
belongs_to :user

Now, I’m thinking of having a new model, called Phone_data. The Phone Model than has_many Phone_datas. I could than use the association to show data on a particular phone.

Possible New Model: phone_data

#Data that twilio can save to each phone(duration of call, etc )
#phone_id
#belongs_to phones 

My question is, does the phone_data model make sense, and more importantly, how do you think the Controllers are going to look like, to achieve the functionality to

  1. Lead dials a Twilio number and Twilio POSTs information to your application

  2. Application saves Twilio call information to the proper phone_data association

  3. The application sends TwiML instructions to Dial the original_number

  4. Lead and agent have a conversation until one of them disconnects

  5. Twilio requests the Dial action URL and sends information about the second call leg

Here’s the code that they use for PHP

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:10:28+00:00Added an answer on June 12, 2026 at 2:10 pm

    The guys at Twilio, especially Brian Levine, are amazing. Brian went ahead and explained this to me…by building a sample application! found here :

    https://github.com/Beans0063/Twilio-Call-Tracking-Ruby

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to test a Rails app using Michael Hartl's tutorial, but I
After finishing Michael Hartl's tutorial on Rails, my first pet project is building a
enter code hereI'm trying to finish up Michael Hartl's Ruby on Rails v3.2 Tutorial
after finishing Michael Hart's tutorial on rails, I'm giving making a simple app of
I'm new to rails, and after completing Michael Hartl's Ruby on Rails Tutorial, I
I've encountered an unexpected error while following Michael Hartl's Rails Tutorial . It had
I am doing Michael Hartl's Ruby and Rails Tutorial and am just getting started
I am working on Michael Hartl Rails tutorial (currently chapter 7). When I try
I'm adapting the authentication system from Rails 3 Tutorial by Michael Hartl to better
Doing Michael Hartl's Rails Tutorial, on chapter 10, section 5, exercise 2 . I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.