<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You're using ${exten} inside your macro, you should use ${EXTEN}.<br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">-- <br>Atenciosamente,<br><br>ALEXANDRE KELLER</span></font></div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px; "><a href="http://twitter.com/alexandrekeller">http://twitter.com/alexandrekeller</a></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px; "><a href="http://www.facebook.com/alexandre.keller.BR">http://www.facebook.com/alexandre.keller.BR</a></span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px; "><br></span><span class="Apple-style-span" style="font-size: 11px; ">"Dinheiro é a consequência de um trabalho bem feito </span><span class="Apple-style-span" style="font-size: 11px; ">e não o motivo para se fazer um bom trabalho."</span></font></div><div><font class="Apple-style-span" color="#008000" face="Webdings" size="7"><span class="Apple-style-span" style="font-size: 32px; "><b><font class="Apple-style-span" color="#000000" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal; "><br></span></font></b></span></font></div></div><div><font class="Apple-style-span" color="#008000" face="Webdings" size="7"><span class="Apple-style-span" style="font-size: 32px; "><b><font class="Apple-style-span" color="#000000" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal; "><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 22px; color: rgb(0, 182, 151); "><b>P<font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px; "> Antes de imprimir pense em seu compromisso com o Meio Ambiente.</span></font></b></span></span></font></b></span></font></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br><div><div>On 11/11/2011, at 08:38, Antonio Modesto wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; CHARSET=UTF-8">
<meta name="GENERATOR" content="GtkHTML/3.30.3">
<div>
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>
</div>
--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br> <a href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br></body></html>