ast[erisk] i[ntegration]
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
example
lib
spec/support
.gitignore
LICENSE
README.md
app.js
index.js
originate.js
package.json

README.md

asti

proxy between asterisk and web-client for integration

Install

npm install asti --save

Usage

Use client lib - asti.js [https://github.com/antirek/asti.js]

Config

{
  asterisk: {       //asterisk manager connection
    port: 5038,
    host: 'localhost',
    username: 'amiadmin',
    password: 'amipassword',
    version: '11'   // also ['1.8', '11', '13']
  },
  web: {
    port: 10000,        //port of web-interface
    host: '127.0.0.1'   //not required, for any 0.0.0.0
  }
}

Originate

Work asterisk dialplan:

[outbound]
exten=_XXX,1,Dial(SIP/{EXTEN},,Ttr)
exten=_8XXXXXXXXXX,1,Dial(SIP/{EXTEN}@gate,,Ttr)

[outbound1]
exten=>_X.,1,Dial(Local/${EXTEN}@outbound,,U(pretech,answer1,${ORIGINATE_ACTIONID}))

[outbound2]
exten=>_X.,1,Dial(Local/${EXTEN}@outbound,,U(pretech,answer2,${ORIGINATE_ACTIONID}))

[pretech]
exten=s,1,NoOp(pretech)
exten=s,n,UserEvent(${ARG1},actionid:${ARG2}).
exten=s,n,Return()