[Asterisk-Dev] ParkAndAnnounce() - trying to add var to indicate parked exten

Andrew Latham lathama at gmail.com
Tue Dec 13 12:47:33 MST 2005


I looked at this.... I am playing with an Idea for a fix....
they problem is fun.... :)

On 10/15/05, Andrew Kohlsmith <akohlsmith-asterisk at benshaw.com> wrote:
> On Saturday 15 October 2005 00:28, Andrew Kohlsmith wrote:
> > Subject line says it all.  I thought this would be a trivial modification
> > to ParkAndAnnounce, but it's proving difficult and I can't figure out why.
>
> Well I figured out why pbx_builtin_setvar_helper() isn't cutting it, but I'm
> still no farther ahead.
>
> ast_request_and_dial doesn't return until AFTER the channel's been created and
> dialled, so pbx_builtin_setvar_helper() is too late.
>
> No problem, I create an outgoing_helper structure and write the variable in
> the vars structure pointer and use __ast_request_and_dial instead of
> ast_request_and_dial:
>
>         snprintf(buf, sizeof(buf), "%i", lot);
>         memset(&oh, 0, sizeof(struct outgoing_helper));
>         oh.vars = ast_variable_new("PARKEDAT", buf);
>
>         dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR,
> dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
>
> So now I'm creating the variable before the channel is connected to Dial, so I
> should be able to see the PARKEDAT variable...  Unfortunately this isn't
> true.
>
> This is truly baffling.  Can anyone help?
>
> -A.
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>


--
---
Andrew Latham - AKA: LATHAMA (lay-th-ham-eh)
lathama at lathama.com - lathama at yahoo.com - lathama at gmail.com
If any of the above are down we have bigger problems than my email!
---



More information about the asterisk-dev mailing list