dect
/
asterisk
Archived
13
0
Fork 0

Rename sig_pri_pri to sig_pri_span. More descriptive of concept.

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278942 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
rmudgett 2010-07-23 15:41:44 +00:00
parent 048e444843
commit c74ff9f640
3 changed files with 78 additions and 78 deletions

View File

@ -568,7 +568,7 @@ struct dahdi_pri {
int dchannels[SIG_PRI_NUM_DCHANS]; /*!< What channel are the dchannels on */
int mastertrunkgroup; /*!< What trunk group is our master */
int prilogicalspan; /*!< Logical span number within trunk group */
struct sig_pri_pri pri;
struct sig_pri_span pri;
};
static struct dahdi_pri pris[NUM_SPANS];
@ -946,7 +946,7 @@ struct dahdi_pvt {
unsigned int manages_span_alarms:1;
#if defined(HAVE_PRI)
struct sig_pri_pri *pri;
struct sig_pri_span *pri;
int logicalspan;
#endif
/*!
@ -2910,7 +2910,7 @@ static int sig_pri_tone_to_dahditone(enum sig_pri_tone tone)
#endif /* defined(HAVE_PRI) */
#if defined(HAVE_PRI)
static void my_handle_dchan_exception(struct sig_pri_pri *pri, int index)
static void my_handle_dchan_exception(struct sig_pri_span *pri, int index)
{
int x, res;
@ -3087,7 +3087,7 @@ static void my_pri_make_cc_dialstring(void *priv, char *buf, size_t buf_size)
*
* \note Assumes the pri->lock is already obtained.
*/
static void dahdi_pri_update_span_devstate(struct sig_pri_pri *pri)
static void dahdi_pri_update_span_devstate(struct sig_pri_span *pri)
{
unsigned idx;
unsigned num_b_chans; /* Number of B channels provisioned on the span. */
@ -3178,9 +3178,9 @@ static void my_module_unref(void)
#if defined(HAVE_PRI)
#if defined(HAVE_PRI_CALL_WAITING)
static void my_pri_init_config(void *priv, struct sig_pri_pri *pri);
static void my_pri_init_config(void *priv, struct sig_pri_span *pri);
#endif /* defined(HAVE_PRI_CALL_WAITING) */
static int dahdi_new_pri_nobch_channel(struct sig_pri_pri *pri);
static int dahdi_new_pri_nobch_channel(struct sig_pri_span *pri);
static struct sig_pri_callback dahdi_pri_callbacks =
{
@ -5320,7 +5320,7 @@ static void dahdi_iflist_extract(struct dahdi_pvt *pvt)
*
* \return Nothing
*/
static void dahdi_nobch_insert(struct sig_pri_pri *pri, struct dahdi_pvt *pvt)
static void dahdi_nobch_insert(struct sig_pri_span *pri, struct dahdi_pvt *pvt)
{
struct dahdi_pvt *cur;
@ -5373,7 +5373,7 @@ static void dahdi_nobch_insert(struct sig_pri_pri *pri, struct dahdi_pvt *pvt)
*
* \return Nothing
*/
static void dahdi_nobch_extract(struct sig_pri_pri *pri, struct dahdi_pvt *pvt)
static void dahdi_nobch_extract(struct sig_pri_span *pri, struct dahdi_pvt *pvt)
{
/* Extract from the forward chain. */
if (pvt->prev) {
@ -5411,7 +5411,7 @@ static void dahdi_nobch_extract(struct sig_pri_pri *pri, struct dahdi_pvt *pvt)
static void dahdi_unlink_pri_pvt(struct dahdi_pvt *pvt)
{
unsigned idx;
struct sig_pri_pri *pri;
struct sig_pri_span *pri;
pri = pvt->pri;
if (!pri) {
@ -5568,7 +5568,7 @@ static void destroy_all_channels(void)
int chan;
#if defined(HAVE_PRI)
unsigned span;
struct sig_pri_pri *pri;
struct sig_pri_span *pri;
#endif /* defined(HAVE_PRI) */
struct dahdi_pvt *p;
@ -12677,7 +12677,7 @@ static int available(struct dahdi_pvt **pvt, int is_specific_channel)
*
* \return Nothing
*/
static void my_pri_init_config(void *priv, struct sig_pri_pri *pri)
static void my_pri_init_config(void *priv, struct sig_pri_span *pri)
{
struct dahdi_pvt *pvt = priv;
@ -12708,7 +12708,7 @@ static void my_pri_init_config(void *priv, struct sig_pri_pri *pri)
* \retval array-index into private pointer array on success.
* \retval -1 on error.
*/
static int dahdi_new_pri_nobch_channel(struct sig_pri_pri *pri)
static int dahdi_new_pri_nobch_channel(struct sig_pri_span *pri)
{
int pvt_idx;
int res;

View File

@ -59,7 +59,7 @@
#if defined(HAVE_PRI_CCSS)
struct sig_pri_cc_agent_prv {
/*! Asterisk span D channel control structure. */
struct sig_pri_pri *pri;
struct sig_pri_span *pri;
/*! CC id value to use with libpri. -1 if invalid. */
long cc_id;
/*! TRUE if CC has been requested and we are waiting for the response. */
@ -68,7 +68,7 @@ struct sig_pri_cc_agent_prv {
struct sig_pri_cc_monitor_instance {
/*! \brief Asterisk span D channel control structure. */
struct sig_pri_pri *pri;
struct sig_pri_span *pri;
/*! CC id value to use with libpri. (-1 if already canceled). */
long cc_id;
/*! CC core id value. */
@ -107,9 +107,9 @@ static int pri_gendigittimeout = 8000;
sig_pri_lock_private(p); \
} while (0)
static int pri_active_dchan_index(struct sig_pri_pri *pri);
static int pri_active_dchan_index(struct sig_pri_span *pri);
static inline void pri_rel(struct sig_pri_pri *pri)
static inline void pri_rel(struct sig_pri_span *pri)
{
ast_mutex_unlock(&pri->lock);
}
@ -123,7 +123,7 @@ static unsigned int PVT_TO_CHANNEL(struct sig_pri_chan *p)
return res;
}
static void sig_pri_handle_dchan_exception(struct sig_pri_pri *pri, int index)
static void sig_pri_handle_dchan_exception(struct sig_pri_span *pri, int index)
{
if (pri->calls->handle_dchan_exception)
pri->calls->handle_dchan_exception(pri, index);
@ -184,7 +184,7 @@ static void sig_pri_make_cc_dialstring(struct sig_pri_chan *p, char *buf, size_t
*
* \note Assumes the pri->lock is already obtained.
*/
static void sig_pri_span_devstate_changed(struct sig_pri_pri *pri)
static void sig_pri_span_devstate_changed(struct sig_pri_span *pri)
{
if (pri->calls->update_span_devstate) {
pri->calls->update_span_devstate(pri);
@ -280,7 +280,7 @@ static void sig_pri_lock_private(struct sig_pri_chan *p)
p->calls->lock_private(p->chan_pvt);
}
static inline int pri_grab(struct sig_pri_chan *p, struct sig_pri_pri *pri)
static inline int pri_grab(struct sig_pri_chan *p, struct sig_pri_span *pri)
{
int res;
/* Grab the lock first */
@ -924,7 +924,7 @@ struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law
return ast;
}
int pri_is_up(struct sig_pri_pri *pri)
int pri_is_up(struct sig_pri_span *pri)
{
int x;
for (x = 0; x < SIG_PRI_NUM_DCHANS; x++) {
@ -951,7 +951,7 @@ static char *pri_order(int level)
}
/* Returns index of the active dchan */
static int pri_active_dchan_index(struct sig_pri_pri *pri)
static int pri_active_dchan_index(struct sig_pri_span *pri)
{
int x;
@ -964,7 +964,7 @@ static int pri_active_dchan_index(struct sig_pri_pri *pri)
return -1;
}
static int pri_find_dchan(struct sig_pri_pri *pri)
static int pri_find_dchan(struct sig_pri_span *pri)
{
int oldslot = -1;
struct pri *old;
@ -1005,7 +1005,7 @@ static int pri_find_dchan(struct sig_pri_pri *pri)
*
* \return Nothing
*/
static void sig_pri_lock_owner(struct sig_pri_pri *pri, int chanpos)
static void sig_pri_lock_owner(struct sig_pri_span *pri, int chanpos)
{
for (;;) {
if (!pri->pvts[chanpos]->owner) {
@ -1037,7 +1037,7 @@ static void sig_pri_lock_owner(struct sig_pri_pri *pri, int chanpos)
*
* \return Nothing
*/
static void pri_queue_frame(struct sig_pri_pri *pri, int chanpos, struct ast_frame *frame)
static void pri_queue_frame(struct sig_pri_span *pri, int chanpos, struct ast_frame *frame)
{
sig_pri_lock_owner(pri, chanpos);
if (pri->pvts[chanpos]->owner) {
@ -1060,7 +1060,7 @@ static void pri_queue_frame(struct sig_pri_pri *pri, int chanpos, struct ast_fra
*
* \return Nothing
*/
static void pri_queue_control(struct sig_pri_pri *pri, int chanpos, int subclass)
static void pri_queue_control(struct sig_pri_span *pri, int chanpos, int subclass)
{
struct ast_frame f = {AST_FRAME_CONTROL, };
struct sig_pri_chan *p = pri->pvts[chanpos];
@ -1073,7 +1073,7 @@ static void pri_queue_control(struct sig_pri_pri *pri, int chanpos, int subclass
pri_queue_frame(pri, chanpos, &f);
}
static int pri_find_principle(struct sig_pri_pri *pri, int channel, q931_call *call)
static int pri_find_principle(struct sig_pri_span *pri, int channel, q931_call *call)
{
int x;
int span;
@ -1127,7 +1127,7 @@ static int pri_find_principle(struct sig_pri_pri *pri, int channel, q931_call *c
return principle;
}
static int pri_fixup_principle(struct sig_pri_pri *pri, int principle, q931_call *call)
static int pri_fixup_principle(struct sig_pri_span *pri, int principle, q931_call *call)
{
int x;
@ -1271,7 +1271,7 @@ static char *dialplan2str(int dialplan)
return (pri_plan2str(dialplan));
}
static void apply_plan_to_number(char *buf, size_t size, const struct sig_pri_pri *pri, const char *number, const int plan)
static void apply_plan_to_number(char *buf, size_t size, const struct sig_pri_span *pri, const char *number, const int plan)
{
switch (plan) {
case PRI_INTERNATIONAL_ISDN: /* Q.931 dialplan == 0x11 international dialplan => prepend international prefix digits */
@ -1296,7 +1296,7 @@ static void apply_plan_to_number(char *buf, size_t size, const struct sig_pri_pr
}
/*! \note Assumes the pri->lock is already obtained. */
static int pri_check_restart(struct sig_pri_pri *pri)
static int pri_check_restart(struct sig_pri_span *pri)
{
#if defined(HAVE_PRI_SERVICE_MESSAGES)
tryanotherpos:
@ -1343,7 +1343,7 @@ tryanotherpos:
*
* \return Nothing
*/
static void sig_pri_init_config(struct sig_pri_chan *pvt, struct sig_pri_pri *pri)
static void sig_pri_init_config(struct sig_pri_chan *pvt, struct sig_pri_span *pri)
{
pvt->stripmsd = pri->ch_cfg.stripmsd;
pvt->hidecallerid = pri->ch_cfg.hidecallerid;
@ -1362,7 +1362,7 @@ static void sig_pri_init_config(struct sig_pri_chan *pvt, struct sig_pri_pri *pr
}
#endif /* defined(HAVE_PRI_CALL_WAITING) */
static int pri_find_empty_chan(struct sig_pri_pri *pri, int backwards)
static int pri_find_empty_chan(struct sig_pri_span *pri, int backwards)
{
int x;
if (backwards)
@ -1403,7 +1403,7 @@ static int pri_find_empty_chan(struct sig_pri_pri *pri, int backwards)
* \retval array-index into private pointer array on success.
* \retval -1 on error.
*/
static int pri_find_empty_nobch(struct sig_pri_pri *pri)
static int pri_find_empty_nobch(struct sig_pri_span *pri)
{
int idx;
@ -1441,7 +1441,7 @@ static int pri_find_empty_nobch(struct sig_pri_pri *pri)
* \retval array-index into private pointer array on success.
* \retval -1 on error.
*/
static int pri_find_pri_call(struct sig_pri_pri *pri, q931_call *call)
static int pri_find_pri_call(struct sig_pri_span *pri, q931_call *call)
{
int idx;
@ -1612,14 +1612,14 @@ static void *pri_ss_thread(void *data)
return NULL;
}
void pri_event_alarm(struct sig_pri_pri *pri, int index, int before_start_pri)
void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri)
{
pri->dchanavail[index] &= ~(DCHAN_NOTINALARM | DCHAN_UP);
if (!before_start_pri)
pri_find_dchan(pri);
}
void pri_event_noalarm(struct sig_pri_pri *pri, int index, int before_start_pri)
void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri)
{
pri->dchanavail[index] |= DCHAN_NOTINALARM;
if (!before_start_pri)
@ -1661,7 +1661,7 @@ static void sig_pri_party_name_convert(struct ast_party_name *ast_name, const st
*
* \return Nothing
*/
static void sig_pri_party_number_convert(struct ast_party_number *ast_number, const struct pri_party_number *pri_number, struct sig_pri_pri *pri)
static void sig_pri_party_number_convert(struct ast_party_number *ast_number, const struct pri_party_number *pri_number, struct sig_pri_span *pri)
{
char number[AST_MAX_EXTENSION];
@ -1686,7 +1686,7 @@ static void sig_pri_party_number_convert(struct ast_party_number *ast_number, co
*
* \return Nothing
*/
static void sig_pri_party_id_convert(struct ast_party_id *ast_id, const struct pri_party_id *pri_id, struct sig_pri_pri *pri)
static void sig_pri_party_id_convert(struct ast_party_id *ast_id, const struct pri_party_id *pri_id, struct sig_pri_span *pri)
{
if (pri_id->name.valid) {
sig_pri_party_name_convert(&ast_id->name, &pri_id->name);
@ -1719,7 +1719,7 @@ static void sig_pri_party_id_convert(struct ast_party_id *ast_id, const struct p
static void sig_pri_redirecting_convert(struct ast_party_redirecting *ast_redirecting,
const struct pri_party_redirecting *pri_redirecting,
const struct ast_party_redirecting *ast_guide,
struct sig_pri_pri *pri)
struct sig_pri_span *pri)
{
ast_party_redirecting_set_init(ast_redirecting, ast_guide);
@ -1841,7 +1841,7 @@ static void sig_pri_event_party_id(struct ast_str **msg, const char *prefix, str
*
* \return Nothing
*/
static void sig_pri_mcid_event(struct sig_pri_pri *pri, const struct pri_subcmd_mcid_req *mcid, struct ast_channel *owner)
static void sig_pri_mcid_event(struct sig_pri_span *pri, const struct pri_subcmd_mcid_req *mcid, struct ast_channel *owner)
{
struct ast_channel *chans[1];
struct ast_str *msg;
@ -1899,7 +1899,7 @@ static void sig_pri_mcid_event(struct sig_pri_pri *pri, const struct pri_subcmd_
* \retval 0 on success.
* \retval -1 on error.
*/
static int sig_pri_attempt_transfer(struct sig_pri_pri *pri, q931_call *call_1, int call_1_held, q931_call *call_2, int call_2_held)
static int sig_pri_attempt_transfer(struct sig_pri_span *pri, q931_call *call_1, int call_1_held, q931_call *call_2, int call_2_held)
{
int retval;
int call_1_chanpos;
@ -2022,7 +2022,7 @@ static int sig_pri_cc_agent_cmp_cc_id(void *obj, void *arg, int flags)
* \retval agent on success.
* \retval NULL not found.
*/
static struct ast_cc_agent *sig_pri_find_cc_agent_by_cc_id(struct sig_pri_pri *pri, long cc_id)
static struct ast_cc_agent *sig_pri_find_cc_agent_by_cc_id(struct sig_pri_span *pri, long cc_id)
{
struct sig_pri_cc_agent_prv finder = {
.pri = pri,
@ -2073,7 +2073,7 @@ static int sig_pri_cc_monitor_cmp_cc_id(void *obj, void *arg, int flags)
* \retval monitor_instance on success.
* \retval NULL not found.
*/
static struct sig_pri_cc_monitor_instance *sig_pri_find_cc_monitor_by_cc_id(struct sig_pri_pri *pri, long cc_id)
static struct sig_pri_cc_monitor_instance *sig_pri_find_cc_monitor_by_cc_id(struct sig_pri_span *pri, long cc_id)
{
struct sig_pri_cc_monitor_instance finder = {
.pri = pri,
@ -2126,7 +2126,7 @@ static void sig_pri_cc_monitor_instance_destroy(void *data)
* \retval monitor_instance on success.
* \retval NULL on error.
*/
static struct sig_pri_cc_monitor_instance *sig_pri_cc_monitor_instance_init(int core_id, struct sig_pri_pri *pri, long cc_id, const char *device_name)
static struct sig_pri_cc_monitor_instance *sig_pri_cc_monitor_instance_init(int core_id, struct sig_pri_span *pri, long cc_id, const char *device_name)
{
struct sig_pri_cc_monitor_instance *monitor_instance;
@ -2170,7 +2170,7 @@ static struct sig_pri_cc_monitor_instance *sig_pri_cc_monitor_instance_init(int
* \retval 0 on success.
* \retval -1 on error.
*/
static int sig_pri_cc_available(struct sig_pri_pri *pri, int chanpos, long cc_id, enum ast_cc_service_type service)
static int sig_pri_cc_available(struct sig_pri_span *pri, int chanpos, long cc_id, enum ast_cc_service_type service)
{
struct sig_pri_chan *pvt;
struct ast_cc_config_params *cc_params;
@ -2243,7 +2243,7 @@ static int sig_pri_cc_available(struct sig_pri_pri *pri, int chanpos, long cc_id
*
* \return Nothing
*/
static void sig_pri_cc_generic_check(struct sig_pri_pri *pri, int chanpos, enum ast_cc_service_type service)
static void sig_pri_cc_generic_check(struct sig_pri_span *pri, int chanpos, enum ast_cc_service_type service)
{
struct ast_channel *owner;
struct ast_cc_config_params *cc_params;
@ -2340,7 +2340,7 @@ done:
*
* \return Nothing
*/
static void sig_pri_cc_link_canceled(struct sig_pri_pri *pri, long cc_id, int is_agent)
static void sig_pri_cc_link_canceled(struct sig_pri_span *pri, long cc_id, int is_agent)
{
if (is_agent) {
struct ast_cc_agent *agent;
@ -3332,7 +3332,7 @@ static int sig_pri_is_cis_call(int channel)
*
* \return Nothing
*/
static void sig_pri_handle_cis_subcmds(struct sig_pri_pri *pri, int event_id,
static void sig_pri_handle_cis_subcmds(struct sig_pri_span *pri, int event_id,
const struct pri_subcommands *subcmds, q931_call *call_rsp)
{
int index;
@ -3588,7 +3588,7 @@ static int detect_aoc_e_subcmd(const struct pri_subcommands *subcmds)
*
* \return Nothing
*/
static void sig_pri_handle_subcmds(struct sig_pri_pri *pri, int chanpos, int event_id,
static void sig_pri_handle_subcmds(struct sig_pri_span *pri, int chanpos, int event_id,
int channel, const struct pri_subcommands *subcmds, q931_call *call_rsp)
{
int index;
@ -3923,7 +3923,7 @@ static void sig_pri_handle_subcmds(struct sig_pri_pri *pri, int chanpos, int eve
* \retval 0 on success.
* \retval -1 on error.
*/
static int sig_pri_handle_hold(struct sig_pri_pri *pri, pri_event *ev)
static int sig_pri_handle_hold(struct sig_pri_span *pri, pri_event *ev)
{
int retval;
int chanpos_old;
@ -4004,7 +4004,7 @@ done_with_private:;
*
* \return Nothing
*/
static void sig_pri_handle_retrieve(struct sig_pri_pri *pri, pri_event *ev)
static void sig_pri_handle_retrieve(struct sig_pri_span *pri, pri_event *ev)
{
int chanpos;
@ -4055,7 +4055,7 @@ static void sig_pri_handle_retrieve(struct sig_pri_pri *pri, pri_event *ev)
static void *pri_dchannel(void *vpri)
{
struct sig_pri_pri *pri = vpri;
struct sig_pri_span *pri = vpri;
pri_event *e;
struct pollfd fds[SIG_PRI_NUM_DCHANS];
int res;
@ -5622,7 +5622,7 @@ static void *pri_dchannel(void *vpri)
return NULL;
}
void sig_pri_init_pri(struct sig_pri_pri *pri)
void sig_pri_init_pri(struct sig_pri_span *pri)
{
int i;
@ -6510,7 +6510,7 @@ static int sig_pri_available_check(struct sig_pri_chan *pvt)
* \retval cw Call waiting interface to use.
* \retval NULL if no call waiting interface available.
*/
static struct sig_pri_chan *sig_pri_cw_available(struct sig_pri_pri *pri)
static struct sig_pri_chan *sig_pri_cw_available(struct sig_pri_span *pri)
{
struct sig_pri_chan *cw;
int idx;
@ -6621,7 +6621,7 @@ int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char
*
* \return Nothing
*/
static void sig_pri_send_mwi_indication(struct sig_pri_pri *pri, const char *mbox_number, const char *mbox_context, int num_messages)
static void sig_pri_send_mwi_indication(struct sig_pri_span *pri, const char *mbox_number, const char *mbox_context, int num_messages)
{
struct pri_party_id mailbox;
@ -6653,7 +6653,7 @@ static void sig_pri_send_mwi_indication(struct sig_pri_pri *pri, const char *mbo
*/
static void sig_pri_mwi_event_cb(const struct ast_event *event, void *userdata)
{
struct sig_pri_pri *pri = userdata;
struct sig_pri_span *pri = userdata;
const char *mbox_context;
const char *mbox_number;
int num_messages;
@ -6681,7 +6681,7 @@ static void sig_pri_mwi_event_cb(const struct ast_event *event, void *userdata)
*
* \return Nothing
*/
static void sig_pri_mwi_cache_update(struct sig_pri_pri *pri)
static void sig_pri_mwi_cache_update(struct sig_pri_span *pri)
{
int idx;
int num_messages;
@ -6717,7 +6717,7 @@ static void sig_pri_mwi_cache_update(struct sig_pri_pri *pri)
*
* \return Nothing
*/
void sig_pri_stop_pri(struct sig_pri_pri *pri)
void sig_pri_stop_pri(struct sig_pri_span *pri)
{
#if defined(HAVE_PRI_MWI)
int idx;
@ -6777,12 +6777,12 @@ static int sig_pri_cmp_pri_chans(const void *left, const void *right)
*
* \return Nothing
*/
static void sig_pri_sort_pri_chans(struct sig_pri_pri *pri)
static void sig_pri_sort_pri_chans(struct sig_pri_span *pri)
{
qsort(&pri->pvts, pri->numchans, sizeof(pri->pvts[0]), sig_pri_cmp_pri_chans);
}
int sig_pri_start_pri(struct sig_pri_pri *pri)
int sig_pri_start_pri(struct sig_pri_span *pri)
{
int x;
int i;
@ -6984,7 +6984,7 @@ void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm)
}
}
struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo, int trunkgroup)
struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup)
{
struct sig_pri_chan *p;
@ -7036,7 +7036,7 @@ static void build_status(char *s, size_t len, int status, int active)
s[len - 1] = '\0';
}
void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_pri *pri)
void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_span *pri)
{
char status[256];
int x;
@ -7048,7 +7048,7 @@ void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_pri *pri)
}
}
void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_pri *pri)
void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_span *pri)
{
int x;
char status[256];

View File

@ -83,7 +83,7 @@ enum sig_pri_law {
SIG_PRI_ALAW
};
struct sig_pri_pri;
struct sig_pri_span;
struct sig_pri_callback {
/* Unlock the private in the signalling private structure. This is used for three way calling madness. */
@ -107,7 +107,7 @@ struct sig_pri_callback {
void (* const fixup_chans)(void *old_chan, void *new_chan);
/* Note: Called with PRI lock held */
void (* const handle_dchan_exception)(struct sig_pri_pri *pri, int index);
void (* const handle_dchan_exception)(struct sig_pri_span *pri, int index);
void (* const set_alarm)(void *pvt, int in_alarm);
void (* const set_dialing)(void *pvt, int is_dialing);
void (* const set_digital)(void *pvt, int is_digital);
@ -115,11 +115,11 @@ struct sig_pri_callback {
void (* const set_dnid)(void *pvt, const char *dnid);
void (* const set_rdnis)(void *pvt, const char *rdnis);
void (* const queue_control)(void *pvt, int subclass);
int (* const new_nobch_intf)(struct sig_pri_pri *pri);
void (* const init_config)(void *pvt, struct sig_pri_pri *pri);
int (* const new_nobch_intf)(struct sig_pri_span *pri);
void (* const init_config)(void *pvt, struct sig_pri_span *pri);
const char *(* const get_orig_dialstring)(void *pvt);
void (* const make_cc_dialstring)(void *pvt, char *buf, size_t buf_size);
void (* const update_span_devstate)(struct sig_pri_pri *pri);
void (* const update_span_devstate)(struct sig_pri_span *pri);
void (* const open_media)(void *pvt);
@ -229,7 +229,7 @@ struct sig_pri_chan {
struct ast_channel *owner;
struct sig_pri_pri *pri;
struct sig_pri_span *pri;
q931_call *call; /*!< opaque libpri call control structure */
int prioffset; /*!< channel number in span */
@ -283,7 +283,7 @@ struct sig_pri_mbox {
};
#endif /* defined(HAVE_PRI_MWI) */
struct sig_pri_pri {
struct sig_pri_span {
/* Should be set by user */
struct ast_cc_config_params *cc_params; /*!< CC config parameters for each new call. */
int pritimers[PRI_MAX_TIMERS];
@ -459,31 +459,31 @@ int sig_pri_answer(struct sig_pri_chan *p, struct ast_channel *ast);
int sig_pri_available(struct sig_pri_chan **pvt, int is_specific_channel);
void sig_pri_init_pri(struct sig_pri_pri *pri);
void sig_pri_init_pri(struct sig_pri_span *pri);
/* If return 0, it means this function was able to handle it (pre setup digits). If non zero, the user of this
* functions should handle it normally (generate inband DTMF) */
int sig_pri_digit_begin(struct sig_pri_chan *pvt, struct ast_channel *ast, char digit);
void sig_pri_stop_pri(struct sig_pri_pri *pri);
int sig_pri_start_pri(struct sig_pri_pri *pri);
void sig_pri_stop_pri(struct sig_pri_span *pri);
int sig_pri_start_pri(struct sig_pri_span *pri);
void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm);
void pri_event_alarm(struct sig_pri_pri *pri, int index, int before_start_pri);
void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri);
void pri_event_noalarm(struct sig_pri_pri *pri, int index, int before_start_pri);
void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri);
struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability);
struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_pri *pri, int logicalspan, int channo, int trunkgroup);
struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup);
void sig_pri_chan_delete(struct sig_pri_chan *doomed);
int pri_is_up(struct sig_pri_pri *pri);
int pri_is_up(struct sig_pri_span *pri);
void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_pri *pri);
void sig_pri_cli_show_spans(int fd, int span, struct sig_pri_span *pri);
void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_pri *pri);
void sig_pri_cli_show_span(int fd, int *dchannels, struct sig_pri_span *pri);
int pri_send_keypad_facility_exec(struct sig_pri_chan *p, const char *digits);
int pri_send_callrerouting_facility_exec(struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason);