<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 20/02/14 10:24, Igor Dvorzhak wrote:
    <blockquote
cite="mid:CAE=+CfRzt0CT0p-xMKpwTVO0FVeaJ62DiTmj68_sjd+3Sh_Kog@mail.gmail.com"
      type="cite">
      <div dir="ltr">Guys, <br>
        <br>
        I am using <br>
        Asterisk 1.8.20.0 built by mockbuild @ <a
          moz-do-not-send="true"
          href="http://buildvm-24.phx2.fedoraproject.org">buildvm-24.phx2.fedoraproject.org</a>
        on a x86_64 running Linux on 2013-01-18 19:52:25 UTC<br>
        <br>
        How can I set variable in one context and then Redirect a
        channel to another context and use variable there? The code
        below doesn't work, so I've got empty VAR1 in context_2<br>
        <br>
        [context_1]<br>
        <br>
        exten => s,1,SET(__VAR1=VALUE1)<br>
        exten => s,n,ChannelRedirect(${CHANNEL},context_2,AMD,1)<br>
        <br>
        [context_2]<br>
        <br>
        exten => AMD,1,NoOp(VAR1: ${VAR1})<br>
        <br>
        Thank you in advance, <br>
        Igor</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    You should be able to get something working using a shared variable.
    I have used them in one of my blog posts if you would like an
    example of their use<br>
<a class="moz-txt-link-freetext" href="http://gblades.blogspot.co.uk/2013/07/how-to-get-sip-response-code-in.html">http://gblades.blogspot.co.uk/2013/07/how-to-get-sip-response-code-in.html</a><br>
  </body>
</html>