Skip to content
Snippets Groups Projects
Commit e84273f3 authored by Kevin P. Fleming's avatar Kevin P. Fleming
Browse files

use API call for setting call time limit (issue #5227)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 1ec15b94
No related branches found
No related tags found
No related merge requests found
...@@ -534,7 +534,6 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch ...@@ -534,7 +534,6 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch
OSPTCALLID *callid; OSPTCALLID *callid;
OSPE_DEST_PROT prot; OSPE_DEST_PROT prot;
OSPE_DEST_OSP_ENABLED ospenabled; OSPE_DEST_OSP_ENABLED ospenabled;
time_t now;
result->handle = -1; result->handle = -1;
result->numresults = 0; result->numresults = 0;
...@@ -597,8 +596,7 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch ...@@ -597,8 +596,7 @@ 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)) { 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", ast_log(LOG_DEBUG, "Got destination '%s' and called: '%s' calling: '%s' for '%s' (provider '%s')\n",
destination, callednum, callingnum, extension, provider); destination, callednum, callingnum, extension, provider);
time (&now); ast_channel_setwhentohangup (chan, timelimit); /* Only support OSP server with only one duration limit */
chan->whentohangup = now + timelimit; // Only support OSP server with only one duration limit
do { do {
if (!OSPPTransactionIsDestOSPEnabled (result->handle, &ospenabled) && (ospenabled == OSPE_OSP_FALSE)) { if (!OSPPTransactionIsDestOSPEnabled (result->handle, &ospenabled) && (ospenabled == OSPE_OSP_FALSE)) {
result->token[0] = 0; result->token[0] = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment