Action Url API
General Help
choose one of the following actions: help, resume, log, terminate, accept, update, removeMonitor, call, show, hold, transfer, join, conference, addMonitor, dtmf
You can get detailed help for an action by adding 'help' as parameter, e.g.: ..?action=call&help
log
level, text, fireandforget
Mapping of query-parameters to function-parameters:
text -> message
level -> debug_level
fireandforget -> !returnHttpResult
nil debug.log( message:string [, debug_level:string/default=i] )
? debug.log{ message:string [debug_level:string/default=i] [returnHttpResult:boolean/default=false] }
Log the provided message into androids LogCat-system.
debug_level = e/w/i/d/v -> i.e. a one-char String (only first char is looked at) that marks the severity of the log: error, warning, info, debug or verbose.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
WARNING: on D100/200 there is a setting that limits logs to only show errors and warnings by default. To enable logs up to debug, you need to set Access → Extended Logging.
NOTE: verbose logs usually do not show up, unless you use androids adb-tool to connect to your phone and increase the log sensitivity with `adb shell setprop log.tag.LuaScript VERBOSE`.
resume
callid2, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid2 -> call2
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.resume( [call:call-object/callId-string], [call2:call-object/callId-string] )
? sip.calls.resume{ [call:call-object/callId-string] [call2:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Resumes a call or a conference.
If you omit the callId's, the first found held call or conference will be resumed.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
terminate
callid2, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid2 -> call2
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.terminate( [call:call-object/callId-string], [call2:call-object/callId-string]])
? sip.calls.terminate{ [call:call-object/callId-string] [call2:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Terminates (hangup) a call or conference.
If you omit the callId's, the active call or conference will be terminated. If none is active, phone searches first for outgoing
ringing calls, next for incoming ringing calls and last for any calls. Only if it finds one single call or conference in any of theses
states, will it actually terminate without having a specific ID
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
update
url, fireandforget
Mapping of query-parameters to function-parameters:
url -> data
fireandforget -> !returnHttpResult
nil system.intent( action:string )
? system.intent{ action:string [component:string] [data:string(uri-format)] [extras:table] [asBroadcast:boolean/default=false] [returnHttpResult:boolean/default=false]}
send an intent to the android system.
set asBroadcast to send it as a broadcast, else code calls startActivity(intent)
for an complete decription of the parameters see: https://developer.android.com/guide/components/intents-filtersIf you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
call
number, accountid, fireandforget
Mapping of query-parameters to function-parameters:
number -> uri
accountid -> line
fireandforget -> !returnHttpResult
nil sip.calls.make( uri:string [, pickup:boolean/default=false] [, line:int] [, hidden:boolean/default=false] )
? sip.calls.make{ uri:string [pickup:boolean/default=false] [line:int] [hidden:boolean/default=false] [returnHttpResult:boolean/default=false] }
Makes a call to the specified uri. Uri can be just a telephone-number or a complete sip-uri.
Attemps a pickup if pickup-parameter is true.
Line is the number of the identity to use. When not set the default identity (see idle-screen) is used.
With hidden=true -> call will not be shown on the phones display. It won't have audio either.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
hold
callid2, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid2 -> call2
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.hold( [call:call-object/callId-string], [call2:call-object/callId-string] )
? sip.calls.hold{ [call:call-object/callId-string] [call2:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Holds a call or a conference.
If you omit the callId's, the active call or conference will be held.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
addMonitor
server
nil addMonitor(server)
Add a server for receiving action-url events. This server will be informed of new call events until it is either removed via action=removeServer or when it doesn't answer to a GET (event) request with 200 OK or when the phone reboots.
conference
callid2, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid2 -> call2
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.conference( [call:call-object/callId-string], [call2:call-object/callId-string] )
? sip.calls.conference{ [call:call-object/callId-string] [call2:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Joins two calls into a lokal conference, aka where audio is mixed on this phone.
Conferences may be dissolved by only holding or terminating one of the conference members
If you omit one or both callId's, the phone will make a guess which calls are ment.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
removemonitor
server
nil removeMonitor(server)
Remove a previously installed dynamic action-url server.
accept
callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid -> call
callid1 -> call
fireandforget -> !returnHttpResult
nil sip.calls.accept( [call:call-object/callId-string] )
? sip.calls.accept{ [call:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Accepts an incoming call.
If you omit the callId, the first ringing call found will be accepted.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
removeMonitor
server
nil removeMonitor(server)
Remove a previously installed dynamic action-url server.
show
text, fireandforget
Mapping of query-parameters to function-parameters:
fireandforget -> !returnHttpResult
nil system.toast( text:string )
? system.toast{ text:string [returnHttpResult:boolean/default=false] }
Shows the provided text as a toast.
On colored devices you may alternatively provide a '@drawable/..' (See debug.getDrawables).
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
addmonitor
server
nil addMonitor(server)
Add a server for receiving action-url events. This server will be informed of new call events until it is either removed via action=removeServer or when it doesn't answer to a GET (event) request with 200 OK or when the phone reboots.
transfer
number, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.transfer( [call:call-object/callId-string], number:string )
? sip.calls.transfer{ number:string [call:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Transfers a call to a specified number.
You may set the callId to nil in which case the the phone will make a guess which call is ment.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
join
callid2, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid2 -> call2
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.join( [call:call-object/callId-string], [call2:call-object/callId-string] )
? sip.calls.join{ [call:call-object/callId-string] [call2:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Joins two calls, aka a transfer. This phone will no longer be involved in the calls.
If you omit one or both call's, the phone will make a guess which calls are ment.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
hangup
callid2, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid2 -> call2
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.terminate( [call:call-object/callId-string], [call2:call-object/callId-string]])
? sip.calls.terminate{ [call:call-object/callId-string] [call2:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Terminates (hangup) a call or conference.
If you omit the callId's, the active call or conference will be terminated. If none is active, phone searches first for outgoing
ringing calls, next for incoming ringing calls and last for any calls. Only if it finds one single call or conference in any of theses
states, will it actually terminate without having a specific ID
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
dtmf
number, callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
number -> dtmf
callid1 -> call
callid -> call
fireandforget -> !returnHttpResult
nil sip.calls.dtmf( [call:call-object/callId-string], dtmf:string )
? sip.calls.dtmf{ dtmf:string [call:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Sends a dtmf-sequence on an active call.
You may set the callId to nil in which case the active call is used, if there is one.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true
offhook
callid1, callid, fireandforget
Mapping of query-parameters to function-parameters:
callid -> call
callid1 -> call
fireandforget -> !returnHttpResult
nil sip.calls.accept( [call:call-object/callId-string] )
? sip.calls.accept{ [call:call-object/callId-string] [returnHttpResult:boolean/default=false] }
Accepts an incoming call.
If you omit the callId, the first ringing call found will be accepted.
If you set returnHttpResult to true, the function will return the result of the operation.
Result consists of error code, body and additional headers, taylor made to return within an http.listen()-callback. See http.listen()-callback with exclusive=true for more details.
returns nil unless returnHttpResult==true