Hi folk!
I am trying to implement srv_query usage in my script (server is based on Kamailio+Asterisk). The task: when outgoing REGISTER comes from Asterisk (outgoing trunk to operator), and R-URI consists domain name, need to store all ip-addresses of remote side (for following use) Currently, this works using dns_query, and storing in htable structure with remote IPs. But if remote side use SRV, I do not have all IPs
Trying to use srv_query function from ipops, I am stuck with following: - srv_query(srvcname, pvid) to get srvcname - for example, "_sip._tcp.example.com", I need to provide, NAPTR record lookup (that is according to RFC3263, and Kamailio does this in core, while request processing) but I see no way how to make NAPTR lookup from script (not involving non Kamailio tools)
Looking in mail list archive, found nothing that could help. What I am missing, is there an easy solution, how to cope with my case?
Would appreciate any suggestion or idea.
Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/srv-query-question-tp146546.html Sent from the Users mailing list archive at Nabble.com.
Hi all!
any suggestions here?
thanks in advance for any idea or thought!
cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/srv-query-question-tp146546p146594.h... Sent from the Users mailing list archive at Nabble.com.
Hello,
either you extend the module to export a function for naptr query if you have C dev background or use an embedded interpreter (eg., app_lua, which is very fast) to do the complex dns chain of queries. Alternative to embedded interpreters is to use exec module or do some external api call via http, return the result in xml or json format and then use xmlops or janson modules to handle it.
Cheers, Daniel
On 18/03/16 07:41, Vasiliy Ganchev wrote:
Hi all!
any suggestions here?
thanks in advance for any idea or thought!
cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/srv-query-question-tp146546p146594.h... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel!
Thank you for suggestion!
will give it a shot, after getting working result - report here.
cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/srv-query-question-tp146546p146600.h... Sent from the Users mailing list archive at Nabble.com.