<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008>Hi,</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=937101612-15042008>I have a big
issue during transfers (using Polycom phones, but I don't think that's relevent)
with Asterisk 1.14.19. Basically, the value contained in
${CDR(accountcode)} dissapears.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT><FONT face=Arial><FONT
size=2><SPAN class=937101612-15042008></SPAN></FONT></FONT><FONT
face=Arial><FONT size=2><SPAN class=937101612-15042008>Here is the
relevant code snippet:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008>------------------------------------------</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=937101612-15042008>exten =>
_X!.,n,Noop(${CDR(accountcode)}) ;THE VALUE HERE IS CORRECT AND IS EQUALS
TO THE ACCOUNTCODE SPECIFIED MUCH EARLIER IN THE
DIALPLAN</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=937101612-15042008>exten =>
_X!.,n,Gotoif($["${i}" = "1"]?$[${PRIORITY}+2])<BR>;DIAL ALL MAC PHONE
ASSOCIATED WITH THIS EXTENSION SIMULATENOUSLY<BR>exten =>
_X!.,n,Dial(${mac_dial_string:0:$[${LEN(${mac_dial_string})}-20]}|${sip_phones_ring_time})
;remove least 7 characters, thos<BR>e are left there by the invalid last SQL
fetch</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=937101612-15042008>exten =>
_X!.,n,Set(i=0)<BR>exten => _X!.,n,Noop(${CDR(accountcode)}) ;THE
VALUE HERE IS EMPTY, and so is this variable if I use it in any
way.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008>------------------------------------</DIV>
<DIV><BR></DIV></SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT>
<DIV><FONT face=Arial><FONT size=2><SPAN class=937101612-15042008>When I dial an
extension and it hits this diaplan, it works fine. But if I dial an
extension, answer and then transfer (using Polycom phones) to an extension using
this dialplan I lose the accountcode where specified in the code. It's
empty. How can ${CDR(accountcode)} lose it's value for no reason in those
two seemingly innocent diaplan lines?</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT><FONT face=Arial><FONT
size=2><SPAN class=937101612-15042008>Below is the CLI output if it's
useful:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT><FONT><SPAN
class=937101612-15042008>
<P><FONT face=Arial><FONT size=2>-- Executing [701@generic-extensions-db:22]
NoOp("SIP/0004f2134384-1-097fb4e8", "<SPAN
class=937101612-15042008>1234567890</SPAN>") in new stack<SPAN
class=937101612-15042008> ;THIS IS THE
ACCOUNTCODE</SPAN></FONT></FONT></P>
<P><FONT face=Arial size=2>-- Executing [701@generic-extensions-db:23]
GotoIf("SIP/0004f2134384-1-097fb4e8", "0?25") in new stack</FONT></P>
<P><FONT face=Arial size=2>-- Executing [701@generic-extensions-db:24]
Dial("SIP/0004f2134384-1-097fb4e8", "SIP/0004f2134384-3|8") in new
stack</FONT></P>
<P><FONT face=Arial size=2>-- Called 0004f2134384-3</FONT></P>
<P><FONT face=Arial size=2>-- SIP/0004f2134384-3-099947b0 is ringing</FONT></P>
<P><FONT face=Arial size=2>== Spawn extension (generic-extensions-db, 705, 24)
exited non-zero on 'SIP/0004f2134384-1-097fb4e8<ZOMBIE>'</FONT></P>
<P><FONT face=Arial size=2>-- Incoming call: Got SIP response 500 "Internal
Server Error" back from 192.168.1.6</FONT></P>
<P><FONT face=Arial size=2>-- Nobody picked up in 8000 ms</FONT></P>
<P><FONT face=Arial size=2>-- Executing [701@generic-extensions-db:25]
Set("SIP/0004f212ae63-1-099700a8", "i=0") in new stack</FONT></P>
<P><FONT face=Arial><FONT size=2>-- Executing [701@generic-extensions-db:26]
NoOp("SIP/0004f212ae63-1-099700a8", "") in new stack<SPAN
class=937101612-15042008> ;MISSING ACCOUNTCODE IS
HERE</SPAN></FONT></FONT></P></SPAN></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=937101612-15042008></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=937101612-15042008></SPAN>M<SPAN
class=937101612-15042008>ick</SPAN></FONT></FONT></DIV></BODY></HTML>