mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be introduced in a later commit. chan_skinny has code added to it here, but according to user pj, the support on chan_skinny is not working as of now. This will be fixed in a later commit. A special thanks goes out to bugtracker user gareth for getting the ball rolling and providing the initial support for this work. Without his initial work on this, this would not have been nearly as painless as it was. This functionality has been tested by Digium's product quality department, as well as a customer site running thousands of calls every day. In addition, many many many many bugtracker users have tested this, too. (closes issue #8824) Reported by: gareth Review: http://reviewboard.digium.com/r/201 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -86,21 +86,24 @@ typedef struct callerid_state CIDSTATE;
|
||||
void callerid_init(void);
|
||||
|
||||
/*! \brief Generates a CallerID FSK stream in ulaw format suitable for transmission.
|
||||
* \param buf Buffer to use. If "buf" is supplied, it will use that buffer instead of allocating its own. "buf" must be at least 32000 bytes in size of you want to be sure you don't have an overrun.
|
||||
* \param buf Buffer to use. If "buf" is supplied, it will use that buffer instead of allocating its own.
|
||||
* "buf" must be at least 32000 bytes in size of you want to be sure you don't have an overrun.
|
||||
* \param number Use NULL for no number or "P" for "private"
|
||||
* \param name name to be used
|
||||
* \param flags passed flags
|
||||
* \param callwaiting callwaiting flag
|
||||
* \param codec -- either AST_FORMAT_ULAW or AST_FORMAT_ALAW
|
||||
* \details
|
||||
* This function creates a stream of callerid (a callerid spill) data in ulaw format.
|
||||
* \return It returns the size
|
||||
* (in bytes) of the data (if it returns a size of 0, there is probably an error)
|
||||
*/
|
||||
*/
|
||||
int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, int codec);
|
||||
|
||||
/*! \brief Create a callerID state machine
|
||||
* \param cid_signalling Type of signalling in use
|
||||
*
|
||||
* \details
|
||||
* This function returns a malloc'd instance of the callerid_state data structure.
|
||||
* \return Returns a pointer to a malloc'd callerid_state structure, or NULL on error.
|
||||
*/
|
||||
@@ -112,9 +115,11 @@ struct callerid_state *callerid_new(int cid_signalling);
|
||||
* \param samples number of samples contained within the buffer.
|
||||
* \param codec which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
|
||||
*
|
||||
* \details
|
||||
* Send received audio to the Caller*ID demodulator.
|
||||
* \return Returns -1 on error, 0 for "needs more samples",
|
||||
* and 1 if the CallerID spill reception is complete.
|
||||
* \retval -1 on error
|
||||
* \retval 0 for "needs more samples"
|
||||
* \retval 1 if the CallerID spill reception is complete.
|
||||
*/
|
||||
int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
|
||||
|
||||
@@ -124,9 +129,11 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples,
|
||||
* \param samples number of samples contained within the buffer.
|
||||
* \param codec which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
|
||||
*
|
||||
* \details
|
||||
* Send received audio to the Caller*ID demodulator (for japanese style lines).
|
||||
* \return Returns -1 on error, 0 for "needs more samples",
|
||||
* and 1 if the CallerID spill reception is complete.
|
||||
* \retval -1 on error
|
||||
* \retval 0 for "needs more samples"
|
||||
* \retval 1 if the CallerID spill reception is complete.
|
||||
*/
|
||||
int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
|
||||
|
||||
@@ -136,6 +143,7 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int sample
|
||||
* \param name Pass the address of a pointer-to-char (will contain the name)
|
||||
* \param flags Pass the address of an int variable(will contain the various callerid flags)
|
||||
*
|
||||
* \details
|
||||
* This function extracts a callerid string out of a callerid_state state machine.
|
||||
* If no number is found, *number will be set to NULL. Likewise for the name.
|
||||
* Flags can contain any of the following:
|
||||
@@ -144,18 +152,16 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int sample
|
||||
*/
|
||||
void callerid_get(struct callerid_state *cid, char **number, char **name, int *flags);
|
||||
|
||||
/*! Get and parse DTMF-based callerid */
|
||||
/*!
|
||||
* \brief Get and parse DTMF-based callerid
|
||||
* \param cidstring The actual transmitted string.
|
||||
* \param number The cid number is returned here.
|
||||
* \param flags The cid flags are returned here.
|
||||
* This function parses DTMF callerid.
|
||||
*/
|
||||
void callerid_get_dtmf(char *cidstring, char *number, int *flags);
|
||||
|
||||
/*! \brief Free a callerID state
|
||||
/*! \brief This function frees callerid_state cid.
|
||||
* \param cid This is the callerid_state state machine to free
|
||||
* This function frees callerid_state cid.
|
||||
*/
|
||||
void callerid_free(struct callerid_state *cid);
|
||||
|
||||
@@ -165,36 +171,44 @@ void callerid_free(struct callerid_state *cid);
|
||||
* \param number Caller-ID Number
|
||||
* \param codec Asterisk codec (either AST_FORMAT_ALAW or AST_FORMAT_ULAW)
|
||||
*
|
||||
* \details
|
||||
* Acts like callerid_generate except uses an asterisk format callerid string.
|
||||
*/
|
||||
int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int codec);
|
||||
|
||||
/*! \brief Generate message waiting indicator
|
||||
* \param active The message indicator state
|
||||
/*!
|
||||
* \brief Generate message waiting indicator
|
||||
* \param active The message indicator state
|
||||
* -- either 0 no messages in mailbox or 1 messages in mailbox
|
||||
* \param type Format of message (any of CID_MWI_TYPE_*)
|
||||
* \see callerid_generate() for more info as it use the same encoding
|
||||
* \version 1.6.1 changed mdmf parameter to type, added name, number and flags for caller id message generation
|
||||
*/
|
||||
* \param type Format of message (any of CID_MWI_TYPE_*)
|
||||
* \see callerid_generate() for more info as it uses the same encoding
|
||||
* \version 1.6.1 changed mdmf parameter to type, added name, number and flags for caller id message generation
|
||||
*/
|
||||
int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, int codec, const char *name,
|
||||
const char *number, int flags);
|
||||
|
||||
/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm)
|
||||
* See ast_callerid_generate() for other details
|
||||
* \see ast_callerid_generate() for other details
|
||||
*/
|
||||
int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, int codec);
|
||||
|
||||
/*! \brief Destructively parse inbuf into name and location (or number)
|
||||
* \details
|
||||
* Parses callerid stream from inbuf and changes into useable form, outputed in name and location.
|
||||
* \param instr buffer of callerid stream (in audio form) to be parsed. Warning, data in buffer is changed.
|
||||
* \param name address of a pointer-to-char for the name value of the stream.
|
||||
* \param location address of a pointer-to-char for the phone number value of the stream.
|
||||
* \note XXX 'name' is not parsed consistently e.g. we have
|
||||
* input location name
|
||||
* " foo bar " <123> 123 ' foo bar ' (with spaces around)
|
||||
* " foo bar " NULL 'foo bar' (without spaces around)
|
||||
* The parsing of leading and trailing space/quotes should be more consistent.
|
||||
* \return Returns 0 on success, -1 on failure.
|
||||
*/
|
||||
int ast_callerid_parse(char *instr, char **name, char **location);
|
||||
|
||||
/*! Generate a CAS (CPE Alert Signal) tone for 'n' samples */
|
||||
/*!
|
||||
* \brief Generate a CAS (CPE Alert Signal) tone for 'n' samples
|
||||
* \param outbuf Allocated buffer for data. Must be at least 2400 bytes unless no SAS is desired
|
||||
* \param sas Non-zero if CAS should be preceeded by SAS
|
||||
* \param len How many samples to generate.
|
||||
@@ -203,23 +217,26 @@ int ast_callerid_parse(char *instr, char **name, char **location);
|
||||
*/
|
||||
int ast_gen_cas(unsigned char *outbuf, int sas, int len, int codec);
|
||||
|
||||
/*! \brief Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s... */
|
||||
/*!
|
||||
* \brief Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s...
|
||||
* \param n The number to be stripped/shrunk
|
||||
* \return Returns nothing important
|
||||
*/
|
||||
void ast_shrink_phone_number(char *n);
|
||||
|
||||
/*! \brief Check if a string consists only of digits and + \#
|
||||
\param n number to be checked.
|
||||
\return Returns 0 if n is a number, 1 if it's not.
|
||||
/*!
|
||||
* \brief Check if a string consists only of digits and + \#
|
||||
* \param n number to be checked.
|
||||
* \return Returns 0 if n is a number, 1 if it's not.
|
||||
*/
|
||||
int ast_isphonenumber(const char *n);
|
||||
|
||||
/*! \brief Check if a string consists only of digits and and + \# ( ) - .
|
||||
(meaning it can be cleaned with ast_shrink_phone_number)
|
||||
\param exten The extension (or URI) to be checked.
|
||||
\return Returns 0 if n is a number, 1 if it's not.
|
||||
/*!
|
||||
* \brief Check if a string consists only of digits and and + \# ( ) - .
|
||||
* (meaning it can be cleaned with ast_shrink_phone_number)
|
||||
* \param exten The extension (or URI) to be checked.
|
||||
* \retval 1 if string is valid AST shrinkable phone number
|
||||
* \retval 0 if not
|
||||
*/
|
||||
int ast_is_shrinkable_phonenumber(const char *exten);
|
||||
|
||||
@@ -289,71 +306,171 @@ static inline float callerid_getcarrier(float *cr, float *ci, int bit)
|
||||
|
||||
/* Various defines and bits for handling PRI- and SS7-type restriction */
|
||||
|
||||
#define AST_PRES_NUMBER_TYPE 0x03
|
||||
#define AST_PRES_NUMBER_TYPE 0x03
|
||||
#define AST_PRES_USER_NUMBER_UNSCREENED 0x00
|
||||
#define AST_PRES_USER_NUMBER_PASSED_SCREEN 0x01
|
||||
#define AST_PRES_USER_NUMBER_FAILED_SCREEN 0x02
|
||||
#define AST_PRES_NETWORK_NUMBER 0x03
|
||||
#define AST_PRES_NETWORK_NUMBER 0x03
|
||||
|
||||
#define AST_PRES_RESTRICTION 0x60
|
||||
#define AST_PRES_ALLOWED 0x00
|
||||
#define AST_PRES_RESTRICTED 0x20
|
||||
#define AST_PRES_UNAVAILABLE 0x40
|
||||
#define AST_PRES_RESERVED 0x60
|
||||
#define AST_PRES_RESTRICTION 0x60
|
||||
#define AST_PRES_ALLOWED 0x00
|
||||
#define AST_PRES_RESTRICTED 0x20
|
||||
#define AST_PRES_UNAVAILABLE 0x40
|
||||
#define AST_PRES_RESERVED 0x60
|
||||
|
||||
#define AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED \
|
||||
AST_PRES_USER_NUMBER_UNSCREENED + AST_PRES_ALLOWED
|
||||
(AST_PRES_ALLOWED | AST_PRES_USER_NUMBER_UNSCREENED)
|
||||
|
||||
#define AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN \
|
||||
AST_PRES_USER_NUMBER_PASSED_SCREEN + AST_PRES_ALLOWED
|
||||
(AST_PRES_ALLOWED | AST_PRES_USER_NUMBER_PASSED_SCREEN)
|
||||
|
||||
#define AST_PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN \
|
||||
AST_PRES_USER_NUMBER_FAILED_SCREEN + AST_PRES_ALLOWED
|
||||
(AST_PRES_ALLOWED | AST_PRES_USER_NUMBER_FAILED_SCREEN)
|
||||
|
||||
#define AST_PRES_ALLOWED_NETWORK_NUMBER \
|
||||
AST_PRES_NETWORK_NUMBER + AST_PRES_ALLOWED
|
||||
(AST_PRES_ALLOWED | AST_PRES_NETWORK_NUMBER)
|
||||
|
||||
#define AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED \
|
||||
AST_PRES_USER_NUMBER_UNSCREENED + AST_PRES_RESTRICTED
|
||||
(AST_PRES_RESTRICTED | AST_PRES_USER_NUMBER_UNSCREENED)
|
||||
|
||||
#define AST_PRES_PROHIB_USER_NUMBER_PASSED_SCREEN \
|
||||
AST_PRES_USER_NUMBER_PASSED_SCREEN + AST_PRES_RESTRICTED
|
||||
(AST_PRES_RESTRICTED | AST_PRES_USER_NUMBER_PASSED_SCREEN)
|
||||
|
||||
#define AST_PRES_PROHIB_USER_NUMBER_FAILED_SCREEN \
|
||||
AST_PRES_USER_NUMBER_FAILED_SCREEN + AST_PRES_RESTRICTED
|
||||
(AST_PRES_RESTRICTED | AST_PRES_USER_NUMBER_FAILED_SCREEN)
|
||||
|
||||
#define AST_PRES_PROHIB_NETWORK_NUMBER \
|
||||
AST_PRES_NETWORK_NUMBER + AST_PRES_RESTRICTED
|
||||
(AST_PRES_RESTRICTED | AST_PRES_NETWORK_NUMBER)
|
||||
|
||||
#define AST_PRES_NUMBER_NOT_AVAILABLE \
|
||||
AST_PRES_NETWORK_NUMBER + AST_PRES_UNAVAILABLE
|
||||
(AST_PRES_UNAVAILABLE | AST_PRES_NETWORK_NUMBER)
|
||||
|
||||
int ast_parse_caller_presentation(const char *data);
|
||||
const char *ast_describe_caller_presentation(int data);
|
||||
const char *ast_named_caller_presentation(int data);
|
||||
|
||||
/*! \page Def_CallerPres Caller ID Presentation
|
||||
/*!
|
||||
* \page Def_CallerPres Caller ID Presentation
|
||||
*
|
||||
* Caller ID presentation values are used to set properties to a
|
||||
* caller ID in PSTN networks, and as RPID value in SIP transactions.
|
||||
*
|
||||
* The following values are available to use:
|
||||
* \arg \b Defined value, text string in config file, explanation
|
||||
*
|
||||
* \arg \b AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, "allowed_not_screened", Presentation Allowed, Not Screened,
|
||||
* \arg \b AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, "allowed_passed_screen", Presentation Allowed, Passed Screen,
|
||||
* \arg \b AST_PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN, "allowed_failed_screen", Presentation Allowed, Failed Screen,
|
||||
* \arg \b AST_PRES_ALLOWED_NETWORK_NUMBER, "allowed", Presentation Allowed, Network Number,
|
||||
* \arg \b AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED, "prohib_not_screened", Presentation Prohibited, Not Screened,
|
||||
* \arg \b AST_PRES_PROHIB_USER_NUMBER_PASSED_SCREEN, "prohib_passed_screen", Presentation Prohibited, Passed Screen,
|
||||
* \arg \b AST_PRES_PROHIB_USER_NUMBER_FAILED_SCREEN, "prohib_failed_screen", Presentation Prohibited, Failed Screen,
|
||||
* \arg \b AST_PRES_PROHIB_NETWORK_NUMBER, "prohib", Presentation Prohibited, Network Number,
|
||||
*
|
||||
* \par References
|
||||
* \arg \ref callerid.h Definitions
|
||||
* \arg \ref callerid.c Functions
|
||||
* \arg \ref CID Caller ID names and numbers
|
||||
*/
|
||||
|
||||
Caller ID presentation values are used to set properties to a
|
||||
caller ID in PSTN networks, and as RPID value in SIP transactions.
|
||||
/*!
|
||||
* \brief redirecting reason codes.
|
||||
*
|
||||
* This list attempts to encompass redirecting reasons
|
||||
* as defined by several channel technologies.
|
||||
*/
|
||||
enum AST_REDIRECTING_REASON {
|
||||
AST_REDIRECTING_REASON_UNKNOWN,
|
||||
AST_REDIRECTING_REASON_USER_BUSY,
|
||||
AST_REDIRECTING_REASON_NO_ANSWER,
|
||||
AST_REDIRECTING_REASON_UNAVAILABLE,
|
||||
AST_REDIRECTING_REASON_UNCONDITIONAL,
|
||||
AST_REDIRECTING_REASON_TIME_OF_DAY,
|
||||
AST_REDIRECTING_REASON_DO_NOT_DISTURB,
|
||||
AST_REDIRECTING_REASON_DEFLECTION,
|
||||
AST_REDIRECTING_REASON_FOLLOW_ME,
|
||||
AST_REDIRECTING_REASON_OUT_OF_ORDER,
|
||||
AST_REDIRECTING_REASON_AWAY,
|
||||
AST_REDIRECTING_REASON_CALL_FWD_DTE, /* This is something defined in Q.931, and no I don't know what it means */
|
||||
};
|
||||
|
||||
The following values are available to use:
|
||||
\arg \b Defined value, text string in config file, explanation
|
||||
/*!
|
||||
* \since 1.6.3
|
||||
* \brief Convert redirecting reason text code to value (used in config file parsing)
|
||||
*
|
||||
* \param data text string from config file
|
||||
*
|
||||
* \retval Q931_REDIRECTING_REASON from callerid.h
|
||||
* \retval -1 if not in table
|
||||
*/
|
||||
int ast_redirecting_reason_parse(const char *data);
|
||||
|
||||
\arg \b AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, "allowed_not_screened", Presentation Allowed, Not Screened,
|
||||
\arg \b AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, "allowed_passed_screen", Presentation Allowed, Passed Screen,
|
||||
\arg \b AST_PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN, "allowed_failed_screen", Presentation Allowed, Failed Screen,
|
||||
\arg \b AST_PRES_ALLOWED_NETWORK_NUMBER, "allowed", Presentation Allowed, Network Number,
|
||||
\arg \b AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED, "prohib_not_screened", Presentation Prohibited, Not Screened,
|
||||
\arg \b AST_PRES_PROHIB_USER_NUMBER_PASSED_SCREEN, "prohib_passed_screen", Presentation Prohibited, Passed Screen,
|
||||
\arg \b AST_PRES_PROHIB_USER_NUMBER_FAILED_SCREEN, "prohib_failed_screen", Presentation Prohibited, Failed Screen,
|
||||
\arg \b AST_PRES_PROHIB_NETWORK_NUMBER, "prohib", Presentation Prohibited, Network Number,
|
||||
/*!
|
||||
* \since 1.6.3
|
||||
* \brief Convert redirecting reason value to explanatory string
|
||||
*
|
||||
* \param data Q931_REDIRECTING_REASON from callerid.h
|
||||
*
|
||||
* \return string for human presentation
|
||||
*/
|
||||
const char *ast_redirecting_reason_describe(int data);
|
||||
|
||||
\par References
|
||||
\arg \ref callerid.h Definitions
|
||||
\arg \ref callerid.c Functions
|
||||
\arg \ref CID Caller ID names and numbers
|
||||
*/
|
||||
/*!
|
||||
* \since 1.6.3
|
||||
* \brief Convert redirecting reason value to text code
|
||||
*
|
||||
* \param data Q931_REDIRECTING_REASON from callerid.h
|
||||
*
|
||||
* \return string for config file
|
||||
*/
|
||||
const char *ast_redirecting_reason_name(int data);
|
||||
|
||||
/*!
|
||||
* \brief Connected line update source code
|
||||
*/
|
||||
enum AST_CONNECTED_LINE_UPDATE_SOURCE {
|
||||
/*! Update for unknown reason (May be interpreted to mean from answer) */
|
||||
AST_CONNECTED_LINE_UPDATE_SOURCE_UNKNOWN,
|
||||
/*! Update from normal call answering */
|
||||
AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER,
|
||||
/*! Update from call diversion (Deprecated, use REDIRECTING updates instead.) */
|
||||
AST_CONNECTED_LINE_UPDATE_SOURCE_DIVERSION,
|
||||
/*! Update from call transfer(active) (Party has already answered) */
|
||||
AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER,
|
||||
/*! Update from call transfer(alerting) (Party has not answered yet) */
|
||||
AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING
|
||||
};
|
||||
|
||||
/*!
|
||||
* \since 1.6.3
|
||||
* \brief Convert connected line update source text code to value (used in config file parsing)
|
||||
*
|
||||
* \param data text string from config file
|
||||
*
|
||||
* \retval AST_CONNECTED_LINE_UPDATE_SOURCE from callerid.h
|
||||
* \retval -1 if not in table
|
||||
*/
|
||||
int ast_connected_line_source_parse(const char *data);
|
||||
|
||||
/*!
|
||||
* \since 1.6.3
|
||||
* \brief Convert connected line update source value to explanatory string
|
||||
*
|
||||
* \param data AST_CONNECTED_LINE_UPDATE_SOURCE from callerid.h
|
||||
*
|
||||
* \return string for human presentation
|
||||
*/
|
||||
const char *ast_connected_line_source_describe(int data);
|
||||
|
||||
/*!
|
||||
* \since 1.6.3
|
||||
* \brief Convert connected line update source value to text code
|
||||
*
|
||||
* \param data AST_CONNECTED_LINE_UPDATE_SOURCE from callerid.h
|
||||
*
|
||||
* \return string for config file
|
||||
*/
|
||||
const char *ast_connected_line_source_name(int data);
|
||||
|
||||
|
||||
#endif /* _ASTERISK_CALLERID_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -39,53 +39,55 @@ struct ast_codec_pref {
|
||||
char framing[32];
|
||||
};
|
||||
|
||||
/*! \page Def_Frame AST Multimedia and signalling frames
|
||||
\section Def_AstFrame What is an ast_frame ?
|
||||
A frame of data read used to communicate between
|
||||
between channels and applications.
|
||||
Frames are divided into frame types and subclasses.
|
||||
|
||||
\par Frame types
|
||||
\arg \b VOICE: Voice data, subclass is codec (AST_FORMAT_*)
|
||||
\arg \b VIDEO: Video data, subclass is codec (AST_FORMAT_*)
|
||||
\arg \b DTMF: A DTMF digit, subclass is the digit
|
||||
\arg \b IMAGE: Image transport, mostly used in IAX
|
||||
\arg \b TEXT: Text messages and character by character (real time text)
|
||||
\arg \b HTML: URL's and web pages
|
||||
\arg \b MODEM: Modulated data encodings, such as T.38 and V.150
|
||||
\arg \b IAX: Private frame type for the IAX protocol
|
||||
\arg \b CNG: Comfort noice frames
|
||||
\arg \b CONTROL: A control frame, subclass defined as AST_CONTROL_
|
||||
\arg \b NULL: Empty, useless frame
|
||||
|
||||
\par Files
|
||||
\arg frame.h Definitions
|
||||
\arg frame.c Function library
|
||||
\arg \ref Def_Channel Asterisk channels
|
||||
\section Def_ControlFrame Control Frames
|
||||
Control frames send signalling information between channels
|
||||
and devices. They are prefixed with AST_CONTROL_, like AST_CONTROL_FRAME_HANGUP
|
||||
\arg \b HANGUP The other end has hungup
|
||||
\arg \b RING Local ring
|
||||
\arg \b RINGING The other end is ringing
|
||||
\arg \b ANSWER The other end has answered
|
||||
\arg \b BUSY Remote end is busy
|
||||
\arg \b TAKEOFFHOOK Make it go off hook (what's "it" ? )
|
||||
\arg \b OFFHOOK Line is off hook
|
||||
\arg \b CONGESTION Congestion (circuit is busy, not available)
|
||||
\arg \b FLASH Other end sends flash hook
|
||||
\arg \b WINK Other end sends wink
|
||||
\arg \b OPTION Send low-level option
|
||||
\arg \b RADIO_KEY Key radio (see app_rpt.c)
|
||||
\arg \b RADIO_UNKEY Un-key radio (see app_rpt.c)
|
||||
\arg \b PROGRESS Other end indicates call progress
|
||||
\arg \b PROCEEDING Indicates proceeding
|
||||
\arg \b HOLD Call is placed on hold
|
||||
\arg \b UNHOLD Call is back from hold
|
||||
\arg \b VIDUPDATE Video update requested
|
||||
\arg \b SRCUPDATE The source of media has changed
|
||||
|
||||
*/
|
||||
/*!
|
||||
* \page Def_Frame AST Multimedia and signalling frames
|
||||
* \section Def_AstFrame What is an ast_frame ?
|
||||
* A frame of data read used to communicate between
|
||||
* between channels and applications.
|
||||
* Frames are divided into frame types and subclasses.
|
||||
*
|
||||
* \par Frame types
|
||||
* \arg \b VOICE: Voice data, subclass is codec (AST_FORMAT_*)
|
||||
* \arg \b VIDEO: Video data, subclass is codec (AST_FORMAT_*)
|
||||
* \arg \b DTMF: A DTMF digit, subclass is the digit
|
||||
* \arg \b IMAGE: Image transport, mostly used in IAX
|
||||
* \arg \b TEXT: Text messages and character by character (real time text)
|
||||
* \arg \b HTML: URL's and web pages
|
||||
* \arg \b MODEM: Modulated data encodings, such as T.38 and V.150
|
||||
* \arg \b IAX: Private frame type for the IAX protocol
|
||||
* \arg \b CNG: Comfort noice frames
|
||||
* \arg \b CONTROL:A control frame, subclass defined as AST_CONTROL_
|
||||
* \arg \b NULL: Empty, useless frame
|
||||
*
|
||||
* \par Files
|
||||
* \arg frame.h Definitions
|
||||
* \arg frame.c Function library
|
||||
* \arg \ref Def_Channel Asterisk channels
|
||||
* \section Def_ControlFrame Control Frames
|
||||
* Control frames send signalling information between channels
|
||||
* and devices. They are prefixed with AST_CONTROL_, like AST_CONTROL_FRAME_HANGUP
|
||||
* \arg \b HANGUP The other end has hungup
|
||||
* \arg \b RING Local ring
|
||||
* \arg \b RINGING The other end is ringing
|
||||
* \arg \b ANSWER The other end has answered
|
||||
* \arg \b BUSY Remote end is busy
|
||||
* \arg \b TAKEOFFHOOK Make it go off hook (what's "it" ? )
|
||||
* \arg \b OFFHOOK Line is off hook
|
||||
* \arg \b CONGESTION Congestion (circuit is busy, not available)
|
||||
* \arg \b FLASH Other end sends flash hook
|
||||
* \arg \b WINK Other end sends wink
|
||||
* \arg \b OPTION Send low-level option
|
||||
* \arg \b RADIO_KEY Key radio (see app_rpt.c)
|
||||
* \arg \b RADIO_UNKEY Un-key radio (see app_rpt.c)
|
||||
* \arg \b PROGRESS Other end indicates call progress
|
||||
* \arg \b PROCEEDING Indicates proceeding
|
||||
* \arg \b HOLD Call is placed on hold
|
||||
* \arg \b UNHOLD Call is back from hold
|
||||
* \arg \b VIDUPDATE Video update requested
|
||||
* \arg \b SRCUPDATE The source of media has changed
|
||||
* \arg \b CONNECTED_LINE Connected line has changed
|
||||
* \arg \b REDIRECTING Call redirecting information has changed.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Frame types
|
||||
@@ -320,6 +322,8 @@ enum ast_control_frame_type {
|
||||
AST_CONTROL_T38 = 19, /*!< T38 state change request/notification */
|
||||
AST_CONTROL_SRCUPDATE = 20, /*!< Indicate source of media has changed */
|
||||
AST_CONTROL_TRANSFER = 21, /*!< Indicate status of a transfer request */
|
||||
AST_CONTROL_CONNECTED_LINE = 22, /*!< Indicate connected line has changed */
|
||||
AST_CONTROL_REDIRECTING = 23 /*!< Indicate redirecting id has changed */
|
||||
};
|
||||
|
||||
enum ast_control_t38 {
|
||||
|
Reference in New Issue
Block a user