[asterisk-commits] dvossel: branch dvossel/generic_aoc r254003 - in /team/dvossel/generic_aoc: c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 23 14:33:51 CDT 2010


Author: dvossel
Date: Tue Mar 23 14:33:47 2010
New Revision: 254003

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=254003
Log:
respond to AOC request messages. addition of DAHDI conf 'aoc_grant_request' option

Modified:
    team/dvossel/generic_aoc/channels/chan_dahdi.c
    team/dvossel/generic_aoc/channels/sig_pri.c
    team/dvossel/generic_aoc/channels/sig_pri.h
    team/dvossel/generic_aoc/configs/chan_dahdi.conf.sample

Modified: team/dvossel/generic_aoc/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/channels/chan_dahdi.c?view=diff&rev=254003&r1=254002&r2=254003
==============================================================================
--- team/dvossel/generic_aoc/channels/chan_dahdi.c (original)
+++ team/dvossel/generic_aoc/channels/chan_dahdi.c Tue Mar 23 14:33:47 2010
@@ -17088,7 +17088,7 @@
 			} else if (!strcasecmp(v->name, "facilityenable")) {
 				confp->pri.pri.facilityenable = ast_true(v->value);
 #if defined(HAVE_PRI_AOC_EVENTS)
-			} else if (!strcasecmp(v->name, "aoc_grant")) {
+			} else if (!strcasecmp(v->name, "aoc_grant_request")) {
 				if (strchr(v->value, 's')) {
 					confp->pri.pri.aoc_grant_flag |= PRI_AOC_GRANT_S;
 				}

Modified: team/dvossel/generic_aoc/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/channels/sig_pri.c?view=diff&rev=254003&r1=254002&r2=254003
==============================================================================
--- team/dvossel/generic_aoc/channels/sig_pri.c (original)
+++ team/dvossel/generic_aoc/channels/sig_pri.c Tue Mar 23 14:33:47 2010
@@ -2459,20 +2459,20 @@
 	switch (aoc_request->charging_request) {
 	case PRI_AOC_REQUEST_S:
 		/* sending AOC-S has not been implemented yet */
-		pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_NOT_IMPLEMENTED, aoc_request);
+		pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_ERROR_NOT_IMPLEMENTED, aoc_request);
 		break;
 	case PRI_AOC_REQUEST_D:
 		if (pri->aoc_grant_flag & PRI_AOC_GRANT_D) {
 			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_CHARGING_INFO_FOLLOWS, aoc_request);
 		} else {
-			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_NOT_AVAILABLE, aoc_request);
+			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_ERROR_NOT_AVAILABLE, aoc_request);
 		}
 		break;
 	case PRI_AOC_REQUEST_E:
 		if (pri->aoc_grant_flag & PRI_AOC_GRANT_E) {
 			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_CHARGING_INFO_FOLLOWS, aoc_request);
 		} else {
-			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_NOT_AVAILABLE, aoc_request);
+			pri_aoc_charging_request_response(pri->pri, call, PRI_AOC_REQUEST_RESPONSE_ERROR_NOT_AVAILABLE, aoc_request);
 		}
 		break;
 	}
@@ -3519,6 +3519,11 @@
 					ast_channel_unlock(owner);
 				}
 			}
+			break;
+#endif	/* defined(HAVE_PRI_AOC_EVENTS) */
+#if defined(HAVE_PRI_AOC_EVENTS)
+		case PRI_SUBCMD_AOC_CHARGING_REQUEST_RESPONSE:
+			/* TODO XXX handle the response */
 			break;
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
 		default:

Modified: team/dvossel/generic_aoc/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/channels/sig_pri.h?view=diff&rev=254003&r1=254002&r2=254003
==============================================================================
--- team/dvossel/generic_aoc/channels/sig_pri.h (original)
+++ team/dvossel/generic_aoc/channels/sig_pri.h Tue Mar 23 14:33:47 2010
@@ -37,10 +37,11 @@
 #if defined(PRI_SUBCMD_AOC_S)
 /* BUGBUG the HAVE_PRI_AOC_EVENTS line is to be removed when the aoc_events branch is merged to trunk and the configure script is updated. */
 #define HAVE_PRI_AOC_EVENTS 1
+#endif	/* defined(PRI_SUBCMD_AOC_S) */
+
 #define PRI_AOC_GRANT_S    (1 << 0)
 #define PRI_AOC_GRANT_D    (1 << 1)
 #define PRI_AOC_GRANT_E    (1 << 2)
-#endif	/* defined(PRI_SUBCMD_AOC_S) */
 
 #if defined(HAVE_PRI_CCSS)
 /*! PRI debug message flags when normal PRI debugging is turned on at the command line. */

Modified: team/dvossel/generic_aoc/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/generic_aoc/configs/chan_dahdi.conf.sample?view=diff&rev=254003&r1=254002&r2=254003
==============================================================================
--- team/dvossel/generic_aoc/configs/chan_dahdi.conf.sample (original)
+++ team/dvossel/generic_aoc/configs/chan_dahdi.conf.sample Tue Mar 23 14:33:47 2010
@@ -288,6 +288,13 @@
 ; Cannot be changed on a reload.
 ;
 ;facilityenable = yes
+;
+; Granting Advice of Charge requests for AOC-D and AOC-E messages means that
+; he response to these requests will indicate that these services will
+; be provided during the call.  This option can be set to either 'd', 'e', or
+; both 'd,e'. Without setting this option AOC requests will be responded to
+; as service not available.
+;aoc_grant_request=d,e
 ;
 ; pritimer cannot be changed on a reload.
 ;




More information about the asterisk-commits mailing list