pri_q931.h 17.6 KB
Newer Older
Mark Spencer's avatar
Mark Spencer committed
1 2 3
/*
 * libpri: An implementation of Primary Rate ISDN
 *
4
 * Written by Mark Spencer <markster@digium.com>
Mark Spencer's avatar
Mark Spencer committed
5
 *
6
 * Copyright (C) 2001, Digium, Inc.
Mark Spencer's avatar
Mark Spencer committed
7
 * All Rights Reserved.
8 9 10 11 12 13 14 15
 */

/*
 * See http://www.asterisk.org for more information about
 * the Asterisk project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
Mark Spencer's avatar
Mark Spencer committed
16
 *
17 18 19 20
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2 as published by the
 * Free Software Foundation. See the LICENSE file included with
 * this program for more details.
Mark Spencer's avatar
Mark Spencer committed
21
 *
22 23 24 25 26 27
 * In addition, when this program is distributed with Asterisk in
 * any form that would qualify as a 'combined work' or as a
 * 'derivative work' (but not mere aggregation), you can redistribute
 * and/or modify the combination under the terms of the license
 * provided with that copy of Asterisk, instead of the license
 * terms granted here.
Mark Spencer's avatar
Mark Spencer committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
 */
 
#ifndef _PRI_Q931_H
#define _PRI_Q931_H

typedef enum q931_mode {
	UNKNOWN_MODE,
	CIRCUIT_MODE,
	PACKET_MODE
} q931_mode;

typedef struct q931_h {
	unsigned char raw[0];
	u_int8_t pd;		/* Protocol Discriminator */
#if __BYTE_ORDER == __BIG_ENDIAN
	u_int8_t x0:4;
Richard Mudgett's avatar
Richard Mudgett committed
44
	u_int8_t crlen:4;/*!< Call reference length */
Mark Spencer's avatar
Mark Spencer committed
45
#else
Richard Mudgett's avatar
Richard Mudgett committed
46
	u_int8_t crlen:4;/*!< Call reference length */
Mark Spencer's avatar
Mark Spencer committed
47 48 49
	u_int8_t x0:4;
#endif
	u_int8_t contents[0];
Richard Mudgett's avatar
Richard Mudgett committed
50
	u_int8_t crv[3];/*!< Call reference value */
51
} __attribute__ ((packed)) q931_h;
Mark Spencer's avatar
Mark Spencer committed
52 53 54 55 56 57 58 59 60 61 62 63


/* Message type header */
typedef struct q931_mh {
#if __BYTE_ORDER == __BIG_ENDIAN
	u_int8_t f:1;
	u_int8_t msg:7;
#else
	u_int8_t msg:7;
	u_int8_t f:1;
#endif
	u_int8_t data[0];
64
} __attribute__ ((packed)) q931_mh;
Mark Spencer's avatar
Mark Spencer committed
65 66 67

/* Information element format */
typedef struct q931_ie {
68
	u_int8_t ie;
Mark Spencer's avatar
Mark Spencer committed
69 70
	u_int8_t len;
	u_int8_t data[0];
71
} __attribute__ ((packed)) q931_ie;
Mark Spencer's avatar
Mark Spencer committed
72 73 74 75 76

#define Q931_RES_HAVEEVENT (1 << 0)
#define Q931_RES_INERRROR  (1 << 1)

#define Q931_PROTOCOL_DISCRIMINATOR 0x08
77
#define GR303_PROTOCOL_DISCRIMINATOR 0x4f
78
/* AT&T Maintenance Protocol Discriminator */
79
#define MAINTENANCE_PROTOCOL_DISCRIMINATOR_1 0x03
80
/* National Maintenance Protocol Discriminator */
81
#define MAINTENANCE_PROTOCOL_DISCRIMINATOR_2 0x43
Mark Spencer's avatar
Mark Spencer committed
82 83 84

/* Q.931 / National ISDN Message Types */

85 86 87
/*! Send this facility APDU on the next message to go out. */
#define Q931_ANY_MESSAGE			-1

