Asterisk - The Open Source Telephony Project GIT-master-27fb039
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
sig_ss7.h File Reference

Interface header for SS7 signaling module. More...

#include "asterisk/channel.h"
#include <libss7.h>
Include dependency graph for sig_ss7.h:

Go to the source code of this file.

Data Structures

struct  sig_ss7_callback
 
struct  sig_ss7_chan
 
struct  sig_ss7_linkset
 

Macros

#define LINKSET_FLAG_AUTOACM   (1 << 4)
 
#define LINKSET_FLAG_DEFAULTECHOCONTROL   (1 << 3)
 
#define LINKSET_FLAG_EXPLICITACM   (1 << 0)
 
#define LINKSET_FLAG_INITIALHWBLO   (1 << 1)
 
#define LINKSET_FLAG_USEECHOCONTROL   (1 << 2)
 
#define LINKSTATE_DOWN   (1 << 3)
 
#define LINKSTATE_INALARM   (1 << 0)
 
#define LINKSTATE_STARTING   (1 << 1)
 
#define LINKSTATE_UP   (1 << 2)
 
#define SIG_SS7   (0x1000000 | DAHDI_SIG_CLEAR)
 
#define SIG_SS7_DEBUG    (SS7_DEBUG_MTP2 | SS7_DEBUG_MTP3 | SS7_DEBUG_ISUP)
 
#define SIG_SS7_DEBUG_DEFAULT   0
 
#define SIG_SS7_MAX_CHANNELS   672
 
#define SIG_SS7_NUM_DCHANS   4
 
#define SS7_BLOCKED_HARDWARE   (1 << 1)
 
#define SS7_BLOCKED_MAINTENANCE   (1 << 0)
 
#define SS7_NAI_DYNAMIC   -1
 

Enumerations

enum  sig_ss7_call_level {
  SIG_SS7_CALL_LEVEL_IDLE , SIG_SS7_CALL_LEVEL_ALLOCATED , SIG_SS7_CALL_LEVEL_CONTINUITY , SIG_SS7_CALL_LEVEL_SETUP ,
  SIG_SS7_CALL_LEVEL_PROCEEDING , SIG_SS7_CALL_LEVEL_ALERTING , SIG_SS7_CALL_LEVEL_CONNECT
}
 
enum  sig_ss7_law { SIG_SS7_DEFLAW = 0 , SIG_SS7_ULAW , SIG_SS7_ALAW }
 
enum  sig_ss7_redirect_indication {
  SS7_INDICATION_NO_REDIRECTION = 0 , SS7_INDICATION_REROUTED_PRES_ALLOWED , SS7_INDICATION_REROUTED_INFO_RESTRICTED , SS7_INDICATION_DIVERTED_PRES_ALLOWED ,
  SS7_INDICATION_DIVERTED_INFO_RESTRICTED , SS7_INDICATION_REROUTED_PRES_RESTRICTED , SS7_INDICATION_DIVERTED_PRES_RESTRICTED , SS7_INDICATION_SPARE
}
 
enum  sig_ss7_redirect_reason {
  SS7_REDIRECTING_REASON_UNKNOWN = 0 , SS7_REDIRECTING_REASON_USER_BUSY , SS7_REDIRECTING_REASON_NO_ANSWER , SS7_REDIRECTING_REASON_UNCONDITIONAL ,
  SS7_REDIRECTING_REASON_DEFLECTION_DURING_ALERTING , SS7_REDIRECTING_REASON_DEFLECTION_IMMEDIATE_RESPONSE , SS7_REDIRECTING_REASON_UNAVAILABLE
}
 
enum  sig_ss7_tone {
  SIG_SS7_TONE_RINGTONE = 0 , SIG_SS7_TONE_STUTTER , SIG_SS7_TONE_CONGESTION , SIG_SS7_TONE_DIALTONE ,
  SIG_SS7_TONE_DIALRECALL , SIG_SS7_TONE_INFO , SIG_SS7_TONE_BUSY
}
 

Functions

int sig_ss7_add_sigchan (struct sig_ss7_linkset *linkset, int which, int ss7type, int transport, int inalarm, int networkindicator, int pointcode, int adjpointcode, int cur_slc)
 
int sig_ss7_answer (struct sig_ss7_chan *p, struct ast_channel *ast)
 
int sig_ss7_available (struct sig_ss7_chan *p)
 
int sig_ss7_call (struct sig_ss7_chan *p, struct ast_channel *ast, const char *rdest)
 
void sig_ss7_cb_call_null (struct ss7 *ss7, struct isup_call *c, int lock)
 
int sig_ss7_cb_hangup (struct ss7 *ss7, int cic, unsigned int dpc, int cause, int do_hangup)
 
void sig_ss7_cb_notinservice (struct ss7 *ss7, int cic, unsigned int dpc)
 
void sig_ss7_chan_delete (struct sig_ss7_chan *doomed)
 
struct sig_ss7_chansig_ss7_chan_new (void *pvt_data, struct sig_ss7_linkset *ss7)
 
int sig_ss7_cic_blocking (struct sig_ss7_linkset *linkset, int do_block, int cic)
 
void sig_ss7_cli_show_channels (int fd, struct sig_ss7_linkset *linkset)
 
void sig_ss7_cli_show_channels_header (int fd)
 
int sig_ss7_find_cic (struct sig_ss7_linkset *linkset, int cic, unsigned int dpc)
 
int sig_ss7_find_cic_range (struct sig_ss7_linkset *linkset, int startcic, int endcic, unsigned int dpc)
 
void sig_ss7_fixup (struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_ss7_chan *pchan)
 
