<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>notice:</span></div><div><span><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); border-image: initial; line-height: 1.1em; ">JavaScript:
</pre><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); border-image: initial; line-height: 1.1em; ">var caller_id = session.getVariable("caller_id_number")</pre></span></div><div><pre>that is not wrong !!</pre></div>  <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> mayamatakeshi &lt;mayamatakeshi@gmail.com&gt;<br>
 <b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, July 3, 2012 3:20 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] how to get the content of sip header ?<br> </font> </div> <br>
<div id="yiv698246454">A yes, sorry.<br>I don't use lua with FS that much either.<br>But i got it from here:<br>http://wiki.freeswitch.org/wiki/Session_getVariable<br><br><pre>var caller_id =session.getVariable("caller_id_number")</pre>I can see that page is the one that is wrong (will correct it now).<br><br><br><div class="yiv698246454gmail_quote">On Tue, Jul 3, 2012 at 7:38 PM, Peter Olsson <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:peter.olsson@visionutveckling.se" target="_blank" href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>&gt;</span> wrote:<br>
<blockquote class="yiv698246454gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<div lang="SV">
<div>
<div class="yiv698246454MsoNormal"><span style="font-size:10.0pt;color:#1f497d;" lang="EN-US">Hmm... I’ve never used Lua, but that means that all documentation for mod_lua on the wiki is wrong? Sounds strange to me...<u></u><u></u></span></div>

<div class="yiv698246454MsoNormal"><span style="font-size:10.0pt;color:#1f497d;" lang="EN-US"><u></u>&nbsp;<u></u></span></div>
<div class="yiv698246454MsoNormal"><span style="font-size:10.0pt;color:#1f497d;" lang="EN-US">/Peter<u></u><u></u></span></div>
<div class="yiv698246454MsoNormal"><span style="font-size:10.0pt;color:#1f497d;"><u></u>&nbsp;<u></u></span></div>
<div class="yiv698246454MsoNormal"><b><span style="font-size:10.0pt;" lang="EN-US">Från:</span></b><span style="font-size:10.0pt;" lang="EN-US"> <a rel="nofollow" ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a rel="nofollow" ymailto="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>För </b>mayamatakeshi<br>
<b>Skickat:</b> den 3 juli 2012 12:25</span></div><div class="yiv698246454im"><br>
<b>Till:</b> FreeSWITCH Users Help<br>
<b>Ämne:</b> Re: [Freeswitch-users] how to get the content of sip header ?<u></u><u></u></div><div></div>
<div class="yiv698246454MsoNormal"><span lang="EN-US"><u></u>&nbsp;<u></u></span></div>
<div class="yiv698246454MsoNormal"><span lang="EN-US"><u></u>&nbsp;<u></u></span></div>
<div><div class="yiv698246454im">
<div class="yiv698246454MsoNormal">On Tue, Jul 3, 2012 at 7:16 PM, Samira Mh &lt;<a rel="nofollow" ymailto="mailto:saami_mh@ymail.com" target="_blank" href="mailto:saami_mh@ymail.com">saami_mh@ymail.com</a>&gt; wrote:<u></u><u></u></div>
<div>
<div>
<div>
<div>
<div class="yiv698246454MsoNormal">for example i want to read the &nbsp;value of &nbsp;sip-header '&nbsp;CSeq' &nbsp; in lua(that is configure for mod_xml in /usr/loca/freeswitch/conf/autoload/lia.xml.conf), must to issue as follow:<u></u><u></u></div>

</div>
<div>
<div class="yiv698246454MsoNormal">local var = session:getVariable("sip_CSeq")<u></u><u></u></div>
</div>
<div>
<div class="yiv698246454MsoNormal">but the error occure:<u></u><u></u></div>
</div>
<div>
<div class="yiv698246454MsoNormal">&nbsp;attempt to index global 'session' (a nil value)<u></u><u></u></div>
</div>
</div>
</div>
</div>
</div><div>
<div class="yiv698246454MsoNormal"><br>
Lua syntax error. It should be:<u></u><u></u></div>
</div>
</div>
<div class="yiv698246454MsoNormal">local var = session.getVariable("sip_CSeq")<br>
<br>
regards,<br>
Takeshi.<br>
!DSPAM:4ff2c7f532762054221329! <u></u><u></u></div>
</div>
</div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a rel="nofollow" ymailto="mailto:consulting@freeswitch.org" target="_blank" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
http://www.freeswitchsolutions.com<br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
http://www.cudatel.com<br>
<br>
Official FreeSWITCH Sites<br>
http://www.freeswitch.org<br>
http://wiki.freeswitch.org<br>
http://www.cluecon.com<br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br><br>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
 href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br> </div> </div>  </div></body></html>