[asterisk-users] Problem with Atxfer for the calling party
Antonio Modesto
modesto at isimples.com.br
Fri Nov 11 04:38:56 CST 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111111/52638629/attachment.htm>
More information about the asterisk-users
mailing list