<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.30.3">
</HEAD>
<BODY>
On Mon, 2011-11-07 at 09:12 -0600, Danny Nicholas wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
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.<BR>
</BLOCKQUOTE>
<BR>
I noticed that my problem occurs when i use a macro to dial sip devices, my dialplan is like this:<BR>
<BR>
- Each sip device has its own context<BR>
- 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.<BR>
<BR>
Here is the configuration for my extension "modesto" :<BR>
<BR>
# sip.conf<BR>
[modesto](default_extension)<BR>
username=modesto<BR>
context=modesto<BR>
callerid="modesto" <106><BR>
callgroup=4<BR>
pickupgroup=4<BR>
<BR>
# Default extension template<BR>
type=friend<BR>
dtmfmode=auto<BR>
host=dynamic<BR>
disallow=all<BR>
allow=ulaw<BR>
allow=alaw<BR>
deny=0.0.0.0/0.0.0.0<BR>
permit=192.168.1.0/255.255.255.0<BR>
canreinvite=yes<BR>
qualify=no<BR>
callcounter=yes<BR>
<BR>
<BR>
# context for SIP/modesto<BR>
context modesto {<BR>
includes {<BR>
vivo;<BR>
tim;<BR>
oi;<BR>
claro;<BR>
vivoddd;<BR>
timddd;<BR>
oiddd;<BR>
claroddd;<BR>
embratel;<BR>
embratel2;<BR>
};<BR>
includes {<BR>
ramais;<BR>
};<BR>
};<BR>
<BR>
# Although the problem is occurring also for others contexts included, i'll show only the "ramais" context, which is used to call local extensions:<BR>
<BR>
context ramais {<BR>
101 => &dial_sip(suporte1);<BR>
102 => &dial_sip(suporte2);<BR>
103 => &dial_sip(suporte3);<BR>
105 => &dial_sip(suporte05);<BR>
106 => &dial_sip(modesto);<BR>
107 => &dial_sip(gustavo);<BR>
108 => &dial_sip(pauloh);<BR>
109 => &dial_sip(fernanda);<BR>
111 => &dial_sip(marcos);<BR>
112 => &dial_sip(thiago);<BR>
115 => &dial_sip(helder);<BR>
116 => &dial_sip(atendimento01);<BR>
117 => &dial_sip(atendimento03);<BR>
118 => &dial_sip(atendimento02);<BR>
119 => &dial_sip(marlon);<BR>
120 => &dial_sip(suporteemp);<BR>
122 => &dial_sip(telemais);<BR>
123 => &dial_sip(casagustavo);<BR>
127 => &dial_sip(manutencao);<BR>
128 => &dial_sip(guilherme);<BR>
129 => &dial_sip(marcelo);<BR>
130 => &dial_sip(rafael);<BR>
132 => &dial_sip(netita2);<BR>
133 => &dial_sip(unotel);<BR>
<BR>
};<BR>
<BR>
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.<BR>
<BR>
<BR>
Here is the dial_sip macro:<BR>
<BR>
macro dial_sip(exten) {<BR>
Verbose(2,"==> Chamando a MACRO dial_sip - ponto 1 macros.ael <==");<BR>
Verbose(4,"====> Macro dial_sip iniciada.");<BR>
ChanIsAvail(SIP/${exten});<BR>
Verbose(2,"==> ${AVAILORIGCHAN}");<BR>
<BR>
if ("${AVAILORIGCHAN}" != "")<BR>
{<BR>
Verbose(4,"====> SIP/${exten} parece estar disponivel, vou disca-lo agora.");<BR>
Set(FromExt=${CALLERID(num)});<BR>
System(/bin/sh /var/spool/asterisk/calllog/log.sh SIP/${FromExt} SIP/${exten} SIP-TO-SIP);<BR>
Verbose(4,"====> System status: ${SYSTEMSTATUS}");<BR>
Dial(SIP/${exten},${SIP_DIAL_TIMEOUT},Ttr);<BR>
Hangup();<BR>
}<BR>
else<BR>
{<BR>
Verbose(2,"====> SIP/${exten} nao esta disponivel.");<BR>
Hangup();<BR>
};<BR>
<BR>
NoOp("From ${MACRO_EXTEN} to ${exten});<BR>
System(${CALLLOGDIR}/log.sh ${exten});<BR>
<BR>
return;<BR>
};<BR>
<BR>
Thanks in advance.<BR>
<BR>
<BR>
</BODY>
</HTML>