<div dir="ltr">You can use the $env variable and getHeader:<div><br></div><div><div>our $env;</div><div>my $uuid = $env-&gt;getHeader(&#39;uuid&#39;);<br></div><div>my $dest_num = $env-&gt;getHeader(&#39;Caller-Destination-Number&#39;);<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Note that this is for mod_perl and that&#39;s what you are using. perlmod and ESL are a bit different.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
To see all the channel variables you can do this:</div><div class="gmail_extra"><div class="gmail_extra">our $env;</div><div class="gmail_extra">open(FILEOUT,&#39;&gt;&#39;,&#39;/var/log/channeldata.txt&#39;);</div><div class="gmail_extra">
print FILEOUT $env-&gt;serialize;</div><div class="gmail_extra">close(FILEOUT);</div><div><br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">
Ali Pey</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 5, 2013 at 5:48 AM,  <span dir="ltr">&lt;<a href="mailto:covici@ccs.covici.com" target="_blank">covici@ccs.covici.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">You need to use the api call  instead -- I am not sure how to do this in<br>

Perl, you would have to form an api object and then execute<br>
sofia_contact on that.<br>
<div class=""><div class="h5"><br>
mehroz &lt;<a href="mailto:mehroz.ashraf85@gmail.com">mehroz.ashraf85@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I can get the registration status of a user in XML dialplan with :<br>
&gt; &lt;condition<br>
&gt; field=&quot;${sofia_contact(internal/${<a href="mailto:destination_number%7D@192.168.1.5">destination_number}@192.168.1.5</a>)}&quot;<br>
&gt; expression=&quot;error/user_not_registered&quot;&gt;<br>
&gt; ... and route the call accordingly.<br>
&gt;<br>
&gt; I am writing a perl script and calling it in XML with<br>
&gt; &lt;action application=&quot;perl&quot; data=&quot;/usr/local/src/<a href="http://test.pl/" target="_blank">test.pl/</a>&gt;<br>
&gt;<br>
&gt; and want to get the same registration status from the same CHANNEL VARIABLE.<br>
&gt; I can get CHANNEL VARIABLE using<br>
&gt; $session-&gt;getVariable(&quot;variable&quot;);<br>
&gt; but cannot get ${sofia_contact(internal/${<a href="mailto:destination_number%7D@192.168.1.5">destination_number}@192.168.1.5</a>)}<br>
&gt; value with this procedure.<br>
&gt;<br>
&gt; I believe this is not actually a CHANNEL VARIABLE , but I cant find ant<br>
&gt; other way of retrieving this information within my script.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/Perl-equivalent-dialplan-tp7595980.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/Perl-equivalent-dialplan-tp7595980.html</a><br>

&gt; Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
&gt;<br>
&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
</div></div><span class=""><font color="#888888">--<br>
Your life is like a penny.  You&#39;re going to lose it.  The question is:<br>
How do<br>
you spend it?<br>
<br>
         John Covici<br>
         <a href="mailto:covici@ccs.covici.com">covici@ccs.covici.com</a><br>
</font></span><div class=""><div class="h5"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a 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>
FreeSWITCH-users mailing list<br>
<a 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>
</div></div></blockquote></div><br></div><img class="" src="https://contactmonkey.com/api/v1/tracker?cm_session=1bc46fa9-36e5-4fd7-8af6-d35360531272&amp;cm_type=open&amp;cm_user_email=alipey@gmail.com"></div></div>