Giter Site home page Giter Site logo

titwiliobasicphone's Introduction

TitaniumでTwilio 体験キット

TitaniumでTwilioを使うデモアプリです。Twilioからのリクエストを受け付けることができるサーバの用意が必要です。 サーバは付属のserver.rbを利用してください。

##準備

Twilioのアカウントを作成してください。 http://twilio.kddi-web.com/

TwiMLアプリを作成します。 https://jp.twilio.com/user/account/apps/add

Request URLをhttp://設定したサーバのホスト/authに設定します。

次にアプリをダウンロードしてimportします。

$ git clone [email protected]:yagitoshiro/TiTwilioBasicPhone.git
$ cd TiTwilioBasicPhone
$ appc new --import

server.rbの以下をご利用の環境に合わせて設定してください。

account_sid = '<ACOUNT SID>'
auth_token = '<AUTH TOKEN>'
demo_app_sid = '<APP SID>'

app/alloy.jsを編集します。

//ここを設置したサーバの情報に合わせます
Alloy.Globals.authUrl = "<http://YOUR_AUTH_SERVER>";

これで準備完了です。

##初めてのTwilio

$ git checkout hello_twilio
$ appc ti build -p ios

server.rbの以下を有効に

  # ---(1) hello_twilio---
  #Twilio::TwiML::Response.new do |r|
  # r.Say "Hello Twilio"
  #end.text

##簡単な電話

$ git checkout basic_phone
$ appc ti build -p ios

server.rbの以下を有効に

# ---(2) basic_phone---
#Twilio::TwiML::Response.new do |r|
#  r.Dial callerId: "+815031597074" do |d|
#    d.Number params[:callTo].gsub(/^0/, '+81')
#  end
#end.text

##IP通話

$ git checkout ip_phone
$ appc ti build -p ios

server.rbの以下を有効に

# ---(3) ip_phone---
#Twilio::TwiML::Response.new do |r|
#  r.Dial callerId: "+815031597074" do |d|
#    d.Client params[:callTo]
#  end
#end.text

titwiliobasicphone's People

Contributors

yagitoshiro avatar

Watchers

Mostafizur Rahman avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.