Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alvagi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
alvagi
Commits
8eacaa0b
Commit
8eacaa0b
authored
Jun 23, 2015
by
antirek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add control streamFile
parent
17689d49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
52 deletions
+107
-52
API.md
API.md
+94
-52
context.js
lib/context.js
+13
-0
No files found.
API.md
View file @
8eacaa0b
...
@@ -11,62 +11,104 @@ events
...
@@ -11,62 +11,104 @@ events
'hangup' - on hangup channel
'hangup' - on hangup channel
### context.[command]
### context.answer()
command like:
answer
asyncagiBreak
channelStatus
controlStreamFile
databaseDel
databaseDeltree
databaseGet
databasePut
exec
getData
getFullVariable
getOption
getVariable
gosub
hangup
noop
receiveChar
receiveText
recordFile
sayAlpha
sayDate
sayDatetime
sayDigits
sayNumber
sayPhonetic
sayTime
sendImage
sendText
setAutohangup
setCallerid
setContext
setExtension
setMusic
setPriority
setVariable
speechActivateGrammar
speechCreate
speechDeactivateGrammar
speechDestroy
speechLoadGrammar
speechRecognize
speechSet
speechUnloadGrammar
streamFile
tddMode
verbose
waitForDigit
### context.asyncagiBreak()
### context.channelStatus(channel)
### context.controlStreamFile(filename, escape_digits, skipms, ffchar, rewchr, pausechr, offsetms)
details https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AGICommand_control+stream+file
### context.databaseDel(variable, value)
### context.databaseDeltree(key)
### context.databaseGet
### context.databasePut
### context.exec
### context.getData
### context.getFullVariable
### context.getOption
### context.getVariable
### context.gosub
### context.hangup
### context.noop
### context.receiveChar
### context.receiveText
### context.recordFile
### context.sayAlpha
### context.sayDate
### context.sayDatetime
### context.sayDigits
### context.sayNumber
### context.sayPhonetic
### context.sayTime
### context.sendImage
### context.sendText
### context.setAutohangup
### context.setCallerid
### context.setContext
### context.setExtension
### context.setMusic
### context.setPriority
### context.setVariable
### context.speechActivateGrammar
### context.speechCreate
### context.speechDeactivateGrammar
### context.speechDestroy
### context.speechLoadGrammar
### context.speechRecognize
### context.speechSet
### context.speechUnloadGrammar
### context.streamFile
### context.tddMode
### context.verbose
### context.waitForDigit
### context.exec(command, [args])
### context.exec(command, [args])
Dispatches the
`EXEC`
AGI command to asterisk with supplied command name and arguments.
_callback_ is called with the result of the dispatch.
Dispatches the
`EXEC`
AGI command to asterisk with supplied command name and arguments.
```
js
```
js
context
.
exec
(
'
Dial
'
,
opt1
,
opt2
,
..,
optN
)
context
.
exec
(
'
Dial
'
,
opt1
,
opt2
,
..,
optN
)
...
...
lib/context.js
View file @
8eacaa0b
...
@@ -302,6 +302,19 @@ Context.prototype.sayPhonetic = function (string, escape_digits) {
...
@@ -302,6 +302,19 @@ Context.prototype.sayPhonetic = function (string, escape_digits) {
return
this
.
sendCommand
(
'
SAY PHONETIC
'
+
string
+
'
"
'
+
escape_digits
+
'
"
'
);
return
this
.
sendCommand
(
'
SAY PHONETIC
'
+
string
+
'
"
'
+
escape_digits
+
'
"
'
);
};
};
Context
.
prototype
.
controlStreamFile
=
function
(
filename
,
escape_digits
,
skipms
,
ffchar
,
rewchr
,
pausechr
,
offsetms
)
{
var
str
=
[
filename
,
escape_digits
,
skipms
,
ffchar
,
rewchr
,
pausechr
,
offsetms
].
join
(
"
"
);
return
this
.
sendCommand
(
'
CONTROL STREAM FILE
'
+
str
);
};
Context
.
prototype
.
streamFile
=
function
(
filename
,
digits
)
{
Context
.
prototype
.
streamFile
=
function
(
filename
,
digits
)
{
var
acceptDigits
=
digits
?
digits
:
"
1234567890#*
"
;
var
acceptDigits
=
digits
?
digits
:
"
1234567890#*
"
;
return
this
.
sendCommand
(
'
STREAM FILE "
'
+
filename
+
'
" "
'
+
acceptDigits
+
'
"
'
);
return
this
.
sendCommand
(
'
STREAM FILE "
'
+
filename
+
'
" "
'
+
acceptDigits
+
'
"
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment