[svn-commits] rmudgett: branch group/issue14068 r866 - /team/group/issue14068/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jun 12 09:41:26 CDT 2009
Author: rmudgett
Date: Fri Jun 12 09:41:23 2009
New Revision: 866
URL: http://svn.asterisk.org/svn-view/libpri?view=rev&rev=866
Log:
Merged revisions 865 via svnmerge from
https://origsvn.digium.com/svn/libpri/branches/1.4
........
r865 | rmudgett | 2009-06-12 09:29:42 -0500 (Fri, 12 Jun 2009) | 1 line
Miscellaneous minor changes.
........
Modified:
team/group/issue14068/ (props changed)
team/group/issue14068/pri_facility.c
Propchange: team/group/issue14068/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 12 09:41:23 2009
@@ -1,1 +1,1 @@
-/branches/1.4:1-860
+/branches/1.4:1-865
Modified: team/group/issue14068/pri_facility.c
URL: http://svn.asterisk.org/svn-view/libpri/team/group/issue14068/pri_facility.c?view=diff&rev=866&r1=865&r2=866
==============================================================================
--- team/group/issue14068/pri_facility.c (original)
+++ team/group/issue14068/pri_facility.c Fri Jun 12 09:41:23 2009
@@ -468,7 +468,7 @@
return value;
}
-static int presentation_to_subscription(struct pri *pri, int presentation)
+static int presentation_to_subscription(struct pri *ctrl, int presentation)
{
/* derive subscription value from presentation value */
@@ -480,7 +480,7 @@
case PRI_PRES_UNAVAILABLE: /* Number not available due to interworking */
return QSIG_NOTIFICATION_WITHOUT_DIVERTED_TO_NR; /* ?? QSIG_NO_NOTIFICATION */
default:
- pri_message(pri, "!! Unknown Q.SIG presentationIndicator 0x%02x\n",
+ pri_message(ctrl, "!! Unknown Q.SIG presentationIndicator 0x%02x\n",
presentation);
return QSIG_NOTIFICATION_WITHOUT_DIVERTED_TO_NR;
}
@@ -1004,6 +1004,7 @@
name->str, sizeof(msg.args.qsig.CallingName.name.data));
msg.args.qsig.CallingName.name.length =
strlen((char *) msg.args.qsig.CallingName.name.data);
+
pos = rose_encode_invoke(ctrl, pos, end, &msg);
return pos;
@@ -1434,13 +1435,13 @@
*
* Just need to resend the message to the other tromboned leg of the call.
*/
-static int anfpr_pathreplacement_respond(struct pri *pri, q931_call *call, q931_ie *ie)
+static int anfpr_pathreplacement_respond(struct pri *ctrl, q931_call *call, q931_ie *ie)
{
int res;
res = pri_call_apdu_queue_cleanup(call->bridged_call);
if (res) {
- pri_message(pri, "Could not Clear queue ADPU\n");
+ pri_message(ctrl, "Could not Clear queue ADPU\n");
return -1;
}
@@ -1449,7 +1450,7 @@
pri_call_apdu_queue(call->bridged_call, Q931_FACILITY, ie->data, ie->len, NULL,
NULL);
if (res) {
- pri_message(pri, "Could not queue ADPU in facility message\n");
+ pri_message(ctrl, "Could not queue ADPU in facility message\n");
return -1;
}
@@ -1458,7 +1459,7 @@
res = q931_facility(call->bridged_call->pri, call->bridged_call);
if (res) {
- pri_message(pri, "Could not schedule facility message for call %d\n",
+ pri_message(ctrl, "Could not schedule facility message for call %d\n",
call->bridged_call->cr);
return -1;
}
@@ -1958,15 +1959,17 @@
}
/*! \note Only called when sending the SETUP message. */
-int pri_call_add_standard_apdus(struct pri *pri, q931_call *call)
-{
- if (!pri->sendfacility)
+int pri_call_add_standard_apdus(struct pri *ctrl, q931_call *call)
+{
+ if (!ctrl->sendfacility) {
return 0;
-
- if (pri->switchtype == PRI_SWITCH_QSIG) {
+ }
+
+ switch (ctrl->switchtype) {
+ case PRI_SWITCH_QSIG:
/* For Q.SIG it does network and cpe operations */
if (call->redirecting.count) {
- rose_diverting_leg_information2_encode(pri, call);
+ rose_diverting_leg_information2_encode(ctrl, call);
/*
* Expect a DivertingLegInformation3 to update the COLR of the
@@ -1974,61 +1977,40 @@
*/
call->redirecting.state = Q931_REDIRECTING_STATE_EXPECTING_RX_DIV_LEG_3;
}
- add_callername_facility_ies(pri, call, 1);
- return 0;
- }
-
-#if 0
- if (pri->localtype == PRI_NETWORK) {
- switch (pri->switchtype) {
- case PRI_SWITCH_NI2:
- add_callername_facility_ies(pri, call, 0);
- break;
- default:
- break;
- }
- return 0;
- } else if (pri->localtype == PRI_CPE) {
- switch (pri->switchtype) {
- case PRI_SWITCH_NI2:
- add_callername_facility_ies(pri, call, 1);
- break;
- default:
- break;
- }
- return 0;
- }
-#else
- if (pri->switchtype == PRI_SWITCH_NI2)
- add_callername_facility_ies(pri, call, (pri->localtype == PRI_CPE));
-#endif
-
- if ((pri->switchtype == PRI_SWITCH_DMS100) && (pri->localtype == PRI_CPE)) {
- add_dms100_transfer_ability_apdu(pri, call);
- }
-
-
+ add_callername_facility_ies(ctrl, call, 1);
+ break;
+ case PRI_SWITCH_NI2:
+ add_callername_facility_ies(ctrl, call, (ctrl->localtype == PRI_CPE));
+ break;
+ case PRI_SWITCH_DMS100:
+ if (ctrl->localtype == PRI_CPE) {
+ add_dms100_transfer_ability_apdu(ctrl, call);
+ }
+ break;
+ default:
+ break;
+ }
return 0;
}
-int qsig_initiate_diverting_leg_information1(struct pri *pri, q931_call *call)
-{
- if (rose_diverting_leg_information1_encode(pri, call)
- || q931_facility(pri, call)) {
- pri_message(pri, "Could not schedule facility message for divertingLegInfo1\n");
+int qsig_initiate_diverting_leg_information1(struct pri *ctrl, q931_call *call)
+{
+ if (rose_diverting_leg_information1_encode(ctrl, call)
+ || q931_facility(ctrl, call)) {
+ pri_message(ctrl, "Could not schedule facility message for divertingLegInfo1\n");
return -1;
}
return 0;
}
-int qsig_initiate_call_transfer_complete(struct pri *pri, q931_call *call,
+int qsig_initiate_call_transfer_complete(struct pri *ctrl, q931_call *call,
int call_status)
{
- if (rose_call_transfer_complete_encode(pri, call, call_status)
- || q931_facility(pri, call)) {
- pri_message(pri,
+ if (rose_call_transfer_complete_encode(ctrl, call, call_status)
+ || q931_facility(ctrl, call)) {
+ pri_message(ctrl,
"Could not schedule facility message for callTransferComplete\n");
return -1;
}
More information about the svn-commits
mailing list