[Serusers] Re: SER Call Forking with Cisco Routers as SIP endpoints

Psyber psyber1 at gmail.com
Wed Mar 2 23:39:52 CET 2005


    In case anyone sees something similar in the future...  This
turned out to be an IOS bug.  Once I upgraded the routers to something
in the 12.3(x)T train all was well.



On Thu, 17 Feb 2005 18:41:04 -0500, Psyber <psyber1 at gmail.com> wrote:
>     I'm presently working on a SIP setup whereby there are 3 Cisco
> routers which each have analog phones connected to them via FXS ports.
>  All 3 of these routers are connected via an underlying network.  I
> have a machine hanging off from one of these routers running ser.  For
> ease of labelling, I'll call these routers: router1, router2, and
> router3 (SIP server directly connected to this router via ethernet).
> I'm attempting to setup call forking using the UsrLoc database (this
> will eventually be SQL, but for the sake of the short-term I'm just
> storing UsrLoc in memory).  The desired call forking setup looks
> something like this:
> 
> router1 --> router2
>            --> router 3
> 
> router 2 --> router 1
>             --> router 3
> 
> router 3 --> router 1
>             --> router 2
> 
>     I am able to complete calls between router1 and router3 (and
> vice-versa) and carry on a conversation, but when calling between
> router1 and router2 the call completes, but neither party can hear the
> other.  Ironically, router1 and router2 are sitting right next to each
> other (though, connected via another router).  However, The SIP proxy
> is directly connected to router3.  Doing a 'debug voip rtp' I see RTP
> messages travel bidirectionally in a constant stream with correct IP
> addresses and ports until the call ends, but at no point during the
> conversation can either party hear the other.  This would lead me to
> believe that something other than SIP was at play, but when I bypass
> the proxy (point the two routers directly at each other via the
> dial-peer) call completion works and both parties can hear each other
> (I set these up as SIP, not the default H.323).  Below is my ser.cfg
> file and the output of 'serctl ul show' for the static UsrLoc entries
> that I've created.  The routers are setup with simple dial-peers and a
> sip-ua.
> 
> I've verified that there isn't any type of ACL or firewall to obstruct
> the conversation.  Every router is able to reach each other router as
> well as the proxy server.  I'm using private address space at present,
> but NAT isn't being done at any point.  I've pondered trying rtp_proxy
> and forcing the bearer (RTP) traffic through the proxy, but that isn't
> a particularly good solution for my environment.
> 
> Any help would be greatly appreciated.  I'm hoping that it's just a
> case of broken logic in my ser.cfg.  Please CC: this address in your
> reply as I'm not currently on the mailing list.
> 
> Most of the configuration is derived from the sample configurations
> that I ran into.
> 
> ---ser.cfg start---
> 
> # ----------- global configuration parameters ------------------------
> 
> debug=7         # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=yes        # (cmd line: -E)
> 
> /* Uncomment these lines to enter debugging mode
> #debug=7
> #fork=no
> #log_stderror=yes
> */
> 
> check_via=no    # (cmd. line: -v)
> dns=no           # (cmd. line: -r)
> rev_dns=no      # (cmd. line: -R)
> listen=192.168.1.2
> port=5060
> mhomed=1
> #children=4
> fifo="/tmp/ser_fifo"
> 
> # ------------------ module loading ----------------------------------
> 
> # Uncomment this if you want to use SQL database
> #loadmodule "/usr/local/lib/ser/modules/mysql.so"
> 
> loadmodule "/usr/local/lib/ser/modules/sl.so"
> loadmodule "/usr/local/lib/ser/modules/tm.so"
> loadmodule "/usr/local/lib/ser/modules/rr.so"
> loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> loadmodule "/usr/local/lib/ser/modules/registrar.so"
> 
> # Uncomment this if you want digest authentication
> # mysql.so must be loaded !
> #loadmodule "/usr/local/lib/ser/modules/auth.so"
> #loadmodule "/usr/local/lib/ser/modules/auth_db.so"
> 
> # ----------------- setting module-specific parameters ---------------
> 
> # -- usrloc params --
> 
> modparam("usrloc", "db_mode",   0)
> 
> # Uncomment this if you want to use SQL database
> # for persistent storage and comment the previous line
> #modparam("usrloc", "db_mode", 2)
> 
> # -- auth params --
> # Uncomment if you are using auth module
> #
> #modparam("auth_db", "calculate_ha1", yes)
> #
> # If you set "calculate_ha1" parameter to yes (which true in this config),
> # uncomment also the following parameter)
> #
> #modparam("auth_db", "password_column", "password")
> 
> # -- rr params --
> # add value to ;lr param to make some broken UAs happy
> modparam("rr", "enable_full_lr", 1)
> 
> # -------------------------  request routing logic -------------------
> 
> # main routing logic
> alias="ser"
> 
> 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");
>                 break;
>         };
>         if (msg:len > max_len ) {
>                sl_send_reply("513", "Message too big");
>                break;
>        };
> 
>         # 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=="INVITE") record_route();
> 
>         # loose-route processing
>         if (loose_route()) {
>                 t_relay();
>                 break;
>         };
> 
>         # if the request is for other domain use UsrLoc
>         # (in case, it does not work, use the following command
>         # with proper names and addresses in it)
>         if (uri==myself) {
> 
>                 if (method=="REGISTER") {
> 
> # Uncomment this if you want to use digest authentication
> #                       if (!www_authorize("iptel.org", "subscriber")) {
> #                               www_challenge("iptel.org", "0");
> #                               break;
> #                       };
> 
>                         save("location");
>                         break;
>                 };
> 
>                 # native SIP destinations are handled using our USRLOC DB
>                 if (!lookup("location")) {
>                         sl_send_reply("404", "Not Found");
>                         break;
>                 };
>         };
>         # forward to current uri now; use stateful forwarding; that
>         # works reliably even if we forward from TCP to UDP
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
> 
> }
> 
> ---end ser.cfg---
> 
> ---start static UsrLoc entries---
> 
> ser# ../../sbin/serctl ul show 222
> 200 OK
> <sip:222@<router2 IP>:5060>;q=1.00;expires=1003718231
> <sip:222@<router3 IP>:5060>;q=1.00;expires=1003718231
> 
> ser# ../../sbin/serctl ul show 111
> 200 OK
> <sip:111@<router1 IP>:5060>;q=1.00;expires=1003718231
> <sip:111@<router3 IP>:5060>;q=1.00;expires=1003718231
> 
> ser# ../../sbin/serctl ul show 333
> 200 OK
> <sip:111@<router1 IP>:5060>;q=1.00;expires=1003718231
> <sip:222@<router2 IP>:5060>;q=1.00;expires=1003718231
> 
> ---end static UsrLoc entries---
> 
> Thank you.
>




More information about the sr-users mailing list