[Asterisk-cvs] asterisk/res res_osp.c,1.19,1.20

kpfleming kpfleming
Fri Sep 2 15:31:27 CDT 2005


Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv13902/res

Modified Files:
	res_osp.c 
Log Message:
ensure that OSP-provided call duration limit is honored (issue #5099)


Index: res_osp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_osp.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- res_osp.c	1 Sep 2005 22:06:23 -0000	1.19
+++ res_osp.c	2 Sep 2005 19:32:20 -0000	1.20
@@ -507,6 +507,7 @@
 	OSPTCALLID *callid;
 	OSPE_DEST_PROT prot;
 	OSPE_DEST_OSP_ENABLED ospenabled;
+	time_t now;
 
 	result->handle = -1;
 	result->numresults = 0;
@@ -569,6 +570,8 @@
 						sizeof(callednum), callednum, sizeof(callingnum), callingnum, sizeof(destination), destination, 0, NULL, &tokenlen, token)) {
 						ast_log(LOG_DEBUG, "Got destination '%s' and called: '%s' calling: '%s' for '%s' (provider '%s')\n",
 							destination, callednum, callingnum, extension, provider);
+						time (&now);
+						chan->whentohangup = now + timelimit;	// Only support OSP server with only one duration limit
 						do {
 							if (!OSPPTransactionIsDestOSPEnabled (result->handle, &ospenabled) && (ospenabled == OSPE_OSP_FALSE)) {
 								result->token[0] = 0;




More information about the svn-commits mailing list