[asterisk-users] Problem with Atxfer for the calling party
Antonio Modesto
modesto at isimples.com.br
Mon Nov 21 12:21:19 CST 2011
Hi There,
I'm still having this problem, Does somebody know what can be
happening?
Regards.
On Fri, 2011-11-11 at 09:40 -0200, Antonio Modesto wrote:
> 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ém sou brasileiro hehe, notei que você já escreveu um
> livro sobre asterisk, será que você poderia me ajudar com esse
> problema? Já tem alguns dias que estou na luta aqui hehe.
>
> On Fri, 2011-11-11 at 08:45 -0200, Alexandre Keller wrote:
>
> > You're using ${exten} inside your macro, you should use ${EXTEN}.
> > --
> > Atenciosamente,
> >
> > ALEXANDRE KELLER
> >
> >
> > http://twitter.com/alexandrekeller
> > http://www.facebook.com/alexandre.keller.BR
> >
> > "Dinheiro é a consequência de um trabalho bem feito e não o motivo
> > para se fazer um bom trabalho."
> >
> >
> > P Antes de imprimir pense em seu compromisso com o Meio Ambiente.
> >
> > On 11/11/2011, at 08:38, Antonio Modesto wrote:
> >
> >
> > > On Mon, 2011-11-07 at 09:12 -0600, Danny Nicholas wrote:
> > >
> > > > 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.
> > >
> > >
> > > I noticed that my problem occurs when i use a macro to dial sip
> > > devices, my dialplan is like this:
> > >
> > > - Each sip device has its own context
> > > - This context includes the outgoing call contexts that this
> > > extension can use for making calls and includes a context called
> > > "ramais", which has the dial plan to call another extensions, it
> > > uses a macro to do this.
> > >
> > > Here is the configuration for my extension "modesto" :
> > >
> > > # sip.conf
> > > [modesto](default_extension)
> > > username=modesto
> > > context=modesto
> > > callerid="modesto" <106>
> > > callgroup=4
> > > pickupgroup=4
> > >
> > > # Default extension template
> > > type=friend
> > > dtmfmode=auto
> > > host=dynamic
> > > disallow=all
> > > allow=ulaw
> > > allow=alaw
> > > deny=0.0.0.0/0.0.0.0
> > > permit=192.168.1.0/255.255.255.0
> > > canreinvite=yes
> > > qualify=no
> > > callcounter=yes
> > >
> > >
> > > # context for SIP/modesto
> > > context modesto {
> > > includes {
> > > vivo;
> > > tim;
> > > oi;
> > > claro;
> > > vivoddd;
> > > timddd;
> > > oiddd;
> > > claroddd;
> > > embratel;
> > > embratel2;
> > > };
> > > includes {
> > > ramais;
> > > };
> > > };
> > >
> > > # Although the problem is occurring also for others contexts
> > > included, i'll show only the "ramais" context, which is used to
> > > call local extensions:
> > >
> > > context ramais {
> > > 101 => &dial_sip(suporte1);
> > > 102 => &dial_sip(suporte2);
> > > 103 => &dial_sip(suporte3);
> > > 105 => &dial_sip(suporte05);
> > > 106 => &dial_sip(modesto);
> > > 107 => &dial_sip(gustavo);
> > > 108 => &dial_sip(pauloh);
> > > 109 => &dial_sip(fernanda);
> > > 111 => &dial_sip(marcos);
> > > 112 => &dial_sip(thiago);
> > > 115 => &dial_sip(helder);
> > > 116 => &dial_sip(atendimento01);
> > > 117 => &dial_sip(atendimento03);
> > > 118 => &dial_sip(atendimento02);
> > > 119 => &dial_sip(marlon);
> > > 120 => &dial_sip(suporteemp);
> > > 122 => &dial_sip(telemais);
> > > 123 => &dial_sip(casagustavo);
> > > 127 => &dial_sip(manutencao);
> > > 128 => &dial_sip(guilherme);
> > > 129 => &dial_sip(marcelo);
> > > 130 => &dial_sip(rafael);
> > > 132 => &dial_sip(netita2);
> > > 133 => &dial_sip(unotel);
> > >
> > > };
> > >
> > > If I use the Dial() application instead of this macro, it works
> > > well. I noticed that when I use the macro and try to transfer a
> > > call (The problem occurs only for the calling party, the called
> > > party can do transfers with no problems), asterisk tries to find
> > > the extension in the <macro-name> context and of course, there is
> > > no dialplan to call the extensions there.
> > >
> > >
> > > Here is the dial_sip macro:
> > >
> > > 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;
> > > };
> > >
> > > Thanks in advance.
> > >
> > >
> > >
> > > --
> > > _____________________________________________________________________
> > > -- 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
> >
> >
> >
> > --
> > _____________________________________________________________________
> > -- 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
>
>
>
> --
> _____________________________________________________________________
> -- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111121/d83b6416/attachment.htm>
More information about the asterisk-users
mailing list