Mark Spencer's avatar
Mark Spencer committed
88 89 90 91 92 93 94
/* Call Establishment Messages */
#define Q931_ALERTING 				0x01
#define Q931_CALL_PROCEEDING		0x02
#define Q931_CONNECT				0x07
#define Q931_CONNECT_ACKNOWLEDGE	0x0f
#define Q931_PROGRESS				0x03
#define Q931_SETUP					0x05
Mark Spencer's avatar
Mark Spencer committed
95
#define Q931_SETUP_ACKNOWLEDGE		0x0d
Mark Spencer's avatar
Mark Spencer committed
96 97 98 99 100 101 102 103 104 105 106

/* Call Disestablishment Messages */
#define Q931_DISCONNECT				0x45
#define Q931_RELEASE				0x4d
#define Q931_RELEASE_COMPLETE		0x5a
#define Q931_RESTART				0x46
#define Q931_RESTART_ACKNOWLEDGE	0x4e

/* Miscellaneous Messages */
#define Q931_STATUS					0x7d
#define Q931_STATUS_ENQUIRY			0x75
Mark Spencer's avatar
Mark Spencer committed
107 108 109 110 111
#define Q931_USER_INFORMATION		0x20
#define Q931_SEGMENT				0x60
#define Q931_CONGESTION_CONTROL		0x79
#define Q931_INFORMATION			0x7b
#define Q931_FACILITY				0x62
112
#define Q931_REGISTER				0x64	/* Q.932 */
Mark Spencer's avatar
Mark Spencer committed
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
#define Q931_NOTIFY					0x6e

/* Call Management Messages */
#define Q931_HOLD					0x24
#define Q931_HOLD_ACKNOWLEDGE		0x28
#define Q931_HOLD_REJECT			0x30
#define Q931_RETRIEVE				0x31
#define Q931_RETRIEVE_ACKNOWLEDGE	0x33
#define Q931_RETRIEVE_REJECT		0x37
#define Q931_RESUME					0x26
#define Q931_RESUME_ACKNOWLEDGE		0x2e
#define Q931_RESUME_REJECT			0x22
#define Q931_SUSPEND				0x25
#define Q931_SUSPEND_ACKNOWLEDGE	0x2d
#define Q931_SUSPEND_REJECT			0x21
Mark Spencer's avatar
Mark Spencer committed
128 129

/* Maintenance messages (codeset 0 only) */
130 131 132 133
#define ATT_SERVICE                 0x0f
#define ATT_SERVICE_ACKNOWLEDGE     0x07
#define NATIONAL_SERVICE            0x07
#define NATIONAL_SERVICE_ACKNOWLEDGE 0x0f
Mark Spencer's avatar
Mark Spencer committed
134

135 136 137 138 139 140
#define SERVICE_CHANGE_STATUS_INSERVICE           0
#define SERVICE_CHANGE_STATUS_LOOPBACK            1  /* not supported */
#define SERVICE_CHANGE_STATUS_OUTOFSERVICE        2
#define SERVICE_CHANGE_STATUS_REQCONTINUITYCHECK  3  /* not supported */
#define SERVICE_CHANGE_STATUS_SHUTDOWN            4  /* not supported */

Mark Spencer's avatar
Mark Spencer committed
141 142 143 144 145
/* Special codeset 0 IE */
#define	NATIONAL_CHANGE_STATUS		0x1

