Problem with Atxfer for the calling party

Home » Asterisk Users » Problem with Atxfer for the calling party
Asterisk Users 6 Comments

Good morning,

I have not solved this problem yet, but, I found that the source of
the problem are my macros. For example, I have this context:

context ramais {
101 => &dial_sip(exten1);
102 => &dial_sip(exten2);
103 => &dial_sip(exten3);
};

All these extensions use the dial_sip macro, I have changed this context
to use the Dial application instead of dial_sip macro, it worked fine.
The problem is that when i use the macro, the current context is changed
to the dial_sip context, the dial_sip context is automatically created
by asterisk when i use any macro and of fact this context doesn’t have
the ramais context included. Is there some way to specify on which
context the macro will run?

On Mon, 2011-10-31 at 09:09 -0200, Antonio Modesto wrote:

> Good Morning,
>
> I have an asterisk18-1.8.7.1 running on a FreeBSD 8.2-STABLE, and it
> is working well so far, i’m just having some problems with atxfer.
>
> I have written this macro to dial sip extensions:
>
> macro dial_sip(exten) {
> Verbose(2,”==> Chamando a MACRO dial_sip – ponto 1 macros.ael
> < ==");
> Verbose(4,”====> Macro dial_sip iniciada.”);
> ChanIsAvail(SIP/${exten});
> Verbose(2,”==> ${AVAILORIGCHAN}”);
>
> if (“${AVAILORIGCHAN}” != “”)
> {
> Verbose(4,”====> SIP/${exten} parece estar disponivel,
> vou disca-lo agora.”);
> Set(FromExt=${CALLERID(num)});
> System(/bin/sh /var/spool/asterisk/calllog/log.sh
> SIP/${FromExt} SIP/${exten} SIP-TO-SIP);
> Verbose(4,”====> System status: ${SYSTEMSTATUS}”);
> Dial(SIP/${exten},${SIP_DIAL_TIMEOUT},Ttr);
> Hangup();
> }
> else
> {
> Verbose(2,”====> SIP/${exten} nao esta disponivel.”);
> Hangup();
> };
>
>
> NoOp(“From ${MACRO_EXTEN} to ${exten});
> System(${CALLLOGDIR}/log.sh ${exten});
>
> return;
> };
>
> It is working, but the calling party is not able to transfer the calls
> because asterisk doesn’t wait all the digits be typed, it tries to
> transfer the call when the first digit is pressed (We use 3 digits
> extensions):
>
> [Oct 31 09:04:01] WARNING[2926]: features.c:2315 builtin_atxfer:
> Extension ‘1’ does not exist in context ‘dial_sip’
> == Spawn extension (dial_sip, ~~s~~, 11) exited non-zero on
> ‘SIP/modesto-0000000d’
> [Oct 31 09:04:03] WARNING[2926]: features.c:2319 builtin_atxfer: No
> digits dialed for atxfer.
>
> Does anyone have suggestions?
>
> Regards.
>
> —
> _____________________________________________________________________
> — Bandwidth and Colocation Provided by http://www.api-digital.com
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users

6 thoughts on - Problem with Atxfer for the calling party

  • It can have to do with either the telephones dial plan or the context in the
    Asterisk dial plan combined with your features.conf settings.

    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Ramiro Paz
    Sent: Monday, November 07, 2011 8:46 AM

    Hi:

    Same problem here (asterisk doesn’t wait all the digits be typed when making
    a call transfer). Does anybody knows something about this? Thanks in
    advance.

    Greetings,

    Ramiro PAZ
    MASTERLINE LOGISTICS

    2011/11/1 Antonio Modesto

    Good morning,

    I have not solved this problem yet, but, I found that the source of the
    problem are my macros. For example, I have this context:

    context ramais {
    101 => &dial_sip(exten1);
    102 => &dial_sip(exten2);
    103 => &dial_sip(exten3);
    };

    All these extensions use the dial_sip macro, I have changed this context to
    use the Dial application instead of dial_sip macro, it worked fine. The
    problem is that when i use the macro, the current context is changed to the
    dial_sip context, the dial_sip context is automatically created by asterisk
    when i use any macro and of fact this context doesn’t have the ramais
    context included. Is there some way to specify on which context the macro
    will run?

    Good Morning,

    I have an asterisk18-1.8.7.1 running on a FreeBSD 8.2-STABLE, and it is
    working well so far, i’m just having some problems with atxfer.

    I have written this macro to dial sip extensions:

    macro dial_sip(exten) {
    Verbose(2,”==> Chamando a MACRO dial_sip – ponto 1 macros.ael < ==");
    Verbose(4,”====> Macro dial_sip iniciada.”);
    ChanIsAvail(SIP/${exten});
    Verbose(2,”==> ${AVAILORIGCHAN}”);

    if (“${AVAILORIGCHAN}” != “”)
    {
    Verbose(4,”====> SIP/${exten} parece estar disponivel, vou
    disca-lo agora.”);
    Set(FromExt=${CALLERID(num)});
    System(/bin/sh /var/spool/asterisk/calllog/log.sh
    SIP/${FromExt} SIP/${exten} SIP-TO-SIP);
    Verbose(4,”====> System status: ${SYSTEMSTATUS}”);
    Dial(SIP/${exten},${SIP_DIAL_TIMEOUT},Ttr);
    Hangup();
    }
    else
    {
    Verbose(2,”====> SIP/${exten} nao esta disponivel.”);
    Hangup();
    };

    NoOp(“From ${MACRO_EXTEN} to ${exten});
    System(${CALLLOGDIR}/log.sh ${exten});

    return;
    };

    It is working, but the calling party is not able to transfer the calls
    because asterisk doesn’t wait all the digits be typed, it tries to transfer
    the call when the first digit is pressed (We use 3 digits extensions):

    [Oct 31 09:04:01] WARNING[2926]: features.c:2315 builtin_atxfer: Extension
    ‘1’ does not exist in context ‘dial_sip’
    == Spawn extension (dial_sip, ~~s~~, 11) exited non-zero on
    ‘SIP/modesto-0000000d’
    [Oct 31 09:04:03] WARNING[2926]: features.c:2319 builtin_atxfer: No digits
    dialed for atxfer.

    Does anyone have suggestions?

    Regards.

  • Hello,

    The exten is the parameter passed to the macro, which contains the
    sip device name. I’ll change the name to another less confusing.

    * Alexandre, tamb

  • Hi Antonio,

    I’d never had used extensions.ael but in extensions.conf, using Macro I
    always set ‘__TRANSFER_CONTEXT’ to the same context of exten and it works
    well.

    2011/12/13 Antonio Modesto

  • Hello,

    I’m already doing this, this line is inside my macro:

    Set(__TRANSFER_CONTEXT=${MACRO_CONTEXT});

    Is it right?

    Thanks.