diff options
author | Matthew Jordan <mjordan@digium.com> | 2012-06-25 17:59:34 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2012-06-25 17:59:34 +0000 |
commit | 82a7409c15cf943ebc12cc8453424350628732bf (patch) | |
tree | fd06e7c2248dae47e019c76bef0b4865c284e00d /apps/app_dial.c | |
parent | d0fda07d74b0e73ea563e3b90361faf5f20965e3 (diff) |
Add AMI event documentation
This patch adds the core changes necessary to support AMI event documentation
in the source files of Asterisk, and adds documentation to those AMI events
defined in the core application modules. Event documentation is built from
the source by two new python scripts, located in build_tools:
get_documentation.py and post_process_documentation.py.
The get_documentation.py script mirrors the actions of the existing AWK
get_documentation scripts, except that it will scan the entirety of a source
file for Asterisk documentation. Upon encountering it, if the documentation
happens to be an AMI event, it will attempt to extract information about the
event directly from the manager event macro calls that raise the event. The
post_process_documentation.py script combines manager event instances that
are the same event but documented in multiple source files. It generates
the final core-[lang].xml file.
As this process can take longer to complete than a typical 'make all', it
is only performed if a new make target, 'full', is chosen.
Review: https://reviewboard.asterisk.org/r/1967/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 886f63c36..281204847 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -820,6 +820,20 @@ static const char *get_cid_name(char *name, int namelen, struct ast_channel *cha static void senddialevent(struct ast_channel *src, struct ast_channel *dst, const char *dialstring) { struct ast_channel *chans[] = { src, dst }; + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a dial action has started.</synopsis> + <syntax> + <parameter name="SubEvent"> + <enumlist> + <enum name="Begin"/> + <enum name="End"/> + </enumlist> + <para>A sub event type, specifying whether the dial action has begun or ended.</para> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event_multichan(EVENT_FLAG_CALL, "Dial", 2, chans, "SubEvent: Begin\r\n" "Channel: %s\r\n" @@ -842,6 +856,16 @@ static void senddialevent(struct ast_channel *src, struct ast_channel *dst, cons static void senddialendevent(struct ast_channel *src, const char *dialstatus) { + /*** DOCUMENTATION + <managerEventInstance> + <synopsis>Raised when a dial action has ended.</synopsis> + <syntax> + <parameter name="DialStatus"> + <para>The value of the <variable>DIALSTATUS</variable> channel variable.</para> + </parameter> + </syntax> + </managerEventInstance> + ***/ ast_manager_event(src, EVENT_FLAG_CALL, "Dial", "SubEvent: End\r\n" "Channel: %s\r\n" |