Changeset 728
Update libpri with latest changes.
Committed by:
brian
Date:
Oct 28 2005 * 20:59 (over 2 years ago)
Affected files:
libpri/trunk/Makefile.in (diff)
libpri/trunk/libpri.h (diff)
libpri/trunk/pri.c (diff)
libpri/trunk/pri_internal.h (diff)
libpri/trunk/q931.c (diff)
libpri/trunk/Makefile.in (unified diff)
| r234 | r728 | |
|---|---|---|
| 15 | 15 | @SET_MAKE@ |
| 16 | 16 | |
| 17 | 17 | |
| 18 | ||
| 19 | 18 | srcdir = @srcdir@ |
| 20 | 19 | top_srcdir = @top_srcdir@ |
| 21 | 20 | VPATH = @srcdir@ |
| --- | --- | |
| 58 | 57 | *) f=$$p;; \ |
| 59 | 58 | esac; |
| 60 | 59 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; |
| 61 | am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" \ | |
| 60 | am__installdirs = "$(DESTDIR)$(libdir)" \ | |
| 62 | 61 | "$(DESTDIR)$(library_includedir)" |
| 63 | libLIBRARIES_INSTALL = $(INSTALL_DATA) | |
| 64 | LIBRARIES = $(lib_LIBRARIES) | |
| 65 | ARFLAGS = cru | |
| 66 | libpri_a_AR = $(AR) $(ARFLAGS) | |
| 67 | libpri_a_LIBADD = | |
| 68 | am_libpri_a_OBJECTS = | |
| 69 | libpri_a_OBJECTS = $(am_libpri_a_OBJECTS) | |
| 70 | 62 | libLTLIBRARIES_INSTALL = $(INSTALL) |
| 71 | 63 | LTLIBRARIES = $(lib_LTLIBRARIES) |
| 72 | 64 | libpri_la_LIBADD = |
| 73 | am__objects_1 = libpri_la-copy_string.lo libpri_la-pri.lo \ | |
| 65 | am_libpri_la_OBJECTS = libpri_la-copy_string.lo libpri_la-pri.lo \ | |
| 74 | 66 | libpri_la-pri_facility.lo libpri_la-prisched.lo \ |
| 75 | 67 | libpri_la-q921.lo libpri_la-q931.lo |
| 76 | am_libpri_la_OBJECTS = $(am__objects_1) | |
| 77 | 68 | libpri_la_OBJECTS = $(am_libpri_la_OBJECTS) |
| 78 | 69 | DEFAULT_INCLUDES = -I. -I$(srcdir) |
| 79 | 70 | depcomp = $(SHELL) $(top_srcdir)/depcomp |
| --- | --- | |
| 86 | 77 | CCLD = $(CC) |
| 87 | 78 | LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ |
| 88 | 79 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ |
| 89 | SOURCES = $(libpri_a_SOURCES) $(libpri_la_SOURCES) | |
| 90 | DIST_SOURCES = $(libpri_a_SOURCES) $(libpri_la_SOURCES) | |
| 80 | SOURCES = $(libpri_la_SOURCES) | |
| 81 | DIST_SOURCES = $(libpri_la_SOURCES) | |
| 91 | 82 | library_includeHEADERS_INSTALL = $(INSTALL_HEADER) |
| 92 | 83 | HEADERS = $(library_include_HEADERS) |
| 93 | 84 | ETAGS = etags |
| --- | --- | |
| 199 | 190 | sharedstatedir = @sharedstatedir@ |
| 200 | 191 | sysconfdir = @sysconfdir@ |
| 201 | 192 | target_alias = @target_alias@ |
| 202 | AM_CFLAGS = -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g | |
| 203 | LIB_SOURCES = copy_string.c pri.c pri_facility.c prisched.c q921.c q931.c \ | |
| 193 | AUTOMAKE_OPTS = gnu | |
| 194 | libpri_la_SOURCES = copy_string.c pri.c pri_facility.c prisched.c q921.c q931.c \ | |
| 204 | 195 | compat.h compiler.h libpri.h pri_facility.h pri_internal.h pri_q921.h pri_q931.h pri_timers.h |
| 205 | 196 | |
| 206 | 197 | library_includedir = $(includedir) |
| 207 | 198 | library_include_HEADERS = libpri.h pri_internal.h |
| 208 | 199 | lib_LTLIBRARIES = libpri.la |
| 209 | libpri_la_CFLAGS = $(AM_CFLAGS) | |
| 200 | libpri_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g | |
| 210 | 201 | libpri_la_LDFLAGS = -version-info 1:0:0 |
| 211 | libpri_la_SOURCES = $(LIB_SOURCES) | |
| 212 | lib_LIBRARIES = libpri.a | |
| 213 | libpri_a_CFLAGS = $(AM_CFLAGS) | |
| 214 | libpri_a_SOURCES = $(LIB_SOUCES) | |
| 215 | 202 | all: all-am |
| 216 | 203 | |
| 217 | 204 | .SUFFIXES: |
| --- | --- | |
| 249 | 236 | cd $(srcdir) && $(AUTOCONF) |
| 250 | 237 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) |
| 251 | 238 | cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) |
| 252 | install-libLIBRARIES: $(lib_LIBRARIES) | |
| 253 | @$(NORMAL_INSTALL) | |
| 254 | test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" | |
| 255 | @list='$(lib_LIBRARIES)'; for p in $$list; do \ | |
| 256 | if test -f $$p; then \ | |
| 257 | f=$(am__strip_dir) \ | |
| 258 | echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ | |
| 259 | $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ | |
| 260 | else :; fi; \ | |
| 261 | done | |
| 262 | @$(POST_INSTALL) | |
| 263 | @list='$(lib_LIBRARIES)'; for p in $$list; do \ | |
| 264 | if test -f $$p; then \ | |
| 265 | p=$(am__strip_dir) \ | |
| 266 | echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ | |
| 267 | $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ | |
| 268 | else :; fi; \ | |
| 269 | done | |
| 270 | ||
| 271 | uninstall-libLIBRARIES: | |
| 272 | @$(NORMAL_UNINSTALL) | |
| 273 | @list='$(lib_LIBRARIES)'; for p in $$list; do \ | |
| 274 | p=$(am__strip_dir) \ | |
| 275 | echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ | |
| 276 | rm -f "$(DESTDIR)$(libdir)/$$p"; \ | |
| 277 | done | |
| 278 | ||
| 279 | clean-libLIBRARIES: | |
| 280 | -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) | |
| 281 | libpri.a: $(libpri_a_OBJECTS) $(libpri_a_DEPENDENCIES) | |
| 282 | -rm -f libpri.a | |
| 283 | $(libpri_a_AR) libpri.a $(libpri_a_OBJECTS) $(libpri_a_LIBADD) | |
| 284 | $(RANLIB) libpri.a | |
| 285 | 239 | install-libLTLIBRARIES: $(lib_LTLIBRARIES) |
| 286 | 240 | @$(NORMAL_INSTALL) |
| 287 | 241 | test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" |
| --- | --- | |
| 591 | 545 | exit 1; } >&2 |
| 592 | 546 | check-am: all-am |
| 593 | 547 | check: check-am |
| 594 | all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) | |
| 548 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) | |
| 595 | 549 | installdirs: |
| 596 | for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ | |
| 550 | for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ | |
| 597 | 551 | test -z "$$dir" || $(mkdir_p) "$$dir"; \ |
| 598 | 552 | done |
| 599 | 553 | install: install-am |
| --- | --- | |
| 622 | 576 | @echo "it deletes files that may require special tools to rebuild." |
| 623 | 577 | clean: clean-am |
| 624 | 578 | |
| 625 | clean-am: clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ | |
| 626 | clean-libtool mostlyclean-am | |
| 579 | clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ | |
| 580 | mostlyclean-am | |
| 627 | 581 | |
| 628 | 582 | distclean: distclean-am |
| 629 | 583 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) |
| --- | --- | |
| 644 | 598 | |
| 645 | 599 | install-data-am: install-library_includeHEADERS |
| 646 | 600 | |
| 647 | install-exec-am: install-libLIBRARIES install-libLTLIBRARIES | |
| 601 | install-exec-am: install-libLTLIBRARIES | |
| 648 | 602 | |
| 649 | 603 | install-info: install-info-am |
| 650 | 604 | |
| --- | --- | |
| 672 | 626 | |
| 673 | 627 | ps-am: |
| 674 | 628 | |
| 675 | uninstall-am: uninstall-info-am uninstall-libLIBRARIES \ | |
| 676 | uninstall-libLTLIBRARIES uninstall-library_includeHEADERS | |
| 629 | uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ | |
| 630 | uninstall-library_includeHEADERS | |
| 677 | 631 | |
| 678 | 632 | .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ |
| 679 | clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ | |
| 680 | clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ | |
| 681 | dist-shar dist-tarZ dist-zip distcheck distclean \ | |
| 682 | distclean-compile distclean-generic distclean-libtool \ | |
| 683 | distclean-tags distcleancheck distdir distuninstallcheck dvi \ | |
| 684 | dvi-am html html-am info info-am install install-am \ | |
| 685 | install-data install-data-am install-exec install-exec-am \ | |
| 686 | install-info install-info-am install-libLIBRARIES \ | |
| 633 | clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ | |
| 634 | dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ | |
| 635 | distcheck distclean distclean-compile distclean-generic \ | |
| 636 | distclean-libtool distclean-tags distcleancheck distdir \ | |
| 637 | distuninstallcheck dvi dvi-am html html-am info info-am \ | |
| 638 | install install-am install-data install-data-am install-exec \ | |
| 639 | install-exec-am install-info install-info-am \ | |
| 687 | 640 | install-libLTLIBRARIES install-library_includeHEADERS \ |
| 688 | 641 | install-man install-strip installcheck installcheck-am \ |
| 689 | 642 | installdirs maintainer-clean maintainer-clean-generic \ |
| 690 | 643 | mostlyclean mostlyclean-compile mostlyclean-generic \ |
| 691 | 644 | mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ |
| 692 | uninstall-am uninstall-info-am uninstall-libLIBRARIES \ | |
| 693 | uninstall-libLTLIBRARIES uninstall-library_includeHEADERS | |
| 645 | uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \ | |
| 646 | uninstall-library_includeHEADERS | |
| 694 | 647 | |
| 695 | 648 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
| 696 | 649 | # Otherwise a system limit (for SysV at least) may be exceeded. |
libpri/trunk/libpri.h (unified diff)
| r196 | r728 | |
|---|---|---|
| 274 | 274 | int progress; |
| 275 | 275 | int progressmask; |
| 276 | 276 | q931_call *call; |
| 277 | char useruserinfo[260]; /* User->User info */ | |
| 277 | 278 | } pri_event_ringing; |
| 278 | 279 | |
| 279 | 280 | typedef struct pri_event_answer { |
| --- | --- | |
| 283 | 284 | int progress; |
| 284 | 285 | int progressmask; |
| 285 | 286 | q931_call *call; |
| 287 | char useruserinfo[260]; /* User->User info */ | |
| 286 | 288 | } pri_event_answer; |
| 287 | 289 | |
| 288 | 290 | typedef struct pri_event_facname { |
| --- | --- | |
| 312 | 314 | char redirectingname[256]; /* Redirecting name */ |
| 313 | 315 | int redirectingreason; /* Reason for redirect */ |
| 314 | 316 | int callingplanrdnis; /* Dialing plan of Redirecting Number */ |
| 315 | char useruserinfo[256]; /* User->User info */ | |
| 317 | char useruserinfo[260]; /* User->User info */ | |
| 316 | 318 | int flexible; /* Are we flexible with our channel selection? */ |
| 317 | 319 | int cref; /* Call Reference Number */ |
| 318 | 320 | int ctype; /* Call type (see PRI_TRANS_CAP_* */ |
| --- | --- | |
| 335 | 337 | int cref; |
| 336 | 338 | q931_call *call; /* Opaque call pointer */ |
| 337 | 339 | long aoc_units; /* Advise of Charge number of charged units */ |
| 340 | char useruserinfo[260]; /* User->User info */ | |
| 338 | 341 | } pri_event_hangup; |
| 339 | 342 | |
| 340 | 343 | typedef struct pri_event_restart_ack { |
| --- | --- | |
| 519 | 522 | extern int pri_sr_set_called(struct pri_sr *sr, char *called, int calledplan, int complete); |
| 520 | 523 | extern int pri_sr_set_caller(struct pri_sr *sr, char *caller, char *callername, int callerplan, int callerpres); |
| 521 | 524 | extern int pri_sr_set_redirecting(struct pri_sr *sr, char *num, int plan, int pres, int reason); |
| 525 | #define PRI_USER_USER_TX | |
| 526 | /* Set the user user field. Warning! don't send binary data accross this field */ | |
| 527 | extern void pri_sr_set_useruser(struct pri_sr *sr, char *userchars); | |
| 522 | 528 | |
| 529 | extern void pri_call_set_useruser(q931_call *sr, char *userchars); | |
| 530 | ||
| 523 | 531 | extern int pri_setup(struct pri *pri, q931_call *call, struct pri_sr *req); |
| 524 | 532 | |
| 525 | 533 | /* Set a call has a call indpendent signalling connection (i.e. no bchan) */ |
libpri/trunk/pri.c (unified diff)
| r196 | r728 | |
|---|---|---|
| 247 | 247 | return p; |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | void pri_call_set_useruser(q931_call *c, char *userchars) | |
| 251 | { | |
| 252 | if (userchars) | |
| 253 | libpri_copy_string(c->useruserinfo, userchars, sizeof(c->useruserinfo)); | |
| 254 | } | |
| 255 | ||
| 256 | void pri_sr_set_useruser(struct pri_sr *sr, char *userchars) | |
| 257 | { | |
| 258 | sr->useruserinfo = userchars; | |
| 259 | } | |
| 260 | ||
| 250 | 261 | int pri_restart(struct pri *pri) |
| 251 | 262 | { |
| 252 | 263 | /* Restart Q.921 layer */ |
libpri/trunk/pri_internal.h (unified diff)
| r196 | r728 | |
|---|---|---|
| 129 | 129 | int redirectingpres; |
| 130 | 130 | int redirectingreason; |
| 131 | 131 | int justsignalling; |
| 132 | char *useruserinfo; | |
| 132 | 133 | }; |
| 133 | 134 | |
| 134 | 135 | /* Internal switch types */ |
libpri/trunk/q931.c (unified diff)
| r196 | r728 | |
|---|---|---|
| 969 | 969 | return 0; |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | static FUNC_SEND(transmit_user_user) | |
| 973 | { | |
| 974 | int datalen = strlen(call->useruserinfo); | |
| 975 | if (datalen > 0) { | |
| 976 | /* Restricted to 35 characters */ | |
| 977 | if (msgtype == Q931_USER_INFORMATION) { | |
| 978 | if (datalen > 260) | |
| 979 | datalen = 260; | |
| 980 | } else { | |
| 981 | if (datalen > 35) | |
| 982 | datalen = 35; | |
| 983 | } | |
| 984 | ie->data[0] = 4; /* IA5 characters */ | |
| 985 | memcpy(&ie->data[1], call->useruserinfo, datalen); | |
| 986 | call->useruserinfo[0] = '\0'; | |
| 987 | return datalen + 3; | |
| 988 | } | |
| 989 | ||
| 990 | return 0; | |
| 991 | } | |
| 992 | ||
| 972 | 993 | static char *prog2str(int prog) |
| 973 | 994 | { |
| 974 | 995 | static struct msgtype progs[] = { |
| --- | --- | |
| 1927 | 1948 | { 1, Q931_IE_KEYPAD_FACILITY, "Keypad Facility", dump_keypad_facility, receive_keypad_facility }, |
| 1928 | 1949 | { 0, Q931_IE_SIGNAL, "Signal", dump_signal }, |
| 1929 | 1950 | { 1, Q931_IE_SWITCHHOOK, "Switch-hook" }, |
| 1930 | { 1, Q931_IE_USER_USER, "User-User", dump_user_user, receive_user_user }, | |
| 1951 | { 1, Q931_IE_USER_USER, "User-User", dump_user_user, receive_user_user, transmit_user_user }, | |
| 1931 | 1952 | { 1, Q931_IE_ESCAPE_FOR_EXT, "Escape for Extension" }, |
| 1932 | 1953 | { 1, Q931_IE_CALL_STATUS, "Call Status" }, |
| 1933 | 1954 | { 1, Q931_IE_CHANGE_STATUS, "Change Status" }, |
| --- | --- | |
| 2504 | 2525 | return send_message(pri, c, Q931_CALL_PROCEEDING, call_proceeding_ies); |
| 2505 | 2526 | } |
| 2506 | 2527 | #ifndef ALERTING_NO_PROGRESS |
| 2507 | static int alerting_ies[] = { Q931_PROGRESS_INDICATOR, -1 }; | |
| 2528 | static int alerting_ies[] = { Q931_PROGRESS_INDICATOR, Q931_IE_USER_USER, -1 }; | |
| 2508 | 2529 | #else |
| 2509 | 2530 | static int alerting_ies[] = { -1 }; |
| 2510 | 2531 | #endif |
| --- | --- | |
| 2627 | 2648 | return send_message(pri, c, Q931_CONNECT, connect_ies); |
| 2628 | 2649 | } |
| 2629 | 2650 | |
| 2630 | static int release_ies[] = { Q931_CAUSE, -1 }; | |
| 2651 | static int release_ies[] = { Q931_CAUSE, Q931_IE_USER_USER, -1 }; | |
| 2631 | 2652 | |
| 2632 | 2653 | int q931_release(struct pri *pri, q931_call *c, int cause) |
| 2633 | 2654 | { |
| --- | --- | |
| 2675 | 2696 | return send_message(pri, c, Q931_RESTART, restart_ies); |
| 2676 | 2697 | } |
| 2677 | 2698 | |
| 2678 | static int disconnect_ies[] = { Q931_CAUSE, -1 }; | |
| 2699 | static int disconnect_ies[] = { Q931_CAUSE, Q931_IE_USER_USER, -1 }; | |
| 2679 | 2700 | |
| 2680 | 2701 | int q931_disconnect(struct pri *pri, q931_call *c, int cause) |
| 2681 | 2702 | { |
| --- | --- | |
| 2695 | 2716 | return 0; |
| 2696 | 2717 | } |
| 2697 | 2718 | |
| 2698 | static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY, | |
| 2719 | static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY, Q931_IE_USER_USER, | |
| 2699 | 2720 | Q931_CALLING_PARTY_NUMBER, Q931_CALLED_PARTY_NUMBER, Q931_REDIRECTING_NUMBER, Q931_SENDING_COMPLETE, Q931_IE_ORIGINATING_LINE_INFO, Q931_IE_GENERIC_DIGITS, -1 }; |
| 2700 | 2721 | |
| 2701 | 2722 | static int gr303_setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, -1 }; |
| --- | --- | |
| 2773 | 2794 | } else |
| 2774 | 2795 | return -1; |
| 2775 | 2796 | |
| 2797 | if (req->useruserinfo) | |
| 2798 | libpri_copy_string(c->useruserinfo, req->useruserinfo, sizeof(c->useruserinfo)); | |
| 2799 | ||
| 2776 | 2800 | if (req->nonisdn && (pri->switchtype == PRI_SWITCH_NI2)) |
| 2777 | 2801 | c->progressmask = PRI_PROG_CALLER_NOT_ISDN; |
| 2778 | 2802 | else |
| --- | --- | |
| 2797 | 2821 | |
| 2798 | 2822 | } |
| 2799 | 2823 | |
| 2800 | static int release_complete_ies[] = { -1 }; | |
| 2824 | static int release_complete_ies[] = { Q931_IE_USER_USER, -1 }; | |
| 2801 | 2825 | |
| 2802 | 2826 | static int q931_release_complete(struct pri *pri, q931_call *c, int cause) |
| 2803 | 2827 | { |
| --- | --- | |
| 3018 | 3042 | case Q931_CONNECT: |
| 3019 | 3043 | case Q931_ALERTING: |
| 3020 | 3044 | case Q931_PROGRESS: |
| 3045 | c->useruserinfo[0] = '\0'; | |
| 3021 | 3046 | c->cause = -1; |
| 3022 | 3047 | case Q931_CALL_PROCEEDING: |
| 3023 | 3048 | c->progress = -1; |
| --- | --- | |
| 3037 | 3062 | if (c->retranstimer) |
| 3038 | 3063 | pri_schedule_del(pri, c->retranstimer); |
| 3039 | 3064 | c->retranstimer = 0; |
| 3065 | c->useruserinfo[0] = '\0'; | |
| 3040 | 3066 | break; |
| 3041 | 3067 | case Q931_RELEASE_COMPLETE: |
| 3042 | 3068 | if (c->retranstimer) |
| 3043 | 3069 | pri_schedule_del(pri, c->retranstimer); |
| 3044 | 3070 | c->retranstimer = 0; |
| 3071 | c->useruserinfo[0] = '\0'; | |
| 3045 | 3072 | case Q931_STATUS: |
| 3046 | 3073 | c->cause = -1; |
| 3047 | 3074 | c->causecode = -1; |
| --- | --- | |
| 3225 | 3252 | libpri_copy_string(pri->ev.ring.redirectingnum, c->redirectingnum, sizeof(pri->ev.ring.redirectingnum)); |
| 3226 | 3253 | libpri_copy_string(pri->ev.ring.redirectingname, c->redirectingname, sizeof(pri->ev.ring.redirectingname)); |
| 3227 | 3254 | libpri_copy_string(pri->ev.ring.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo)); |
| 3255 | c->useruserinfo[0] = '\0'; | |
| 3228 | 3256 | pri->ev.ring.redirectingreason = c->redirectingreason; |
| 3229 | 3257 | pri->ev.ring.origredirectingreason = c->origredirectingreason; |
| 3230 | 3258 | pri->ev.ring.flexible = ! (c->chanflags & FLAG_EXCLUSIVE); |
| --- | --- | |
| 3250 | 3278 | pri->ev.ringing.call = c; |
| 3251 | 3279 | pri->ev.ringing.progress = c->progress; |
| 3252 | 3280 | pri->ev.ringing.progressmask = c->progressmask; |
| 3281 | libpri_copy_string(pri->ev.ringing.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo)); | |
| 3282 | c->useruserinfo[0] = '\0'; | |
| 3253 | 3283 | return Q931_RES_HAVEEVENT; |
| 3254 | 3284 | case Q931_CONNECT: |
| 3255 | 3285 | if (c->newcall) { |
| --- | --- | |
| 3268 | 3298 | pri->ev.answer.call = c; |
| 3269 | 3299 | pri->ev.answer.progress = c->progress; |
| 3270 | 3300 | pri->ev.answer.progressmask = c->progressmask; |
| 3301 | libpri_copy_string(pri->ev.answer.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo)); | |
| 3302 | c->useruserinfo[0] = '\0'; | |
| 3271 | 3303 | q931_connect_acknowledge(pri, c); |
| 3272 | 3304 | if (c->justsignalling) { /* Make sure WE release when we initiatie a signalling only connection */ |
| 3273 | 3305 | q931_release(pri, c, PRI_CAUSE_NORMAL_CLEARING); |
| --- | --- | |
| 3381 | 3413 | pri->ev.hangup.cref = c->cr; |
| 3382 | 3414 | pri->ev.hangup.cause = c->cause; |
| 3383 | 3415 | pri->ev.hangup.call = c; |
| 3416 | libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo)); | |
| 3417 | c->useruserinfo[0] = '\0'; | |
| 3384 | 3418 | /* Free resources */ |
| 3385 | 3419 | if (c->alive) { |
| 3386 | 3420 | pri->ev.e = PRI_EVENT_HANGUP; |
| --- | --- | |
| 3414 | 3448 | pri->ev.hangup.cause = c->cause; |
| 3415 | 3449 | pri->ev.hangup.call = c; |
| 3416 | 3450 | pri->ev.hangup.aoc_units = c->aoc_units; |
| 3451 | libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo)); | |
| 3452 | c->useruserinfo[0] = '\0'; | |
| 3417 | 3453 | /* Don't send release complete if they send us release |
| 3418 | 3454 | while we sent it, assume a NULL state */ |
| 3419 | 3455 | if (c->newcall) |
![Home changeset 728 [home]](/images/logo.png?1180520111)
RSS Feeds