/* Q.931 / National ISDN Information Elements */
#define Q931_LOCKING_SHIFT			0x90
146
#define Q931_NON_LOCKING_SHIFT		0x98
Mark Spencer's avatar
Mark Spencer committed
147 148
#define Q931_BEARER_CAPABILITY		0x04
#define Q931_CAUSE					0x08
149
#define Q931_IE_CALL_STATE			0x14
Mark Spencer's avatar
Mark Spencer committed
150 151 152
#define Q931_CHANNEL_IDENT			0x18
#define Q931_PROGRESS_INDICATOR		0x1e
#define Q931_NETWORK_SPEC_FAC		0x20
153
#define Q931_CALLING_PARTY_CATEGORY	(0x32 | Q931_CODESET(5))
Mark Spencer's avatar
Mark Spencer committed
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
#define Q931_INFORMATION_RATE		0x40
#define Q931_TRANSIT_DELAY			0x42
#define Q931_TRANS_DELAY_SELECT		0x43
#define Q931_BINARY_PARAMETERS		0x44
#define Q931_WINDOW_SIZE			0x45
#define Q931_PACKET_SIZE			0x46
#define Q931_CLOSED_USER_GROUP		0x47
#define Q931_REVERSE_CHARGE_INDIC	0x4a
#define Q931_CALLING_PARTY_NUMBER	0x6c
#define Q931_CALLING_PARTY_SUBADDR	0x6d
#define Q931_CALLED_PARTY_NUMBER	0x70
#define Q931_CALLED_PARTY_SUBADDR	0x71
#define Q931_REDIRECTING_NUMBER		0x74
#define Q931_REDIRECTING_SUBADDR	0x75
#define Q931_TRANSIT_NET_SELECT		0x78
#define Q931_RESTART_INDICATOR		0x79
#define Q931_LOW_LAYER_COMPAT		0x7c
#define Q931_HIGH_LAYER_COMPAT		0x7d

173 174 175 176 177
#define Q931_CODESET(x)			((x) << 8)
#define Q931_IE_CODESET(x)		((x) >> 8)
#define Q931_IE_IE(x)			((x) & 0xff)
#define Q931_FULL_IE(codeset, ie)	(((codeset) << 8) | ((ie) & 0xff))

178
#define Q931_DISPLAY					0x28
Mark Spencer's avatar
Mark Spencer committed
179 180
#define Q931_IE_SEGMENTED_MSG			0x00
#define Q931_IE_CHANGE_STATUS			0x01
181
#define Q931_IE_ORIGINATING_LINE_INFO		(0x01 | Q931_CODESET(6))
182 183 184
#define Q931_IE_CONNECTED_ADDR			0x0c
#define Q931_IE_CONNECTED_NUM			0x4c
#define Q931_IE_CONNECTED_SUBADDR		0x4d
Mark Spencer's avatar
Mark Spencer committed
185 186 187 188 189 190 191 192 193 194 195
#define Q931_IE_CALL_IDENTITY			0x10
#define Q931_IE_FACILITY				0x1c
#define Q931_IE_ENDPOINT_ID				0x26
#define Q931_IE_NOTIFY_IND				0x27
#define Q931_IE_TIME_DATE				0x29
#define Q931_IE_KEYPAD_FACILITY			0x2c
#define Q931_IE_CALL_STATUS				0x2d
#define Q931_IE_UPDATE                  0x31
#define Q931_IE_INFO_REQUEST            0x32
#define Q931_IE_SIGNAL					0x34
#define Q931_IE_SWITCHHOOK				0x36
196
#define Q931_IE_GENERIC_DIGITS			(0x37 | Q931_CODESET(6))
Mark Spencer's avatar
Mark Spencer committed
197 198 199 200 201 202 203 204 205
#define Q931_IE_FEATURE_ACTIVATE		0x38
#define Q931_IE_FEATURE_IND				0x39
#define Q931_IE_ORIGINAL_CALLED_NUMBER 	0x73
#define Q931_IE_REDIRECTION_NUMBER		0x76
#define Q931_IE_REDIRECTION_SUBADDR		0x77
#define Q931_IE_USER_USER_FACILITY		0x7A
#define Q931_IE_USER_USER				0x7E
#define Q931_IE_ESCAPE_FOR_EXT			0x7F

206

