[asterisk-commits] rmudgett: branch rmudgett/misdn_facility r155172 - in /team/rmudgett/misdn_fa...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Nov 6 18:49:37 CST 2008
Author: rmudgett
Date: Thu Nov 6 18:49:37 2008
New Revision: 155172
URL: http://svn.digium.com/view/asterisk?view=rev&rev=155172
Log:
Merged revision 155170 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.2...
..........
r155170 | rmudgett | 2008-11-06 18:26:52 -0600 (Thu, 06 Nov 2008) | 1 line
Fixes not finding MISDN_CC_PEER_ID problem reported.
Modified:
team/rmudgett/misdn_facility/channels/chan_misdn.c
team/rmudgett/misdn_facility/channels/misdn/isdn_msg_parser.c
Modified: team/rmudgett/misdn_facility/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/rmudgett/misdn_facility/channels/chan_misdn.c?view=diff&rev=155172&r1=155171&r2=155172
==============================================================================
--- team/rmudgett/misdn_facility/channels/chan_misdn.c (original)
+++ team/rmudgett/misdn_facility/channels/chan_misdn.c Thu Nov 6 18:49:37 2008
@@ -27,6 +27,14 @@
* \extref MISDN http://www.misdn.org/
*
* \ingroup channel_drivers
+ */
+
+/*
+ * To use the CCBS/CCNR supplementary service feature and other
+ * supplementary services using FACILITY messages requires a
+ * modified version of mISDN v1.1.8 from:
+ * http://svn.digium.com/svn/thirdparty/mISDN/trunk
+ * http://svn.digium.com/svn/thirdparty/mISDNuser/trunk
*/
/* Define to enable cli commands to generate canned CCBS messages. */
@@ -4354,6 +4362,9 @@
struct misdn_bchannel *newbc;
char *opts = NULL, *ext, *tokb;
char *dest_cp;
+#if defined(AST_MISDN_ENHANCEMENTS)
+ const char *chan_value;
+#endif /* defined(AST_MISDN_ENHANCEMENTS) */
if (!ast) {
ast_log(LOG_WARNING, " --> ! misdn_call called on ast_channel *ast where ast == NULL\n");
@@ -4386,6 +4397,21 @@
port = newbc->port;
#if defined(AST_MISDN_ENHANCEMENTS)
+ /*
+ * Setup struct chan_list.peer if MISDN_CC_PEER_ID has a value.
+ * NOTE: The variable is not available until after misdn_request()
+ * has been called.
+ */
+ chan_value = pbx_builtin_getvar_helper(ast, MISDN_CC_PEER_ID);
+ if (chan_value) {
+ int peer_id;
+
+ peer_id = atoi(chan_value);
+ ch->peer = misdn_peer_link_get(peer_id);
+ chan_misdn_log(3, port, " --> Found %s:%s, peer:%s\n",
+ MISDN_CC_PEER_ID, chan_value, ch->peer ? "available" : "NULL");
+ }
+
if (ch->record_id != -1) {
struct misdn_cc_record *cc_record;
@@ -5462,7 +5488,6 @@
int record_id = -1;
struct misdn_cc_record *cc_record;
const char *err_msg;
- const char *chan_value;
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
struct chan_list *cl;
@@ -5666,16 +5691,6 @@
#if defined(AST_MISDN_ENHANCEMENTS)
cl->record_id = record_id;
-
- /* Setup struct chan_list.peer if MISDN_CC_PEER_ID has a value. */
- chan_value = pbx_builtin_getvar_helper(ast, MISDN_CC_PEER_ID);
- if (chan_value) {
- int peer_id;
-
- chan_misdn_log(3, 0, " --> %s: %s\n", MISDN_CC_PEER_ID, chan_value);
- peer_id = atoi(chan_value);
- cl->peer = misdn_peer_link_get(peer_id);
- }
#endif /* defined(AST_MISDN_ENHANCEMENTS) */
/* register chan in local list */
Modified: team/rmudgett/misdn_facility/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/team/rmudgett/misdn_facility/channels/misdn/isdn_msg_parser.c?view=diff&rev=155172&r1=155171&r2=155172
==============================================================================
--- team/rmudgett/misdn_facility/channels/misdn/isdn_msg_parser.c (original)
+++ team/rmudgett/misdn_facility/channels/misdn/isdn_msg_parser.c Thu Nov 6 18:49:37 2008
@@ -140,7 +140,9 @@
return;
}
- decodeFac(p, fac);
+ if (decodeFac(p, fac)) {
+ cb_log(3, 0, "Decoding facility ie failed!\n");
+ }
} /* end dec_ie_facility() */
@@ -1157,7 +1159,6 @@
FACILITY_t *facility = (FACILITY_t*)(msg->data+HEADER_LEN);
Q931_info_t *qi = (Q931_info_t*)(msg->data+HEADER_LEN);
unsigned char *p = NULL;
- int err;
#ifdef DEBUG
printf("Parsing FACILITY Msg\n");
@@ -1174,9 +1175,8 @@
if (!p)
return;
- err = decodeFac(p, &(bc->fac_in));
- if (err) {
- cb_log(5, bc->port, "Decoding FACILITY failed! (%d)\n", err);
+ if (decodeFac(p, &bc->fac_in)) {
+ cb_log(3, bc->port, "Decoding facility ie failed!\n");
}
}
More information about the asterisk-commits
mailing list