[SR-Users] Any modules with LRN dipping capacity?

KamDev Essa kamdevessa at yahoo.com
Tue May 22 22:47:22 CEST 2018


 By going http_query I could kill 2 birds with 1 stone.
   
   - dip LRN
   - dip db and get composed LCR string for my Contact header.

Then Kamailio just update the contact header and replies 300 back and we are off to the races.
Basically moving business logic off kamailio and keeping it lean and mean. 
 KD 

    On Tuesday, May 22, 2018, 4:29:53 PM EDT, KamDev Essa <kamdevessa at yahoo.com> wrote:  
 
  James,
Thanks great example. I think I will go with 
http_query(url, result)
route because I am not as savvy @ python or lua as I am on C# over .NetCore. Yes I can see delays with the two resource hop. I am hoping its not too much. 
KD      

    On Tuesday, May 22, 2018, 4:04:36 PM EDT, James Cloos <cloos at jhcloos.com> wrote:  
 
 For reference, this is how my lrn provder replies to a dns query:

; <<>> DiG 9.11.2 <<>> @enum.AnEnumProvider.com -t naptr 3.2.6.4.2.6.5.5.7.7.1.lrn.e164.arpa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7531
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;3.2.6.4.2.6.5.5.7.7.1.lrn.e164.arpa. IN        NAPTR

;; ANSWER SECTION:
3.2.6.4.2.6.5.5.7.7.1.lrn.e164.arpa. 30 IN NAPTR 10 10 "u" "E2U+pstn:tel" "!^.*$!tel:+17755624623;rn=+17753840044;npdi!" .

;; Query time: 79 msec
;; SERVER: 108.166.172.197#53(108.166.172.197)
;; WHEN: Tue May 22 16:02:15 EDT 2018
;; MSG SIZE  rcvd: 130


So he needs to send the naptr query to a specific host, and to grab and
unpack the answer to get the rn.


To the OP, I suspect the only good way to do that with kamailio is to
use one of the Turing complete modules (perl, lua, python or the like)
to write the necessary code.

Or write your own kamailio module.

The answer is likely the same when using a web-based api to do the dips.

-JimC
-- 
James Cloos <cloos at jhcloos.com>        OpenPGP: 0x997A9F17ED7DAEA6


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180522/2fb7ebd4/attachment.html>


More information about the sr-users mailing list