207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
/*! Q.931 call states */
enum Q931_CALL_STATE {
	/*!
	 * \details
	 *   null state (U0):
	 *     No call exists.
	 * \details
	 *   null state (N0):
	 *     No call exists.
	 */
	Q931_CALL_STATE_NULL = 0,
	/*!
	 * \details
	 *   call initiated (U1):
	 *     This state exists for an outgoing call, when the user requests
	 *     call establishment from the network.
	 * \details
	 *   call initiated (N1):
	 *     This state exists for an outgoing call when the network has received
	 *     a call establishment request but has not yet responded.
	 */
	Q931_CALL_STATE_CALL_INITIATED = 1,
	/*!
	 * \details
	 *   overlap sending (U2):
	 *     This state exists for an outgoing call when the user has
	 *     received acknowledgement of the call establishment request which
	 *     permits the user to send additional call information to the network
	 *     in overlap mode.
	 * \details
	 *   overlap sending (N2):
	 *     This state exists for an outgoing call when the network has acknowledged
	 *     the call establishment request and is prepared to receive additional
	 *     call information (if any) in overlap mode.
	 */
	Q931_CALL_STATE_OVERLAP_SENDING = 2,
	/*!
	 * \details
	 *   outgoing call proceeding (U3):
	 *     This state exists for an outgoing call when the user has
	 *     received acknowledgement that the network has received all
	 *     call information necessary to effect call establishment.
	 * \details
	 *   outgoing call proceeding (N3):
	 *     This state exists for an outgoing call when the network has sent
	 *     acknowledgement that the network has received all call information
	 *     necessary to effect call establishment.
	 */
	Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING = 3,
	/*!
	 * \details
	 *   call delivered (U4):
	 *     This state exists for an outgoing call when the calling user has
	 *     received an indication that remote user alerting has been initiated.
	 * \details
	 *   call delivered (N4):
	 *     This state exists for an outgoing call when the network has indicated
	 *     that remote user alerting has been initiated.
	 */
	Q931_CALL_STATE_CALL_DELIVERED = 4,
	/*!
	 * \details
	 *   call present (U6):
	 *     This state exists for an incoming call when the user has received a
	 *     call establishment request but has not yet responded.
	 * \details
	 *   call present (N6):
	 *     This state exists for an incoming call when the network has sent a
	 *     call establishment request but has not yet received a satisfactory
	 *     response.
	 */
	Q931_CALL_STATE_CALL_PRESENT = 6,
	/*!
	 * \details
	 *   call received (U7):
	 *     This state exists for an incoming call when the user has indicated
	 *     alerting but has not yet answered.
	 * \details
	 *   call received (N7):
	 *     This state exists for an incoming call when the network has received
	 *     an indication that the user is alerting but has not yet received an
	 *     answer.
	 */
	Q931_CALL_STATE_CALL_RECEIVED = 7,
	/*!
	 * \details
	 *   connect request (U8):
	 *     This state exists for an incoming call when the user has answered
	 *     the call and is waiting to be awarded the call.
	 * \details
	 *   connect request (N8):
	 *     This state exists for an incoming call when the network has received
	 *     an answer but the network has not yet awarded the call.
	 */
	Q931_CALL_STATE_CONNECT_REQUEST = 8,
	/*!
	 * \details
	 *   incoming call proceeding (U9):
	 *     This state exists for an incoming call when the user has sent
	 *     acknowledgement that the user has received all call information
	 *     necessary to effect call establishment.
	 * \details
	 *   incoming call proceeding (N9):
	 *     This state exists for an incoming call when the network has received
	 *     acknowledgement that the user has received all call information
	 *     necessary to effect call establishment.
	 */
	Q931_CALL_STATE_INCOMING_CALL_PROCEEDING = 9,
	/*!
	 * \details
	 *   active (U10):
	 *     This state exists for an incoming call when the user has received
	 *     an acknowledgement from the network that the user has been awarded
	 *     the call. This state exists for an outgoing call when the user has
	 *     received an indication that the remote user has answered the call.
	 * \details
	 *   active (N10):
	 *     This state exists for an incoming call when the network has awarded
	 *     the call to the called user. This state exists for an outgoing call
	 *     when the network has indicated that the remote user has answered
	 *     the call.
	 */
	Q931_CALL_STATE_ACTIVE = 10,
	/*!
	 * \details
	 *   disconnect request (U11):
	 *     This state exists when the user has requested the network to clear
	 *     the end-to-end connection (if any) and is waiting for a response.
	 * \details
	 *   disconnect request (N11):
	 *     This state exists when the network has received a request from the
	 *     user to clear the end-to-end connection (if any).
	 */
	Q931_CALL_STATE_DISCONNECT_REQUEST = 11,
	/*!
	 * \details
	 *   disconnect indication (U12):
	 *     This state exists when the user has received an invitation to
	 *     disconnect because the network has disconnected the end-to-end
	 *     connection (if any).
	 * \details
	 *   disconnect indication (N12):
	 *     This state exists when the network has disconnected the end-to-end
	 *     connection (if any) and has sent an invitation to disconnect the
	 *     user-network connection.
	 */
	Q931_CALL_STATE_DISCONNECT_INDICATION = 12,
	/*!
	 * \details
	 *   suspend request (U15):
	 *     This state exists when the user has requested the network to suspend
	 *     the call and is waiting for a response.
	 * \details
	 *   suspend request (N15):
	 *     This state exists when the network has received a request to suspend
	 *     the call but has not yet responded.
	 */
	Q931_CALL_STATE_SUSPEND_REQUEST = 15,
	/*!
	 * \details
	 *   resume request (U17):
	 *     This state exists when the user has requested the network to resume
	 *     a previously suspended call and is waiting for a response.
	 * \details
	 *   resume request (N17):
	 *     This state exists when the network has received a request to resume
	 *     a previously suspended call but has not yet responded.
	 */
	Q931_CALL_STATE_RESUME_REQUEST = 17,
	/*!
	 * \details
	 *   release request (U19):
	 *     This state exists when the user has requested the network to release
	 *     and is waiting for a response.
	 * \details
	 *   release request (N19):
	 *     This state exists when the network has requested the user to release
	 *     and is waiting for a response.
	 */
	Q931_CALL_STATE_RELEASE_REQUEST = 19,
	/*!
	 * \details
	 *   call abort (N22):
	 *     This state exists for an incoming call for the point-to-multipoint
	 *     configuration when the call is being cleared before any user has been
	 *     awarded the call.
	 */
	Q931_CALL_STATE_CALL_ABORT = 22,
	/*!
	 * \details
	 *   overlap receiving (U25):
	 *     This state exists for an incoming call when the user has acknowledged
	 *     the call establishment request from the network and is prepared to
	 *     receive additional call information (if any) in overlap mode.
	 * \details
	 *   overlap receiving (N25):
	 *     This state exists for an incoming call when the network has received
	 *     acknowledgement of the call establishment request which permits the
	 *     network to send additional call information (if any) in the overlap
	 *     mode.
	 */
	Q931_CALL_STATE_OVERLAP_RECEIVING = 25,
	/*!
	 * \details
	 *   call independent service (U31): (From Q.932)
	 *     This state exists when a call independent supplementary service
	 *     signalling connection is established.
	 * \details
	 *   call independent service (N31): (From Q.932)
	 *     This state exists when a call independent supplementary service
	 *     signalling connection is established.
	 */
	Q931_CALL_STATE_CALL_INDEPENDENT_SERVICE = 31,
	Q931_CALL_STATE_RESTART_REQUEST = 61,
	Q931_CALL_STATE_RESTART = 62,
Richard Mudgett's avatar
Richard Mudgett committed
422 423 424 425 426 427 428 429
	/*!
	 * \details
	 * Call state has not been set.
	 * Call state does not exist.
	 * Call state not initialized.
	 * Call state internal use only.
	 */
	Q931_CALL_STATE_NOT_SET = 0xFF,
430
};
431

