Index: asterisk/res/res_osp.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_osp.c,v retrieving revision 1.21 diff -u -r1.21 res_osp.c --- asterisk/res/res_osp.c 14 Sep 2005 01:40:22 -0000 1.21 +++ asterisk/res/res_osp.c 14 Sep 2005 18:00:12 -0000 @@ -523,7 +523,6 @@ OSPTCALLID *callid; OSPE_DEST_PROT prot; OSPE_DEST_OSP_ENABLED ospenabled; - time_t now; result->handle = -1; result->numresults = 0; @@ -586,8 +585,7 @@ 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 + ast_channel_setwhentohangup (chan, timelimit); /* Only support OSP server with only one duration limit */ do { if (!OSPPTransactionIsDestOSPEnabled (result->handle, &ospenabled) && (ospenabled == OSPE_OSP_FALSE)) { result->token[0] = 0;