you can pass the caller_id_number parameter to the Lua script e.g. <br><action application="lua" data="/usr/local/freeswitch/scripts/foo.lua ${caller_id_number}"/><br>-nandy<br>
<br><br><div class="gmail_quote">On Mon, Apr 5, 2010 at 11:00 PM, Uzo Uzo <span dir="ltr"><<a href="mailto:uzoechi@yahoo.com">uzoechi@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I probably am doing this wrong, but here is what I have.<br>
I have a bunch of DID's. I want my lua script to intercept all calls then<br>
handle them based on which DID was called.<br>
<br>
What I have done is create my lua script foo.lua<br>
<br>
then in the dialplan/default.xml<br>
<br>
I have<br>
<extension name="mylua"><br>
<condition field="destination_number" "expression="^1002$"><br>
<action application="lua" data="/usr/local/freeswitch/scripts/foo.lua"/><br>
</condition><br>
</extension><br>
<br>
then i forward all my DIDs to extension 1002@myfreeswitchbox<br>
<br>
when I get a call to the DID the lua script intercepts it, is this the best way?<br>
<br>
from the lua script, I can do session:getVariable("caller_id_number")<br>
<br>
but that gives me the caller id of the incoming number, which is cool.<br>
which variable can i examine to get the DID number?<br>
<br>
thanks.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<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>