[Asterisk-Dev] Is ast_channel_setwhentohangup() good for Prepaid Service?

Begumisa Gerald M beg_g at eahd.or.ug
Wed Sep 15 11:12:58 MST 2004


    > App dial has it's own timeout, which disconnects the call after the
    > specified time, starting from when the call was bridged (ie:
    > answered)

Hey, thanks for taking time to answer this!  I appreciate it.  Now, below
is a snippet of code where am doing this:

--
char dialstr[256];
time_t timeout
...
timeout = calculate_timeout();
...
snprintf(dialstr, 256, "SIP/number at host.com|%lu", timeout);
...
struct ast_app *app;
...
app = pbx_findapp("Dial");
pbx_exec(chan, app, dialstr, 1);
...
--

The trouble is, it seems this timeout is the maximum time asterisk will
give the callee to pick up their phone, after which it stops trying.  What
you explained is exactly what I'm looking for but I think am not doing it
the right way.  Any ideas?

Thanks!

Gerald.



More information about the asterisk-dev mailing list