[OpenSER-Users] Re: Problem with SRV lookups

Tim Madorma tmadorma at gmail.com
Thu Sep 13 19:27:25 CEST 2007


One change, the call to seturi is actually:

seturi("sip:feature_fs at _sip._udp.aimcidfilter.com:6010");

On 9/13/07, Tim Madorma <tmadorma at gmail.com> wrote:
> Hi,
>
> I have a simple application where I am trying to an SRV record to load
> balance towards a few different destination servers.
>
> I set up my DNS server to resolve to four different destination A
> record URIs - something like:
>
> _sip._udp.aimcidfilter.com 180 IN SRV 1 50 5061 crunch.com.
> _sip._udp.aimcidfilter.com 180 IN SRV 1 50 5061 spinner.com.
> _sip._udp.aimcidfilter.com 180 IN SRV 2 50 5061 homer.com.
> _sip._udp.aimcidfilter.com 180 IN SRV 2 50 5061 bart.com.
>
> In my configuration file, I am putting a domain name in my call to
> seturi as follows:
>
> seturi("sip:feature_fs at aimcidfilter.com:6010");
>
> and then I call route to send the INVITE.
>
> I was expecting to see a NAPTR and SRV record attempts, but when I
> sniffed DNS, I only saw A record attempts.
>
> Any advice would be very helpful.
>
> thanks,
> Tim
>
> ------------------------------------
>
> My configuration file looks as follows:
>
> #
> # TWC OpenSER SIP Proxy for Caller ID - openser_cid.cfg
> #
> # ----------- global configuration parameters ------------------------
>
> debug=5            # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=no    # (cmd line: -E)
>
> maxbuffer=1048576
>
> check_via=no    # (cmd. line: -v)
> dns=no          # (cmd. line: -r)
> rev_dns=no      # (cmd. line: -R)
> #reply_to_via=1
> children=4
> log_facility=LOG_LOCAL4
> dns_use_search_list=no
> dns_servers_no=2  # One for the ENUM server and one for other DNS lookups
> user="sipproxy"
> group="sipproxy"
> disable_dns_blacklist=yes  # FOR TESTING ONLY
> dns_try_ipv6=no   # FOR TESTING ONLY
>
> # Local IP Address and port to listen to
> # Set the following IP addresses to the value of the local e1000g0 interface
> listen=udp:65.185.232.62:5060
>
> # Alias IP address/port pair values will be in the Req URI when the
> # OpenSER is being load balanced with a BIG IP server
> # Set the IP addresses to the value of the associated blade
> # of the BIG IP that is load balancing for the SIP Proxy server.
> alias=65.185.233.104:5060
>
> # LOAD OpenSER MODULES
> mpath="/sw/lib/openser/modules/"
> loadmodule "sl.so"
> loadmodule "tm.so"
> loadmodule "rr.so"
> loadmodule "maxfwd.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> loadmodule "acc.so"
> loadmodule "mi_fifo.so"
> loadmodule "xlog.so"
>
> # ----------------- setting module-specific parameters ---------------
>
> # -- usrloc params --
>
> modparam("usrloc", "db_mode",   0)
>
> # -- rr params --
> # add value to ;lr param to make some broken UAs happy
> modparam("rr", "enable_full_lr", 1)
>
> # -------------------------  request routing logic -------------------
> modparam("acc", "log_level", 2)
> modparam("acc", "log_flag", 1)
> modparam("acc","report_cancels", 1)
> modparam("acc","failed_transaction_flag", 1)
> modparam("acc","log_extra", "req_uri=$rU")
> modparam("tm", "fr_timer", 5)
> modparam("tm","fr_inv_timer",5)
> modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
>
> # main routing logic
>
> route{
>         # initial sanity checks -- messages with
>         # max_forwards==0, or excessively long requests
>         if (!mf_process_maxfwd_header("10")) {
>                 sl_send_reply("483","Too Many Hops");
>                 exit;
>         };
>
>         if (msg:len >=  2048 ) {
>                 sl_send_reply("513", "Message too big");
>                 exit;
>         };
>
>         # we record-route all messages -- to make sure that
>         # subsequent messages will go through our proxy; that's
>         # particularly good if upstream and downstream entities
>         # use different transport protocol
>         if (!method=="REGISTER")
>                 record_route();
>
>         # subsequent messages within a dialog should take the
>         # path determined by record-routing
>         if (loose_route()) {
>                 # mark routing logic in request
>                 append_hf("P-hint: rr-enforced\r\n");
>                 route(1);
>         };
>
>         if (!uri==myself) {
>                 route(1);
>         };
>
>         if (method=="OPTIONS") {
>             sl_send_reply("200", "OK");
>             exit;
>         }
>
>         if (uri =~ "^sip:feature_fs@" || method=="NOTIFY") {
>             xlog("L_DBG", "TWC: received incoming message:\n <$mb>\n");
>             seturi("sip:feature_fs at aimcidfilter.com:6010");
>             setflag(1);
>             route(1);
>         }  else {
>           sl_send_reply("404", "Not Found");
>         };
> }
>
> #####################################################
> # Default Message Handler
> #####################################################
> route[1] {
>
>         # Send it out now; use stateful forwarding as it works reliably
>         # even for UDP2TCP
>         if (!t_relay()) {
>                 sl_reply_error();
>        };
>         exit;
> }
>




More information about the Users mailing list