void sig_ss7_free_isup_call (struct sig_ss7_linkset *linkset, int channel)
 
int sig_ss7_group_blocking (struct sig_ss7_linkset *linkset, int do_block, int startcic, int endcic, unsigned char state[], int type)
 
int sig_ss7_hangup (struct sig_ss7_chan *p, struct ast_channel *ast)
 
int sig_ss7_indicate (struct sig_ss7_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen)
 
void sig_ss7_init_linkset (struct sig_ss7_linkset *ss7)
 
void sig_ss7_link_alarm (struct sig_ss7_linkset *linkset, int which)
 
void sig_ss7_link_noalarm (struct sig_ss7_linkset *linkset, int which)
 
struct ast_channelsig_ss7_request (struct sig_ss7_chan *p, enum sig_ss7_law law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, int transfercapability)
 
int sig_ss7_reset_cic (struct sig_ss7_linkset *linkset, int cic, unsigned int dpc)
 
int sig_ss7_reset_group (struct sig_ss7_linkset *linkset, int cic, unsigned int dpc, int range)
 
void sig_ss7_set_alarm (struct sig_ss7_chan *p, int in_alarm)
 
void * ss7_linkset (void *data)
 

Variables

struct sig_ss7_callback sig_ss7_callbacks
 

Detailed Description

Interface header for SS7 signaling module.

Author
Matthew Fredrickson cresl.nosp@m.in@d.nosp@m.igium.nosp@m..com
Richard Mudgett rmudg.nosp@m.ett@.nosp@m.digiu.nosp@m.m.co.nosp@m.m

See Also:

Definition in file sig_ss7.h.

Macro Definition Documentation

◆ LINKSET_FLAG_AUTOACM

#define LINKSET_FLAG_AUTOACM   (1 << 4)

Definition at line 72 of file sig_ss7.h.

◆ LINKSET_FLAG_DEFAULTECHOCONTROL

#define LINKSET_FLAG_DEFAULTECHOCONTROL   (1 << 3)

Definition at line 71 of file sig_ss7.h.

◆ LINKSET_FLAG_EXPLICITACM

#define LINKSET_FLAG_EXPLICITACM   (1 << 0)

Definition at line 68 of file sig_ss7.h.

◆ LINKSET_FLAG_INITIALHWBLO

#define LINKSET_FLAG_INITIALHWBLO   (1 << 1)

Definition at line 69 of file sig_ss7.h.

◆ LINKSET_FLAG_USEECHOCONTROL

#define LINKSET_FLAG_USEECHOCONTROL   (1 << 2)

Definition at line 70 of file sig_ss7.h.

◆ LINKSTATE_DOWN

#define LINKSTATE_DOWN   (1 << 3)

Definition at line 64 of file sig_ss7.h.

◆ LINKSTATE_INALARM

#define LINKSTATE_INALARM   (1 << 0)

Definition at line 61 of file sig_ss7.h.

◆ LINKSTATE_STARTING

#define LINKSTATE_STARTING   (1 << 1)

Definition at line 62 of file sig_ss7.h.

◆ LINKSTATE_UP

#define LINKSTATE_UP   (1 << 2)

Definition at line 63 of file sig_ss7.h.

◆ SIG_SS7

#define SIG_SS7   (0x1000000 | DAHDI_SIG_CLEAR)

Definition at line 59 of file sig_ss7.h.

◆ SIG_SS7_DEBUG

#define SIG_SS7_DEBUG    (SS7_DEBUG_MTP2 | SS7_DEBUG_MTP3 | SS7_DEBUG_ISUP)

SS7 debug message flags when SS7 debugging is turned on at the command line.

Definition at line 43 of file sig_ss7.h.

