Hi,
I'm using the xhttp_pi module to query the kamailio user registration table "location". Per the defined clause_cols operators in the module, it doesn't seem possible to achieve a query equivalent to a SQL "contains" or "like". An exact match is required to query the record; e.g., http://xxxxxxx/location/QueryContacts?cmd=on&0=sip:8675309@a.b.c.d:5060;.... Is my understanding correct that there is no way to match on an regular expression? My end goal is to be able to query for a user's AOR and expiration status based on a search string (e.g. 8675309) via a webservice. Can anyone share a better method to do this? Perhaps asynchronously? All feedback is appreciated.
Sample contact field: sip:8675309@a.b.c.d:5060;transport=udp
Sample Framework: <cmd><cmd_name>QueryContacts</cmd_name> <db_table_id>location</db_table_id> <cmd_type>DB1_QUERY</cmd_type> <clause_cols> <col><field>contact</field><operator>=</operator></col> </clause_cols> <query_cols> <col><field>username</field></col> <col><field>contact</field></col> <col><field>expires</field></col> </query_cols> </cmd>
Thanks, Simpson
________________________________ From: "sr-users-request@lists.sip-router.org" sr-users-request@lists.sip-router.org To: sr-users@lists.sip-router.org Sent: Thursday, June 27, 2013 5:00 AM Subject: sr-users Digest, Vol 97, Issue 104
Send sr-users mailing list submissions to sr-users@lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users or, via email, send a message with subject or body 'help' to sr-users-request@lists.sip-router.org
You can reach the person managing the list at sr-users-owner@lists.sip-router.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of sr-users digest..."
Today's Topics:
1. kamailio loadbalancer with TLS problem forwarding INVITE back to UA (Allen Zhang) 2. Re: dialplan not working (Victor V. Kustov)
----------------------------------------------------------------------
Message: 1 Date: Thu, 27 Jun 2013 00:34:00 +0000 From: Allen Zhang Allen.Zhang@imgtec.com To: "sr-users@lists.sip-router.org" sr-users@lists.sip-router.org Cc: Shane Harrison Shane.Harrison@imgtec.com Subject: [SR-Users] kamailio loadbalancer with TLS problem forwarding INVITE back to UA Message-ID: 04588C075527D74CABD19E7C320BCB1C013BE6F6@WEMAIL01.we.imgtec.org Content-Type: text/plain; charset="us-ascii"
Hi,
Our set up:
UA1 ----- ------ Proxy1 \ / Loadbalancer (dispatcher module) / \ UA2----- ------ Proxy2
Both proxies have registrar module loaded and share the same database. REGISTERs work fine. The problem is this: TLS TCP UA1 ----------------------> LB --------------------> Proxy INVITE(to UA2) INVITE(to UA2)
TLS TCP UA1 <------------- LB <------------- Proxy 100 Trying
TLS TCP UA1 <------------- LB <----------------------- Proxy INVITE(to UA2)
TLS TCP UA1 <----------------------- LB <----------------------- Proxy 100 Trying
All above worked fine. Below is what's expected but never happened:
TLS TCP UA2 <----------------------- LB <----------------------- Proxy INVITE(to UA2)
We'd like the LB to reuse the TLS connection initiated by UA2. But LB can't find an open connection and tries to start a new TLS connection. The new connection fails. UAs are not behind NAT at the moment but will be in the future.
Tried this approaches on LB:
route(ADD_CONTACT_ALIAS); If (not from proxy) t_relay(); else do load balancing
No luck.
Any help is appreciated.
Regards,
Allen