From: Kevin P. Fleming Date: Fri, 2 Sep 2005 19:32:20 +0000 (+0000) Subject: ensure that OSP-provided call duration limit is honored (issue #5099) X-Git-Tag: 1.2.0-beta2~400 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93a1922549cbf7b86cea1a4eb6ee2998da7edf20;p=thirdparty%2Fasterisk.git ensure that OSP-provided call duration limit is honored (issue #5099) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6512 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_osp.c b/res/res_osp.c index e820264f5e..ee4c38077a 100755 --- a/res/res_osp.c +++ b/res/res_osp.c @@ -507,6 +507,7 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch OSPTCALLID *callid; OSPE_DEST_PROT prot; OSPE_DEST_OSP_ENABLED ospenabled; + time_t now; result->handle = -1; result->numresults = 0; @@ -569,6 +570,8 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch 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;