[Asterisk-Dev] Re: A question about G option of Dial
Tony Mountifield
tony at softins.clara.co.uk
Thu Nov 17 03:31:52 MST 2005
In article <437C1D17.7030602 at citron.com.tw>,
Chih-Wei Huang <cwhuang at citron.com.tw> wrote:
> The description said:
>
> G(context^exten^pri) - If the call is answered, transfer both parties to
> the specified priority...
>
>
> But from my testing result, it doesn't work in that way.
> While the calling party is transferred to the specified priority,
> the called party is transferred to priority+1.
>
> A glance at the code confirms my testing result.
> About in line 1421 of app_dial.c said:
>
> ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]);
> peer->priority++;
> ast_pbx_start(peer);
>
> I'm curious why priority++ before ast_pbx_start.
> It contradicts to the description. Doesn't it?
> Is it a bug or an intended behavior?
I don't know, but it sounds like it could be useful, if you want the two
parties to be handled differently. If you want them both the same, you
put a NoOp at "priority"; if you want them different you put a Goto.
Of course, if it is intended, it should be documented! :-)
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-dev
mailing list