diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-09-02 19:32:20 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-09-02 19:32:20 +0000 |
commit | bb8cdca3a73dab3f55288d958fa047df40efc443 (patch) | |
tree | c99992537c93294c53354b68209efa9c1e55795a /res | |
parent | 81ffb45a4529b76922d1b35efae82ebf484a9f82 (diff) |
ensure that OSP-provided call duration limit is honored (issue #5099)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6512 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-x | res/res_osp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_osp.c b/res/res_osp.c index e820264f5..ee4c38077 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; |