432 433 434 435 436 437 438 439 440 441 442 443 444 445
/*! Q.931 call establishment state ranking for competing calls in PTMP NT mode. */
enum Q931_RANKED_CALL_STATE {
	/*! Call is present but has no response yet. */
	Q931_RANKED_CALL_STATE_PRESENT,
	/*! Call is collecting digits. */
	Q931_RANKED_CALL_STATE_OVERLAP,
	/*! Call routing is happening. */
	Q931_RANKED_CALL_STATE_PROCEEDING,
	/*! Called party is being alerted of the call. */
	Q931_RANKED_CALL_STATE_ALERTING,
	/*! Call is connected.  A winner has been declared. */
	Q931_RANKED_CALL_STATE_CONNECT,
	/*! Call is in some non-call establishment state (likely disconnecting). */
	Q931_RANKED_CALL_STATE_OTHER,
446 447
	/*! Master call is aborting. */
	Q931_RANKED_CALL_STATE_ABORT,
448 449
};

Mark Spencer's avatar
Mark Spencer committed
450
/* EuroISDN  */
451
#define Q931_SENDING_COMPLETE		0xa1
Mark Spencer's avatar
Mark Spencer committed
452

453 454
extern int maintenance_service(struct pri *pri, int span, int channel, int changestatus);

