Copyright © 2005-2006 Ericsson
Version: 1.0
Behaviour: gen_server.
Authors: Freek Sanders (freekisanders@gmail.com) [web site: http://www.freeksanders.tk].
idefisk_supervisor) and communicates with a given Ext-Ast-Interface instance through its process id.
Use-Case-Stub uses Use-Case-Call (see use_case_call) to keep an intern record of created calls, legs and resources, as well as to receive messages.
DESCRIPTION OF THE FLOW OF EVENTS
Set asterisk_ext_module to 'use_case_stub' : {asterisk_ext_module, use_case_stub}
Set asterisk_ext_module_start to 'true' : {asterisk_ext_module_start, true}
Set asterisk_ext_module_args to the Stub : {asterisk_ext_module_args, [StubArgs::Stub_args()]}
StartId is where the id of the place where the Stub begins.
This can be a integer, atom or string.
Use-Case-Stub has been implemented using the gen-server behaviour. This means that all function calls returning 'ok' (see below) are gen_server casts, which carry out their function asynchronously. An 'ok' does not mean success. If a function has success or not can only be derived from side-effects and messages printed to the command line.
For more information about the flow of events and an explanation of terms see ext_ast_interface.
id() = integer() | atom() | string()
| call_msg/3 | A incoming call message. |
| die/0 | Destroys the use case. |
| incoming_call/3 | A new caller has been detected by Asterisk. |
| leg_msg/5 | A incoming leg message. |
| resource_msg/5 | A incoming resource message. |
call_msg(CallId::integer(), CallPid::pid(), Msg::string()) -> ok
A incoming call message.
Introduced in: 1.0
die() -> ok
Destroys the use case.
Introduced in: 1.0
incoming_call(CallId::integer(), OrigAddr::string(), DestAddr::string()) -> F::function()
A new caller has been detected by Asterisk. Ext-Ast-Interface alerts the use case to a incoming call. A incoming call means that both a call with id CallId and a leg with id 1 have been created.
Introduced in: 1.0
leg_msg(CallId::integer(), CallPid::pid(), LegId::integer(), LegPid::pid(), Msg::string()) -> ok
A incoming leg message.
Introduced in: 1.0
resource_msg(CallId::integer(), CallPid::pid(), RsrcId::integer(), RsrcPid::pid(), Msg::string()) -> ok
A incoming resource message.
Introduced in: 1.0