<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Jonas Kellens<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, September 09, 2010
9:45 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Asterisk
 Users Mailing List - Non-Commercial Discussion</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [asterisk-users] Set
channel variable from within other channel</span></font><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>On 09/09/2010 04:12 PM, Danny Nicholas wrote: <o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr<u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><!--[if gte mso 9]><xml>
  <u1:shapedefaults u2:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
  <u1:shapelayout u3:ext="edit">
   <u1:idmap u3:ext="edit" data="1"/>
  </u1:shapelayout>
</xml><![endif]--> size=2 width="100%" align=center>
</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>
[<a href="mailto:asterisk-users-bounces@lists.digium.com">mailto:asterisk-users-bounces@lists.digium.com</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Jonas Kellens<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, September 09, 2010
8:56 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:personname u4:st="on"><st1:PersonName
w:st="on">Asterisk Users Mailing List - Non-Commercial Discussion</st1:personname></st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [asterisk-users] Set
channel variable from within other channel</span></font><o:p></o:p></p>

</div>

<u1:p></u1:p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><u1:p>&nbsp;</u1:p><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face=Helvetica><span
style='font-size:12.0pt;font-family:Helvetica'>Hello list,<br>
<br>
is it possible to set a variable (channel variable) from within another channel
?!<br>
<br>
I'm currently working with 2 channels that I bridge afterwards. It would be
good to set a variable in one channel when something occurs in the other
channel.<br>
<br>
If some variable is not set in channel 1, then this means something for channel
2. But from within channel 2 I can not see the variables that are set in
channel 1.<br>
<br>
The suggestion of using global variables I think will create difficulties with
simultaneous calls...<br>
<br>
<br>
Kind regards,<br>
<br>
Jonas.<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>AFAIK, it is not possible to set a local
variable for 1 call from another.&nbsp; If GLOBAL variables are a concern, why
not use the ASTDB to store/retrieve these values?<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt;
1234,1,Set(DB(passval/${EXTEN}/val1)=1) will create a key
passval/channelname/val with value 1<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>on further reflection<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt;
1234,1,Set(DB(passval/${EXTEN:0:7}/val1)=1) might create a better reference key<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>For a call on SIP/170, line 1 would create
passval/SIP-170abcdefg/val1, line 2 would create passval/SIP-170/val1<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>To see what the channel wrote, you would
need to get the bridged channel value (perhaps core show channels verbose?) and
do<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Exten =&gt; 3456,1,Set(CHAN2=bridged
channel)<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Exten =&gt;
3456,n,Set(TEST2=${DB(passval/${CHAN2}/val1)<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards,<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Danny Nicholas</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><br>
</u1:smarttagtype>Danny,<br>
<br>
the wiki mentions :<br>
<br>
Set(DB(family/key)=${foo})<br>
<br>
What is this 'passval' you are talking about ?!<br>
<br>
<br>
Kind regards,<br>
<br>
Jonas.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Just being a bit &#8220;over(under?)
verbose)&#8221; .&nbsp; Since I&#8217;m using ASTDB to &#8220;pass values&#8221;
between channels, my thought was that the &#8220;family&#8221; would be passval
and the key would be ${EXTEN}/val1 (so you could pass multiple values if
desired).&nbsp; In a two-channel environment, it wouldn&#8217;t be that relevant,
but since I assume you would want to be able to monitor X number of bridged
calls, the 3 value &#8220;family/key&#8221; combination made the most sense to
me.<o:p></o:p></span></font></p>

</div>

</body>

</html>