[libpri-commits] rmudgett: branch 1.4 r1220 - /branches/1.4/q931.c
SVN commits to the libpri project
libpri-commits at lists.digium.com
Mon Oct 19 17:50:03 CDT 2009
Author: rmudgett
Date: Mon Oct 19 17:49:59 2009
New Revision: 1220
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1220
Log:
Fix call state ie transmission.
Sending a STATUS message failed to include the call state ie for some
reason. We will now always send a call state ie when a message ie list
includes one.
Modified:
branches/1.4/q931.c
Modified: branches/1.4/q931.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q931.c?view=diff&rev=1220&r1=1219&r2=1220
==============================================================================
--- branches/1.4/q931.c (original)
+++ branches/1.4/q931.c Mon Oct 19 17:49:59 2009
@@ -2120,11 +2120,34 @@
}
static int transmit_call_state(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len, int order)
{
- if (call->ourcallstate > -1 ) {
+ ie->data[0] = Q931_CALL_STATE_NULL;
+ switch (call->ourcallstate) {
+ case Q931_CALL_STATE_NULL:
+ case Q931_CALL_STATE_CALL_INITIATED:
+ case Q931_CALL_STATE_OVERLAP_SENDING:
+ case Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING:
+ case Q931_CALL_STATE_CALL_DELIVERED:
+ case Q931_CALL_STATE_CALL_PRESENT:
+ case Q931_CALL_STATE_CALL_RECEIVED:
+ case Q931_CALL_STATE_CONNECT_REQUEST:
+ case Q931_CALL_STATE_INCOMING_CALL_PROCEEDING:
+ case Q931_CALL_STATE_ACTIVE:
+ case Q931_CALL_STATE_DISCONNECT_REQUEST:
+ case Q931_CALL_STATE_DISCONNECT_INDICATION:
+ case Q931_CALL_STATE_SUSPEND_REQUEST:
+ case Q931_CALL_STATE_RESUME_REQUEST:
+ case Q931_CALL_STATE_RELEASE_REQUEST:
+ case Q931_CALL_STATE_CALL_ABORT:
+ case Q931_CALL_STATE_OVERLAP_RECEIVING:
+ case Q931_CALL_STATE_CALL_INDEPENDENT_SERVICE:
+ case Q931_CALL_STATE_RESTART_REQUEST:
+ case Q931_CALL_STATE_RESTART:
ie->data[0] = call->ourcallstate;
- return 3;
- }
- return 0;
+ break;
+ case Q931_CALL_STATE_NOT_SET:
+ break;
+ }
+ return 3;
}
static int receive_call_state(int full_ie, struct pri *ctrl, q931_call *call, int msgtype, q931_ie *ie, int len)
More information about the libpri-commits
mailing list