I found the answer myself: The hostname has to be 'any', since something is evaluated on it. What exactly hostname it refers to I don't know, but 'any' makes it take...any.<div><br></div><div>--Anders<br>
<br><div name="sig_606433cd16" style="margin:0pt"></div><div class="gmail_quote">On Sun, Oct 21, 2012 at 2:16 PM, Anders Sonderkjaer <span dir="ltr"><<a href="mailto:betterzystems@gmail.com" target="_blank">betterzystems@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>I cannot get fetch the data in db_data from the dialplan. The ODBC is running and has been tested. </div>
<div><br></div><div>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?</div>
<div><br></div><div>This is what I am doing in the dialplan:</div><div><br></div><div><div> <extension name="incoming_did"></div><div> <condition field="${sip_received_ip}" expression="^1.2.3.\d+$"/></div>
<div> <condition field="destination_number" expression="^(\d+)$"></div><div> <action application="info"/></div><div> <action application="set" data="sip_to_user=${db(select/forward/${sip_to_user})}"/></div>
<div> <action application="bridge" data="sofia/gateway/main_trunk/9999$1"/></div><div> </condition></div><div> </extension></div></div><div><br></div><div>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.</div>
<div><br></div><div>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. </div>
<div>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).</div>
<div><br></div><div>Input would really be appreciated!</div><div><br></div><div>Thanks,</div><div>A.</div>
</blockquote></div><br></div>