Hi All,
I am working on a kamailio proxy with a very specific goal I need to accomplish.
What I would like to do is a key-value lookup, utilizing the SDP's media contact (c=
line) IP as a key, and have a function return a value for that key. It appears that I can
possibly accomplish this with the AVPops module, combined with DB_TEXT (maybe DB_MYSQL in
the future) and a custom table with a custom query. The only thing I seem to be missing is
the ability to extract the c= IP from the SDP, and store it as some kind of variable with
which to do the lookup.
I've looked into the iptrtpproxy module as it seems to have a select:
@iptrtpproxy.sdp_ip that could work, but that module is extreme overkill for my purposes,
and I am running into some issues getting it built for my platform (Ubuntu server 12.04).
Also the documentation for that select states: "Return first rewritten IP provided at
SDP c= line." However, I'm looking for the original sdp_ip, and have some concern
that this won't return an IP that has not yet been re-written.
My environment has a very specific 1:1 ratio of private network, to static public IP
mappings. I currently have a successful OpenSER (1.3.2) deployment within this environment
(running 5 years), which uses a hacked version of the old "mangler" module, with
the function sdp_mangle_ip(<network>, <ip>). I could do something similar
using textops->search_body() and nathelper->fix_nated_sdp(), but the risk of a typo
or syntax error in the config file every time I have to make a change or add a network is
fairly high. Less importantly, there is some extra overhead as the proxy will have to test
for every network on every SDP looking for a match (this is what the current deployment
does). Eventually I'd like to add a simple frontend to add/edit networks on the fly,
so that no one is ever touching the config.
What would you folks recommend for this? Should I look at building a custom module which
only grabs the c= IP and stores it into an AVP? Am I not seeing another module that will
expose that information for me already? Would it simply be easier to work on getting
iptrtpproxy built, and utilizing it only for the purpose of extracting the information I
need from the SDP?
Any insight would be most greatly appreciated.
Thanks,
Travis Hegner
________________________________
The information contained in this communication is confidential and is intended only for
the use of the named recipient. Unauthorized use, disclosure, or copying is strictly
prohibited and may be unlawful. If you have received this communication in error, you
should know that you are bound to confidentiality, and should please immediately notify
the sender or our IT Department at 866.459.4599.