77 {
85};
86
87enum sig_ss7_law {
91};
92
102};
103
112};
113
114/*! Call establishment life cycle level for simple comparisons. */
116 /*! Call does not exist. */
118 /*!
119 * Call is allocated to the channel.
120 * We have not sent or responded to IAM yet.
121 */
123 /*!
124 * Call is performing continuity check after receiving IAM.
125 * We are waiting for COT to proceed further.
126 */
128 /*!
129 * Call is present.
130 * We have not seen a response or sent further call progress to an IAM yet.
131 */
133 /*!
134 * Call routing is happening.
135 * We have sent or received ACM.
136 */
138 /*!
139 * Called party is being alerted of the call.
140 * We have sent or received CPG(ALERTING)/ACM(ALERTING).
141 */
143 /*!
144 * Call is connected/answered.
145 * We have sent or received CON/ANM.
146 */
148};
149
150struct sig_ss7_linkset;
151
152struct sig_ss7_callback {
153 /* Unlock the private in the signaling private structure. */
154 void (* const unlock_private)(void *pvt);
155 /* Lock the private in the signaling private structure. */
156 void (* const lock_private)(void *pvt);
157 /* Do deadlock avoidance for the private signaling structure lock. */
158 void (* const deadlock_avoidance_private)(void *pvt);
159
160 int (* const set_echocanceller)(void *pvt, int enable);
161 void (* const set_loopback)(void *pvt, int enable);
162
163 struct ast_channel * (* const new_ast_channel)(void *pvt, int state,
164 enum sig_ss7_law law, char *exten, const struct ast_assigned_ids *assignedids,
165 const struct ast_channel *requestor);
166 int (* const play_tone)(void *pvt, enum sig_ss7_tone tone);
167
168 void (* const handle_link_exception)(struct sig_ss7_linkset *linkset, int which);
169 void (* const set_alarm)(void *pvt, int in_alarm);
170 void (* const set_dialing)(void *pvt, int is_dialing);
171 void (* const set_digital)(void *pvt, int is_digital);
172 void (* const set_outgoing)(void *pvt, int is_outgoing);
173 void (* const set_inservice)(void *pvt, int is_inservice);
174 void (* const set_locallyblocked)(void *pvt, int is_blocked);
175 void (* const set_remotelyblocked)(void *pvt, int is_blocked);
176 void (* const set_callerid)(void *pvt, const struct ast_party_caller *caller);
177 void (* const set_dnid)(void *pvt, const char *dnid);
178
179 void (* const queue_control)(void *pvt, int subclass);
180 void (* const open_media)(void *pvt);
181
182 struct sig_ss7_linkset *(* const find_linkset)(struct ss7 *ss7);
183};
184
185/*! Global sig_ss7 callbacks to the upper layer. */
187
188struct sig_ss7_chan {
189 void *chan_pvt; /*!< Private structure of the user of this module. */
190 struct sig_ss7_linkset *ss7;
191 struct ast_channel *owner;
192
193 /*! \brief Opaque libss7 call control structure */
194 struct isup_call *ss7call;
195
196 /*! Call establishment life cycle level for simple comparisons. */
198
199 int channel; /*!< Channel Number */
200 int cic; /*!< CIC associated with channel */
201 unsigned int dpc; /*!< CIC's DPC */
202
203 /* Options to be set by user */
204 /*!
205 * \brief Number of most significant digits/characters to strip from the dialed number.
206 * \note Feature is deprecated. Use dialplan logic.
207 */
208 int stripmsd;
209 /*!
210 * \brief TRUE if the outgoing caller ID is blocked/hidden.
211 */
212 unsigned int hidecallerid:1;
213 /*! \brief TRUE if caller ID is used on this channel. */
214 unsigned int use_callerid:1;
215 /*!
216 * \brief TRUE if we will use the calling presentation setting
217 * from the Asterisk channel for outgoing calls.
218 */
219 unsigned int use_callingpres:1;
220 unsigned int immediate:1; /*!< Answer before getting digits? */
221
222 /*!
223 * \brief Bitmask for the channel being locally blocked.
224 * \note 1 maintenance blocked, 2 blocked in hardware.
225 * \note Set by user and link.
226 */
227 unsigned int locallyblocked:2;
228
229 /*!
230 * \brief Bitmask for the channel being remotely blocked.
231 * \note 1 maintenance blocked, 2 blocked in hardware.
232 * \note Set by user and link.
233 */
234 unsigned int remotelyblocked:2;
235
238
239 /* Options to be checked by user */
240 int cid_ani2; /*!< Automatic Number Identification number (Alternate PRI caller ID number) */
241 int cid_ton; /*!< Type Of Number (TON) */
242 int callingpres; /*!< The value of calling presentation that we're going to use when placing a PRI call */
244 char cid_subaddr[AST_MAX_EXTENSION];/*!< XXX SS7 may not support. */
248
249 /* Options to be checked by user that are stuffed into channel variables. */
250 char charge_number[50];
251 char gen_add_number[50];
252 char gen_dig_number[50];
253 char orig_called_num[50];
255 char redirecting_num[50];
257 unsigned char redirect_counter;
258 unsigned char redirect_info;
259 unsigned char redirect_info_ind;
260 unsigned char redirect_info_orig_reas;
261 unsigned char redirect_info_counter;
262 unsigned char redirect_info_reas;
263 char generic_name[50];
264 unsigned char gen_add_num_plan;
265 unsigned char gen_add_nai;
266 unsigned char gen_add_pres_ind;
267 unsigned char gen_add_type;
268 unsigned char gen_dig_type;
269 unsigned char gen_dig_scheme;
270 char jip_number[50];
271#if 0
272 unsigned char lspi_type;
273 unsigned char lspi_scheme;
274 unsigned char lspi_context;
275#endif
276 char lspi_ident[50];
277 unsigned int call_ref_ident;
278 unsigned int call_ref_pc;
279 unsigned char calling_party_cat;
280 unsigned int do_hangup; /* What we have to do to clear the call */
281 unsigned int echocontrol_ind;
282
283 /*
284 * Channel status bits.
285 */
286 /*! \brief TRUE if channel is associated with a link that is down. */
287 unsigned int inalarm:1;
288 /*! \brief TRUE if channel is in service. */
289 unsigned int inservice:1;
290 /*! \brief TRUE if this channel is being used for an outgoing call. */
291 unsigned int outgoing:1;
292 /*! \brief TRUE if the channel has completed collecting digits. */
293 unsigned int called_complete:1;
294 /*! \brief TRUE if the call has seen inband-information progress through the network. */
295 unsigned int progress:1;
296 /*! \brief XXX BOOLEAN Purpose??? */
297 unsigned int rlt:1;
298 /*! \brief TRUE if this channel is in loopback. */
299 unsigned int loopedback:1;
300
301 /*
302 * Closed User Group fields Q.735.1
303 */
304 /*! \brief Network Identify Code as per Q.763 3.15.a */
305 char cug_interlock_ni[5];
306 /*! \brief Binari Code to uniquely identify a CUG inside the network. */
307 unsigned short cug_interlock_code;
308 /*!
309 * \brief Indication of the call being a CUG call and its permissions.
310 * \note 0 or 1 - non-CUG call
311 * \note 2 - CUG call, outgoing access allowed
312 * \note 3 - CUG call, outgoing access not allowed
313 */
314 unsigned char cug_indicator;
315};
316
317struct sig_ss7_linkset {
318 pthread_t master; /*!< Thread of master */
319 ast_mutex_t lock; /*!< libss7 access lock */
320 struct ss7 *ss7;
321 struct sig_ss7_chan *pvts[SIG_SS7_MAX_CHANNELS];/*!< Member channel pvt structs */
323 int numsigchans;
325 int numchans;
326 int span; /*!< span number put into user output messages */
327 int debug; /*!< set to true if to dump SS7 event info */
328 enum {
331 } state;
332
333 /* Options to be set by user */
334 int flags; /*!< Linkset flags (LINKSET_FLAG_EXPLICITACM) */
335 int type; /*!< SS7 type ITU/ANSI. Used for companding selection. */
336 char called_nai; /*!< Called Nature of Address Indicator */
337 char calling_nai; /*!< Calling Nature of Address Indicator */
338 char internationalprefix[10]; /*!< country access code ('00' for european dialplans) */
339 char nationalprefix[10]; /*!< area access code ('0' for european dialplans) */
340 char subscriberprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
341 char unknownprefix[20]; /*!< for unknown dialplans */
342 char networkroutedprefix[20];
343};
344
345void sig_ss7_set_alarm(struct sig_ss7_chan *p, int in_alarm);
346
347void *ss7_linkset(void *data);
348
349void sig_ss7_link_alarm(struct sig_ss7_linkset *linkset, int which);
350void sig_ss7_link_noalarm(struct sig_ss7_linkset *linkset, int which);
351int sig_ss7_add_sigchan(struct sig_ss7_linkset *linkset, int which, int ss7type, int transport, int inalarm, int networkindicator, int pointcode, int adjpointcode, int cur_slc);
352
353int sig_ss7_reset_cic(struct sig_ss7_linkset *linkset, int cic, unsigned int dpc);
354int sig_ss7_reset_group(struct sig_ss7_linkset *linkset, int cic, unsigned int dpc, int range);
355int sig_ss7_cic_blocking(struct sig_ss7_linkset *linkset, int do_block, int cic);
356int sig_ss7_group_blocking(struct sig_ss7_linkset *linkset, int do_block, int startcic, int endcic, unsigned char state[], int type);
357
358int sig_ss7_available(struct sig_ss7_chan *p);
359int sig_ss7_call(struct sig_ss7_chan *p, struct ast_channel *ast, const char *rdest);
360int sig_ss7_hangup(struct sig_ss7_chan *p, struct ast_channel *ast);
361int sig_ss7_answer(struct sig_ss7_chan *p, struct ast_channel *ast);
362int sig_ss7_find_cic(struct sig_ss7_linkset *linkset, int cic, unsigned int dpc);
363int sig_ss7_find_cic_range(struct sig_ss7_linkset *linkset, int startcic, int endcic, unsigned int dpc);
364void sig_ss7_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_ss7_chan *pchan);
365int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen);
366struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law,
367 const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
369void sig_ss7_chan_delete(struct sig_ss7_chan *doomed);
370struct sig_ss7_chan *sig_ss7_chan_new(void *pvt_data, struct sig_ss7_linkset *ss7);
372void sig_ss7_free_isup_call(struct sig_ss7_linkset *linkset, int channel);
373
375void sig_ss7_cli_show_channels(int fd, struct sig_ss7_linkset *linkset);
376
377int sig_ss7_cb_hangup(struct ss7 *ss7, int cic, unsigned int dpc, int cause, int do_hangup);
378void sig_ss7_cb_call_null(struct ss7 *ss7, struct isup_call *c, int lock);
379void sig_ss7_cb_notinservice(struct ss7 *ss7, int cic, unsigned int dpc);
380
381/* ------------------------------------------------------------------- */
382
383#ifdef __cplusplus
384}
385#endif
386
387#endif /* _ASTERISK_SIG_SS7_H */
388/* ------------------------------------------------------------------- */
389/* end sig_ss7.h */
ast_mutex_t lock
Definition app_sla.c:337
static const char type[]
#define AST_MAX_CONTEXT
Definition channel.h:135
#define AST_MAX_EXTENSION
Definition channel.h:134
#define MAX_MUSICCLASS
Definition channel.h:175
void sig_ss7_cb_call_null(struct ss7 *ss7, struct isup_call *c, int lock)
void sig_ss7_link_noalarm(struct sig_ss7_linkset *linkset, int which)
void sig_ss7_cli_show_channels_header(int fd)
struct ast_channel * sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, int transfercapability)
void sig_ss7_init_linkset(struct sig_ss7_linkset *ss7)
void sig_ss7_link_alarm(struct sig_ss7_linkset *linkset, int which)
int sig_ss7_reset_group(struct sig_ss7_linkset *linkset, int cic, unsigned int dpc, int range)
int sig_ss7_available(struct sig_ss7_chan *p)
void sig_ss7_cb_notinservice(struct ss7 *ss7, int cic, unsigned int dpc)
sig_ss7_redirect_indication
Definition sig_ss7.h:94
@ SS7_INDICATION_SPARE
Definition sig_ss7.h:102
@ SS7_INDICATION_DIVERTED_PRES_ALLOWED
Definition sig_ss7.h:98
@ SS7_INDICATION_REROUTED_PRES_RESTRICTED
Definition sig_ss7.h:100
@ SS7_INDICATION_NO_REDIRECTION
Definition sig_ss7.h:95
@ SS7_INDICATION_DIVERTED_INFO_RESTRICTED
Definition sig_ss7.h:99
@ SS7_INDICATION_REROUTED_INFO_RESTRICTED
Definition sig_ss7.h:97
@ SS7_INDICATION_DIVERTED_PRES_RESTRICTED
Definition sig_ss7.h:101
@ SS7_INDICATION_REROUTED_PRES_ALLOWED
Definition sig_ss7.h:96
int sig_ss7_reset_cic(struct sig_ss7_linkset *linkset, int cic, unsigned int dpc)
int sig_ss7_call(struct sig_ss7_chan *p, struct ast_channel *ast, const char *rdest)
void * ss7_linkset(void *data)
int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen)
int sig_ss7_group_blocking(struct sig_ss7_linkset *linkset, int do_block, int startcic, int endcic, unsigned char state[], int type)
int sig_ss7_find_cic(struct sig_ss7_linkset *linkset, int cic, unsigned int dpc)
void sig_ss7_free_isup_call(struct sig_ss7_linkset *linkset, int channel)
struct sig_ss7_callback sig_ss7_callbacks
void sig_ss7_set_alarm(struct sig_ss7_chan *p, int in_alarm)
sig_ss7_tone
Definition sig_ss7.h:78
@ SIG_SS7_TONE_DIALRECALL
Definition sig_ss7.h:83
@ SIG_SS7_TONE_INFO
Definition sig_ss7.h:84
@ SIG_SS7_TONE_STUTTER
Definition sig_ss7.h:80
@ SIG_SS7_TONE_RINGTONE
Definition sig_ss7.h:79
@ SIG_SS7_TONE_CONGESTION
Definition sig_ss7.h:81
@ SIG_SS7_TONE_DIALTONE
Definition sig_ss7.h:82
@ SIG_SS7_TONE_BUSY
Definition sig_ss7.h:85
struct sig_ss7_chan * sig_ss7_chan_new(void *pvt_data, struct sig_ss7_linkset *ss7)
void sig_ss7_cli_show_channels(int fd, struct sig_ss7_linkset *linkset)
sig_ss7_call_level
Definition sig_ss7.h:116
@ SIG_SS7_CALL_LEVEL_PROCEEDING
Definition sig_ss7.h:138
@ SIG_SS7_CALL_LEVEL_IDLE
Definition sig_ss7.h:118
@ SIG_SS7_CALL_LEVEL_SETUP
Definition sig_ss7.h:133
@ SIG_SS7_CALL_LEVEL_CONNECT
Definition sig_ss7.h:148
@ SIG_SS7_CALL_LEVEL_ALLOCATED
Definition sig_ss7.h:123
@ SIG_SS7_CALL_LEVEL_ALERTING
Definition sig_ss7.h:143
@ SIG_SS7_CALL_LEVEL_CONTINUITY
Definition sig_ss7.h:128
int sig_ss7_cic_blocking(struct sig_ss7_linkset *linkset, int do_block, int cic)
sig_ss7_law
Definition sig_ss7.h:88
@ SIG_SS7_DEFLAW
Definition sig_ss7.h:89
@ SIG_SS7_ULAW
Definition sig_ss7.h:90
@ SIG_SS7_ALAW
Definition sig_ss7.h:91
void sig_ss7_chan_delete(struct sig_ss7_chan *doomed)
int sig_ss7_cb_hangup(struct ss7 *ss7, int cic, unsigned int dpc, int cause, int do_hangup)
int sig_ss7_add_sigchan(struct sig_ss7_linkset *linkset, int which, int ss7type, int transport, int inalarm, int networkindicator, int pointcode, int adjpointcode, int cur_slc)
int sig_ss7_hangup(struct sig_ss7_chan *p, struct ast_channel *ast)
void sig_ss7_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_ss7_chan *pchan)
#define SIG_SS7_NUM_DCHANS
Definition sig_ss7.h:56
int sig_ss7_answer(struct sig_ss7_chan *p, struct ast_channel *ast)
#define SIG_SS7_MAX_CHANNELS
Definition sig_ss7.h:57
sig_ss7_redirect_reason
Definition sig_ss7.h:105
@ SS7_REDIRECTING_REASON_DEFLECTION_IMMEDIATE_RESPONSE
Definition sig_ss7.h:111
@ SS7_REDIRECTING_REASON_DEFLECTION_DURING_ALERTING
Definition sig_ss7.h:110
@ SS7_REDIRECTING_REASON_UNKNOWN
Definition sig_ss7.h:106
@ SS7_REDIRECTING_REASON_NO_ANSWER
Definition sig_ss7.h:108
@ SS7_REDIRECTING_REASON_USER_BUSY
Definition sig_ss7.h:107
@ SS7_REDIRECTING_REASON_UNAVAILABLE
Definition sig_ss7.h:112
@ SS7_REDIRECTING_REASON_UNCONDITIONAL
Definition sig_ss7.h:109
int sig_ss7_find_cic_range(struct sig_ss7_linkset *linkset, int startcic, int endcic, unsigned int dpc)
Structure to pass both assignedid values to channel drivers.
Definition channel.h:606
Main Channel structure associated with a channel.
unsigned short transfercapability
Structure for mutex and tracking information.
Definition lock.h:142
Caller Party information.
Definition channel.h:420
int(*const set_echocanceller)(void *pvt, int enable)
Definition sig_ss7.h:161
void(*const deadlock_avoidance_private)(void *pvt)
Definition sig_ss7.h:159
void(*const set_digital)(void *pvt, int is_digital)
Definition sig_ss7.h:172
struct sig_ss7_linkset *(*const find_linkset)(struct ss7 *ss7)
Definition sig_ss7.h:183
void(*const set_loopback)(void *pvt, int enable)
Definition sig_ss7.h:162
void(*const unlock_private)(void *pvt)
Definition sig_ss7.h:155
void(*const set_callerid)(void *pvt, const struct ast_party_caller *caller)
Definition sig_ss7.h:177
void(*const set_dnid)(void *pvt, const char *dnid)
Definition sig_ss7.h:178
void(*const set_outgoing)(void *pvt, int is_outgoing)
Definition sig_ss7.h:173
void(*const set_dialing)(void *pvt, int is_dialing)
Definition sig_ss7.h:171
void(*const set_alarm)(void *pvt, int in_alarm)
Definition sig_ss7.h:170
void(*const handle_link_exception)(struct sig_ss7_linkset *linkset, int which)
Definition sig_ss7.h:169
void(*const queue_control)(void *pvt, int subclass)
Definition sig_ss7.h:180
void(*const set_remotelyblocked)(void *pvt, int is_blocked)
Definition sig_ss7.h:176
void(*const lock_private)(void *pvt)
Definition sig_ss7.h:157
void(*const set_inservice)(void *pvt, int is_inservice)
Definition sig_ss7.h:174
void(*const open_media)(void *pvt)
Definition sig_ss7.h:181
struct ast_channel *(*const new_ast_channel)(void *pvt, int state, enum sig_ss7_law law, char *exten, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
Definition sig_ss7.h:164
void(*const set_locallyblocked)(void *pvt, int is_blocked)
Definition sig_ss7.h:175
int(*const play_tone)(void *pvt, enum sig_ss7_tone tone)
Definition sig_ss7.h:167
unsigned int immediate
Definition sig_ss7.h:221
char generic_name[50]
Definition sig_ss7.h:264
char cid_subaddr[AST_MAX_EXTENSION]
Definition sig_ss7.h:245
void * chan_pvt
Definition sig_ss7.h:190
char lspi_ident[50]
Definition sig_ss7.h:277
char jip_number[50]
Definition sig_ss7.h:271
char cid_num[AST_MAX_EXTENSION]
Definition sig_ss7.h:244
unsigned short cug_interlock_code
Binari Code to uniquely identify a CUG inside the network.
Definition sig_ss7.h:308
unsigned int echocontrol_ind
Definition sig_ss7.h:282
unsigned int outgoing
TRUE if this channel is being used for an outgoing call.
Definition sig_ss7.h:292
char gen_add_number[50]
Definition sig_ss7.h:252
unsigned int loopedback
TRUE if this channel is in loopback.
Definition sig_ss7.h:300
unsigned int call_ref_ident
Definition sig_ss7.h:278
unsigned int locallyblocked
Bitmask for the channel being locally blocked.
Definition sig_ss7.h:228
unsigned int call_ref_pc
Definition sig_ss7.h:279
unsigned char redirect_info_reas
Definition sig_ss7.h:263
unsigned char redirect_info_orig_reas
Definition sig_ss7.h:261
unsigned char redirect_info
Definition sig_ss7.h:259
int redirecting_presentation
Definition sig_ss7.h:257
unsigned char redirect_info_ind
Definition sig_ss7.h:260
unsigned int dpc
Definition sig_ss7.h:202
enum sig_ss7_call_level call_level
Definition sig_ss7.h:198
unsigned int use_callingpres
TRUE if we will use the calling presentation setting from the Asterisk channel for outgoing calls.
Definition sig_ss7.h:220
unsigned char calling_party_cat
Definition sig_ss7.h:280
char exten[AST_MAX_EXTENSION]
Definition sig_ss7.h:248
unsigned int rlt
XXX BOOLEAN Purpose???
Definition sig_ss7.h:298
char gen_dig_number[50]
Definition sig_ss7.h:253
struct isup_call * ss7call
Opaque libss7 call control structure.
Definition sig_ss7.h:195
char charge_number[50]
Definition sig_ss7.h:251
char redirecting_num[50]
Definition sig_ss7.h:256
unsigned int remotelyblocked
Bitmask for the channel being remotely blocked.
Definition sig_ss7.h:235
unsigned int hidecallerid
TRUE if the outgoing caller ID is blocked/hidden.
Definition sig_ss7.h:213
unsigned int progress
TRUE if the call has seen inband-information progress through the network.
Definition sig_ss7.h:296
struct ast_channel * owner
Definition sig_ss7.h:192
unsigned char gen_dig_scheme
Definition sig_ss7.h:270
unsigned int called_complete
TRUE if the channel has completed collecting digits.
Definition sig_ss7.h:294
char cug_interlock_ni[5]
Network Identify Code as per Q.763 3.15.a.
Definition sig_ss7.h:306
unsigned char gen_add_type
Definition sig_ss7.h:268
unsigned char gen_add_pres_ind
Definition sig_ss7.h:267
unsigned char gen_add_num_plan
Definition sig_ss7.h:265
struct sig_ss7_linkset * ss7
Definition sig_ss7.h:191
unsigned int do_hangup
Definition sig_ss7.h:281
unsigned char cug_indicator
Indication of the call being a CUG call and its permissions.
Definition sig_ss7.h:315
int callingpres
Definition sig_ss7.h:243
char context[AST_MAX_CONTEXT]
Definition sig_ss7.h:237
unsigned char redirect_counter
Definition sig_ss7.h:258
unsigned int inalarm
TRUE if channel is associated with a link that is down.
Definition sig_ss7.h:288
int orig_called_presentation
Definition sig_ss7.h:255
char cid_name[AST_MAX_EXTENSION]
Definition sig_ss7.h:246
unsigned int inservice
TRUE if channel is in service.
Definition sig_ss7.h:290
unsigned char redirect_info_counter
Definition sig_ss7.h:262
int stripmsd
Number of most significant digits/characters to strip from the dialed number.
Definition sig_ss7.h:209
unsigned char gen_add_nai
Definition sig_ss7.h:266
unsigned int use_callerid
TRUE if caller ID is used on this channel.
Definition sig_ss7.h:215
char cid_ani[AST_MAX_EXTENSION]
Definition sig_ss7.h:247
char mohinterpret[MAX_MUSICCLASS]
Definition sig_ss7.h:238
char orig_called_num[50]
Definition sig_ss7.h:254
unsigned char gen_dig_type
Definition sig_ss7.h:269
int fds[SIG_SS7_NUM_DCHANS]
Definition sig_ss7.h:323
enum sig_ss7_linkset::@152 state
char unknownprefix[20]
Definition sig_ss7.h:342
char subscriberprefix[20]
Definition sig_ss7.h:341
char nationalprefix[10]
Definition sig_ss7.h:340
int linkstate[SIG_SS7_NUM_DCHANS]
Definition sig_ss7.h:325
pthread_t master
Definition sig_ss7.h:319
char networkroutedprefix[20]
Definition sig_ss7.h:343
struct ss7 * ss7
Definition sig_ss7.h:321
ast_mutex_t lock
Definition sig_ss7.h:320
char internationalprefix[10]
Definition sig_ss7.h:339
struct sig_ss7_chan * pvts[SIG_SS7_MAX_CHANNELS]
Definition sig_ss7.h:322
static struct test_val c

◆ SIG_SS7_DEBUG_DEFAULT

#define SIG_SS7_DEBUG_DEFAULT   0

SS7 debug message flags set on initial startup.

Definition at line 51 of file sig_ss7.h.

◆ SIG_SS7_MAX_CHANNELS

#define SIG_SS7_MAX_CHANNELS   672

No more than a DS3 per trunk group

Definition at line 57 of file sig_ss7.h.

◆ SIG_SS7_NUM_DCHANS

#define SIG_SS7_NUM_DCHANS   4

No more than 4 d-channels

Definition at line 56 of file sig_ss7.h.

◆ SS7_BLOCKED_HARDWARE

#define SS7_BLOCKED_HARDWARE   (1 << 1)

Definition at line 75 of file sig_ss7.h.

◆ SS7_BLOCKED_MAINTENANCE

#define SS7_BLOCKED_MAINTENANCE   (1 << 0)

Definition at line 74 of file sig_ss7.h.

◆ SS7_NAI_DYNAMIC

#define SS7_NAI_DYNAMIC   -1

Definition at line 66 of file sig_ss7.h.

Enumeration Type Documentation

◆ sig_ss7_call_level

Call establishment life cycle level for simple comparisons.

Enumerator
SIG_SS7_CALL_LEVEL_IDLE 

Call does not exist.

SIG_SS7_CALL_LEVEL_ALLOCATED 

Call is allocated to the channel. We have not sent or responded to IAM yet.

SIG_SS7_CALL_LEVEL_CONTINUITY 

Call is performing continuity check after receiving IAM. We are waiting for COT to proceed further.

SIG_SS7_CALL_LEVEL_SETUP 

Call is present. We have not seen a response or sent further call progress to an IAM yet.

SIG_SS7_CALL_LEVEL_PROCEEDING 

Call routing is happening. We have sent or received ACM.

SIG_SS7_CALL_LEVEL_ALERTING 

Called party is being alerted of the call. We have sent or received CPG(ALERTING)/ACM(ALERTING).

SIG_SS7_CALL_LEVEL_CONNECT 

Call is connected/answered. We have sent or received CON/ANM.

Definition at line 116 of file sig_ss7.h.

116 {
117 /*! Call does not exist. */
119 /*!
120 * Call is allocated to the channel.
121 * We have not sent or responded to IAM yet.
122 */
124 /*!
125 * Call is performing continuity check after receiving IAM.
126 * We are waiting for COT to proceed further.
127 */
129 /*!
130 * Call is present.
131 * We have not seen a response or sent further call progress to an IAM yet.
132 */
134 /*!
135 * Call routing is happening.
136 * We have sent or received ACM.
137 */
139 /*!
140 * Called party is being alerted of the call.
141 * We have sent or received CPG(ALERTING)/ACM(ALERTING).
142 */
144 /*!
145 * Call is connected/answered.
146 * We have sent or received CON/ANM.
147 */
149};

◆ sig_ss7_law

Enumerator
SIG_SS7_DEFLAW 
SIG_SS7_ULAW 
SIG_SS7_ALAW 

Definition at line 88 of file sig_ss7.h.

88 {
92};

◆ sig_ss7_redirect_indication

Enumerator
SS7_INDICATION_NO_REDIRECTION 
SS7_INDICATION_REROUTED_PRES_ALLOWED 
SS7_INDICATION_REROUTED_INFO_RESTRICTED 
SS7_INDICATION_DIVERTED_PRES_ALLOWED 
SS7_INDICATION_DIVERTED_INFO_RESTRICTED 
SS7_INDICATION_REROUTED_PRES_RESTRICTED 
SS7_INDICATION_DIVERTED_PRES_RESTRICTED 
SS7_INDICATION_SPARE 

Definition at line 94 of file sig_ss7.h.

◆ sig_ss7_redirect_reason

Enumerator
SS7_REDIRECTING_REASON_UNKNOWN 
SS7_REDIRECTING_REASON_USER_BUSY 
SS7_REDIRECTING_REASON_NO_ANSWER 
SS7_REDIRECTING_REASON_UNCONDITIONAL 
SS7_REDIRECTING_REASON_DEFLECTION_DURING_ALERTING 
SS7_REDIRECTING_REASON_DEFLECTION_IMMEDIATE_RESPONSE 
SS7_REDIRECTING_REASON_UNAVAILABLE 

Definition at line 105 of file sig_ss7.h.

◆ sig_ss7_tone

Enumerator
SIG_SS7_TONE_RINGTONE 
SIG_SS7_TONE_STUTTER 
SIG_SS7_TONE_CONGESTION 
SIG_SS7_TONE_DIALTONE 
SIG_SS7_TONE_DIALRECALL 
SIG_SS7_TONE_INFO 
SIG_SS7_TONE_BUSY 

Definition at line 78 of file sig_ss7.h.

Function Documentation

◆ sig_ss7_add_sigchan()

int sig_ss7_add_sigchan ( struct sig_ss7_linkset linkset,
int  which,
int  ss7type,
int  transport,
int  inalarm,
int  networkindicator,
int  pointcode,
int  adjpointcode,
int  cur_slc 
)

◆ sig_ss7_answer()

int sig_ss7_answer ( struct sig_ss7_chan p,
struct ast_channel ast 
)

Referenced by dahdi_answer().

◆ sig_ss7_available()

int sig_ss7_available ( struct sig_ss7_chan p)

Referenced by available().

◆ sig_ss7_call()

int sig_ss7_call ( struct sig_ss7_chan p,
struct ast_channel ast,
const char *  rdest 
)

Referenced by dahdi_call().

◆ sig_ss7_cb_call_null()

void sig_ss7_cb_call_null ( struct ss7 *  ss7,
struct isup_call *  c,
int  lock 
)

Referenced by dahdi_restart(), and load_module().

◆ sig_ss7_cb_hangup()

int sig_ss7_cb_hangup ( struct ss7 *  ss7,
int  cic,
unsigned int  dpc,
int  cause,
int  do_hangup 
)

Referenced by dahdi_restart(), and load_module().

◆ sig_ss7_cb_notinservice()

void sig_ss7_cb_notinservice ( struct ss7 *  ss7,
int  cic,
unsigned int  dpc 
)

Referenced by dahdi_restart(), and load_module().

◆ sig_ss7_chan_delete()

void sig_ss7_chan_delete ( struct sig_ss7_chan doomed)

Referenced by destroy_dahdi_pvt().

◆ sig_ss7_chan_new()

struct sig_ss7_chan * sig_ss7_chan_new ( void *  pvt_data,
struct sig_ss7_linkset ss7 
)

Referenced by mkintf().

◆ sig_ss7_cic_blocking()

int sig_ss7_cic_blocking ( struct sig_ss7_linkset linkset,
int  do_block,
int  cic 
)

◆ sig_ss7_cli_show_channels()

void sig_ss7_cli_show_channels ( int  fd,
struct sig_ss7_linkset linkset 
)

◆ sig_ss7_cli_show_channels_header()

void sig_ss7_cli_show_channels_header ( int  fd)

◆ sig_ss7_find_cic()

int sig_ss7_find_cic ( struct sig_ss7_linkset linkset,
int  cic,
unsigned int  dpc 
)

◆ sig_ss7_find_cic_range()

int sig_ss7_find_cic_range ( struct sig_ss7_linkset linkset,
int  startcic,
int  endcic,
unsigned int  dpc 
)

◆ sig_ss7_fixup()

void sig_ss7_fixup ( struct ast_channel oldchan,
struct ast_channel newchan,
struct sig_ss7_chan pchan 
)

Referenced by dahdi_fixup().

◆ sig_ss7_free_isup_call()

void sig_ss7_free_isup_call ( struct sig_ss7_linkset linkset,
int  channel 
)

◆ sig_ss7_group_blocking()

int sig_ss7_group_blocking ( struct sig_ss7_linkset linkset,
int  do_block,
int  startcic,
int  endcic,
unsigned char  state[],
int  type 
)

◆ sig_ss7_hangup()

int sig_ss7_hangup ( struct sig_ss7_chan p,
struct ast_channel ast 
)

Referenced by dahdi_hangup().

◆ sig_ss7_indicate()

int sig_ss7_indicate ( struct sig_ss7_chan p,
struct ast_channel chan,
int  condition,
const void *  data,
size_t  datalen 
)

Referenced by dahdi_indicate().

◆ sig_ss7_init_linkset()

void sig_ss7_init_linkset ( struct sig_ss7_linkset ss7)

Referenced by dahdi_restart(), and load_module().

◆ sig_ss7_link_alarm()

void sig_ss7_link_alarm ( struct sig_ss7_linkset linkset,
int  which 
)

◆ sig_ss7_link_noalarm()

void sig_ss7_link_noalarm ( struct sig_ss7_linkset linkset,
int  which 
)

◆ sig_ss7_request()

struct ast_channel * sig_ss7_request ( struct sig_ss7_chan p,
enum sig_ss7_law  law,
const struct ast_assigned_ids assignedids,
const struct ast_channel requestor,
int  transfercapability 
)

Referenced by dahdi_request().

◆ sig_ss7_reset_cic()

int sig_ss7_reset_cic ( struct sig_ss7_linkset linkset,
int  cic,
unsigned int  dpc 
)

◆ sig_ss7_reset_group()

int sig_ss7_reset_group ( struct sig_ss7_linkset linkset,
int  cic,
unsigned int  dpc,
int  range 
)

◆ sig_ss7_set_alarm()

void sig_ss7_set_alarm ( struct sig_ss7_chan p,
int  in_alarm 
)

◆ ss7_linkset()

void * ss7_linkset ( void *  data)

Referenced by setup_dahdi_int().

Variable Documentation

◆ sig_ss7_callbacks

struct sig_ss7_callback sig_ss7_callbacks
extern

Global sig_ss7 callbacks to the upper layer.