[Asterisk-Dev] A question about G option of Dial

Chih-Wei Huang cwhuang at citron.com.tw
Wed Nov 16 23:03:03 MST 2005


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?



More information about the asterisk-dev mailing list