[Freeswitch-users] mod db - hostname

Anders Sonderkjaer betterzystems at gmail.com
Sun Oct 21 22:16:50 MSD 2012


Hi,

I cannot get fetch the data in db_data from the dialplan. The ODBC is
running and has been tested.

I have not found any documentation on what the 'hostname' column in the
db_data table should be - so I just put what the server has right now
('freeswitch01') - is that ok?

This is what I am doing in the dialplan:

   <extension name="incoming_did">
      <condition field="${sip_received_ip}" expression="^1.2.3.\d+$"/>
      <condition field="destination_number" expression="^(\d+)$">
         <action application="info"/>
         <action application="set"
data="sip_to_user=${db(select/forward/${sip_to_user})}"/>
         <action application="bridge"
data="sofia/gateway/main_trunk/9999$1"/>
      </condition>
   </extension>

1.2.3 are the first four digits of the IP address I get the call from -
this works, have tested it with a hardcoded forward.

The call sent to FS has the To User set to 2000000. I use this to identify
the user sending the call, and then want to look in db_data to find out
which number the call should be forwarded to. So 2000000 would be the
data_key and the value/data is the number to forward to.
What I want to get out of it, is that a bridge is made to
sofia/gateway/main_trunk/9999forward_number, where the forward_number is
the value/data retrieved from db_data, and 9999 is the prefix for the
termination partner (this works, has been tested).

Input would really be appreciated!

Thanks,
A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121021/65a10f3e/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list