[SR-Users] Kamailio as a SBC

Guillaume tetram100 at hotmail.fr
Thu Dec 17 11:30:10 CET 2015


Thanks a lot ! :D 
A followed your advices and now everything work pretty well and I have the expected behavior from kamailio !

I use rtpengine instead of rtpproxy and I have not segfault anymore (I think there were some because of my bad conf that made rtpproxy enter in bad states).

Here is my new conf in case someone would be interested by it:

------------------------------------------------------

#!KAMAILIO

####### Defined Values #########

#!define ASTERISK 192.168.51.43

####### Global Parameters #########

#!ifdef WITH_DEBUG
debug=4
log_stderror=no
#!else
debug=2
log_stderror=no
#!endif

memdbg=5
memlog=5

log_facility=LOG_LOCAL0

fork=yes
children=2

auto_aliases=no

# to avoid simple attacks, use unconventional port
port=5060

####### Modules Section ########

mpath="/usr/local/lib/kamailio/modules"

loadmodule "tm.so"
loadmodule "db_text.so"
loadmodule "mi_fifo.so"
loadmodule "kex.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "mi_rpc.so"
loadmodule "path.so"
loadmodule "rtpengine.so"

#!ifdef WITH_DEBUG
loadmodule "debugger.so"
#!endif

# ----------------- setting module-specific parameters ---------------


modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")


# add value to ;lr param to cope with most of the UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)

modparam("path", "use_received", 1)
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:12221")

#!ifdef WITH_DEBUG
# ----- debugger params -----
modparam("debugger", "cfgtrace", 1)
#!endif

####### Routing Logic ########


route {
    if (!sanity_check()) {
        exit;
    }

    if ( !mf_process_maxfwd_header("10") )
    {
        sl_send_reply("483","To Many Hops");
        xlog("L_NOTICE", "$si $rm $ru -- too many hops\n");
        exit;
    }

    force_rport();
    if (src_ip != ASTERISK)
    {
        $du = "sip:192.168.51.43:5060";
        add_path_received();
        route(RTPPROXY);
        record_route();
    }
    else
    {
        loose_route();
        route(RTPPROXY);
        record_route();
     }
    
    t_relay();
}


route[RTPPROXY] {
        t_on_reply("1");
        rtpengine_manage();
}

onreply_route[1] {
    rtpengine_manage();
}

-------------------------------------------------

Guillaume


> Date: Thu, 17 Dec 2015 01:30:55 -0700
> From: vasiliy.ganchev at wildix.com
> To: sr-users at lists.sip-router.org
> Subject: Re: [SR-Users] Kamailio as a SBC
> 
> hi!
> 
> for reply, to pass rtpproxy_manage, look in this function (in your config it
> is not used, and onreply_route is not passed for replies)
> http://kamailio.org/docs/modules/4.2.x/modules/tm#tm.f.t_on_reply
> 
> about segfaults - provide more info
> 
> also can suggest, try using rtpengine instead of rtpproxy
> 
> cheers
> 
> 
> 
> --
> View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-as-a-SBC-tp144010p144022.html
> Sent from the Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-user
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151217/0458c8d9/attachment.html>


More information about the sr-users mailing list