455 456 457 458

/* Q.SIG specific */
#define QSIG_IE_TRANSIT_COUNT		0x31

459
int q931_receive(struct q921_link *link, q931_h *h, int len);
Mark Spencer's avatar
Mark Spencer committed
460 461 462

extern int q931_alerting(struct pri *pri, q931_call *call, int channel, int info);

463 464
extern int q931_call_progress_with_cause(struct pri *pri, q931_call *call, int channel, int info, int cause);

465
extern int q931_call_progress(struct pri *pri, q931_call *call, int channel, int info);
466

467 468
extern int q931_notify(struct pri *pri, q931_call *call, int channel, int info);

469
extern int q931_call_proceeding(struct pri *pri, q931_call *call, int channel, int info);
Mark Spencer's avatar
Mark Spencer committed
470

471
extern int q931_setup_ack(struct pri *ctrl, q931_call *c, int channel, int nonisdn, int inband);
472

473 474
extern int q931_information(struct pri *pri, q931_call *call, char digit);

475
extern int q931_keypad_facility(struct pri *pri, q931_call *call, const char *digits);
476

Mark Spencer's avatar
Mark Spencer committed
477
extern int q931_connect(struct pri *pri, q931_call *call, int channel, int nonisdn);
478
int q931_connect_acknowledge(struct pri *ctrl, q931_call *call, int channel);
Mark Spencer's avatar
Mark Spencer committed
479 480 481 482 483

extern int q931_release(struct pri *pri, q931_call *call, int cause);

extern int q931_disconnect(struct pri *pri, q931_call *call, int cause);

484 485
extern int q931_hangup(struct pri *pri, q931_call *call, int cause);

Mark Spencer's avatar
Mark Spencer committed
486 487
extern int q931_restart(struct pri *pri, int channel);

488 489
extern int q931_facility(struct pri *pri, q931_call *call);

490 491 492 493
extern int q931_call_getcrv(struct pri *pri, q931_call *call, int *callmode);

extern int q931_call_setcrv(struct pri *pri, q931_call *call, int crv, int callmode);

494
struct q931_call *q931_new_call(struct pri *ctrl);
Mark Spencer's avatar
Mark Spencer committed
495

496
extern int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req);
497 498 499

int q931_register(struct pri *ctrl, q931_call *call);

500
void q931_dump(struct pri *ctrl, int tei, q931_h *h, int len, int txrx);
Martin Pycko's avatar
Martin Pycko committed
501

502
void q931_destroycall(struct pri *pri, q931_call *c);
503

504 505 506 507 508 509 510 511
enum Q931_DL_EVENT {
	Q931_DL_EVENT_NONE,
	Q931_DL_EVENT_DL_ESTABLISH_IND,
	Q931_DL_EVENT_DL_ESTABLISH_CONFIRM,
	Q931_DL_EVENT_DL_RELEASE_IND,
	Q931_DL_EVENT_DL_RELEASE_CONFIRM,
	Q931_DL_EVENT_TEI_REMOVAL,
};
512
void q931_dl_event(struct q921_link *link, enum Q931_DL_EVENT event);
513

514 515 516 517 518 519 520 521
int q931_send_hold(struct pri *ctrl, struct q931_call *call);
int q931_send_hold_ack(struct pri *ctrl, struct q931_call *call);
int q931_send_hold_rej(struct pri *ctrl, struct q931_call *call, int cause);

int q931_send_retrieve(struct pri *ctrl, struct q931_call *call, int channel);
int q931_send_retrieve_ack(struct pri *ctrl, struct q931_call *call, int channel);
int q931_send_retrieve_rej(struct pri *ctrl, struct q931_call *call, int cause);

Mark Spencer's avatar
Mark Spencer committed
522
#endif