> So would the following work as the SQL SELECT statement?
> 
> SELECT gatewayip from routes where calling=left('%r',2)
> 
> Also, it seems like I can add a priority field to the table so that the 
> gatewayip can vary as well?
> 
> If the e.164 of the unit is 212345 and the h.323 name is 
> "[email protected]", what's going to be in the %r field and 
> what's going to be in the %{Calling-Station-Id} ?

I ended up doing this:
QUERY=SELECT gatewayip from routes where 
calling=left(substring_index('%r','=',-1),2)

because the %r being passed from the Polycom endpoint comes through as
"[email protected]=213538" to the SQL query, I ended up using the 
above query.  The substring_index gives me everything to the right of the 
first = sign, and then I'm taking the left two characters (site code) as 
the lookup.

But then I tried
QUERY=SELECT gatewayip from routes where 
calling=left('%{Calling-Station-Id}',2)

and that's working even better, because I'm just getting the 6-digit e.164 
number and don't need as much fancy parsing.

So, yay!


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________________

Posting: mailto:[email protected]
Archive: 
http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/

Reply via email to