[libpri-commits] rmudgett: tag 1.4.11.2 r1815 - /tags/1.4.11.2/pri_facility.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Mon Jun 7 10:54:59 CDT 2010


Author: rmudgett
Date: Mon Jun  7 10:54:55 2010
New Revision: 1815

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1815
Log:
Merged revision 1810 from
https://origsvn.digium.com/svn/libpri/branches/1.4

..........
  r1810 | rmudgett | 2010-06-04 17:45:59 -0500 (Fri, 04 Jun 2010) | 13 lines

  Q.SIG calling name in FACILITY message not reported to the upper layer.

  Q.SIG can send the CallingName, CalledName, and ConnectedName in stand
  alone FACILITY messages.  If the CallingName was not sent in the SETUP
  message, the caller id name was not reported to the upper layer.

  (closes issue #17458)
  Reported by: jsmith
  Patches:
      issue17458_post_qsig_name.patch uploaded by rmudgett (license 664)
      issue17458_post_qsig_name_v1.4.11.1.patch uploaded by rmudgett (license 664)
  Tested by: rmudgett, jsmith

Modified:
    tags/1.4.11.2/pri_facility.c

Modified: tags/1.4.11.2/pri_facility.c
URL: http://svnview.digium.com/svn/libpri/tags/1.4.11.2/pri_facility.c?view=diff&rev=1815&r1=1814&r2=1815
==============================================================================
--- tags/1.4.11.2/pri_facility.c (original)
+++ tags/1.4.11.2/pri_facility.c Mon Jun  7 10:54:55 2010
@@ -3745,25 +3745,65 @@
 		/* CallingName is put in remote_id.name */
 		rose_copy_name_to_q931(ctrl, &call->remote_id.name,
 			&invoke->args.qsig.CallingName.name);
+
+		switch (msgtype) {
+		case Q931_SETUP:
+		case Q931_CONNECT:
+			/* The caller name will automatically be reported. */
+			break;
+		default:
+			/* Setup connected line subcommand */
+			subcmd = q931_alloc_subcommand(ctrl);
+			if (!subcmd) {
+				break;
+			}
+			subcmd->cmd = PRI_SUBCMD_CONNECTED_LINE;
+			q931_party_id_copy_to_pri(&subcmd->u.connected_line.id, &call->remote_id);
+			break;
+		}
 		break;
 	case ROSE_QSIG_CalledName:
 		/* CalledName is put in remote_id.name */
 		rose_copy_name_to_q931(ctrl, &call->remote_id.name,
 			&invoke->args.qsig.CalledName.name);
 
-		/* Setup connected line subcommand */
-		subcmd = q931_alloc_subcommand(ctrl);
-		if (!subcmd) {
+		switch (msgtype) {
+		case Q931_SETUP:
+		case Q931_CONNECT:
+			/* The called name will automatically be reported. */
 			pri_error(ctrl, "ERROR: Too many facility subcommands\n");
 			break;
-		}
-		subcmd->cmd = PRI_SUBCMD_CONNECTED_LINE;
-		q931_party_id_copy_to_pri(&subcmd->u.connected_line.id, &call->remote_id);
+		default:
+			/* Setup connected line subcommand */
+			subcmd = q931_alloc_subcommand(ctrl);
+			if (!subcmd) {
+				break;
+			}
+			subcmd->cmd = PRI_SUBCMD_CONNECTED_LINE;
+			q931_party_id_copy_to_pri(&subcmd->u.connected_line.id, &call->remote_id);
+			break;
+		}
 		break;
 	case ROSE_QSIG_ConnectedName:
 		/* ConnectedName is put in remote_id.name */
 		rose_copy_name_to_q931(ctrl, &call->remote_id.name,
 			&invoke->args.qsig.ConnectedName.name);
+
+		switch (msgtype) {
+		case Q931_SETUP:
+		case Q931_CONNECT:
+			/* The connected line name will automatically be reported. */
+			break;
+		default:
+			/* Setup connected line subcommand */
+			subcmd = q931_alloc_subcommand(ctrl);
+			if (!subcmd) {
+				break;
+			}
+			subcmd->cmd = PRI_SUBCMD_CONNECTED_LINE;
+			q931_party_id_copy_to_pri(&subcmd->u.connected_line.id, &call->remote_id);
+			break;
+		}
 		break;
 #if 0	/* Not handled yet */
 	case ROSE_QSIG_BusyName:




More information about the libpri-commits mailing list