[asterisk-users] some questions about atxfer usage

Antonio Almodóvar adalmodovar at gmail.com
Fri Nov 17 11:47:11 MST 2006


OK
Thank you very much.

On 11/16/06, Alberto Pastore <alberto at msoft-italia.com> wrote:
> Antonio Almodóvar ha scritto:
> > Hi all.
> >
> > I have enabled the attended transfer feature in features.conf. I'm
> > using it and I want to resolve some questions, I hope someone can help
> > me :)
> >
> > When I transfer a call to an extension:
> > - The extension rings during 15 seconds and the call returns to the
> > "transferer". Is there any possibility to recover the call before the
> > timeout of 15 seconds expires?
> >
> > I mean, I would like to personalize the way of making transfers using
> > the feature of atxfer. How can I do that?
> >
> >
> > Thanks in advance.
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> Hi Antonio.
>
> Taking a look at the following code line from res_features.c:
>
> newchan = ast_feature_request_and_dial(transferer,
>    "Local",
>    ast_best_codec(transferer->nativeformats),
>    dialstr,
>    15000,          // <-------------------!!!!
>    &outstate,
>    cid_num,
>    cid_name);
>
> I assume that 15000 msecs is a hardcoded value...
> You might want to replace it with some variable taken from
> pbx_builtin_getvar_helper() results
> but it involves recompiling at least the res_features.c module;
> something more or less
> like this (I haven't tested it!!!):
>
> //these two lines go at the beginning of the if {} block
> char *transfer_timeout_str;
> int transfer_timeout = 15; //default value
>
> //these lines replace the newchan = ast_feature_request_and_dial(...) one
> //read the value (if any) from TRANSFER_TIMEOUT
> //can be set in extensions.conf's [globals] (TRANSFER_TIMEOUT => 30)
> transfer_timeout_str = pbx_builtin_getvar_helper(transferer,
> "TRANSFER_TIMEOUT");
> if (transfer_timeout_str) {
>    transfer_timeout = atoi(transfer_timeout_str);
>    //sanity check
>    if (transfer_timeout <= 0) transfer_timeout = 15;
> }
> newchan = ast_feature_request_and_dial(transferer,
>    "Local",
>    ast_best_codec(transferer->nativeformats),
>    dialstr,
>    transfer_timeout * 1000,          // <-------------------!!!!
>    &outstate,
>    cid_num,
>    cid_name);
>
> Bye,
> Alberto.
>
> --
> --
> Alberto Pastore
> B-Press Srl - Gruppo MSoft
> P.IVA 01697420030
> P.le Lombardia, 4 - 28100 Novara - Italy
> Tel. 0321-499508
> Fax 0321-492974
> http://www.msoft.it
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>


More information about the asterisk-users mailing list