[sr-dev] git:master: test/unit: updates to unit 7
Daniel-Constantin Mierla
miconda at gmail.com
Thu Oct 2 11:56:32 CEST 2014
Module: sip-router
Branch: master
Commit: 73fef4d500e58600758ac1c2b4eadf66d4b506a1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=73fef4d500e58600758ac1c2b4eadf66d4b506a1
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Thu Oct 2 11:55:59 2014 +0200
test/unit: updates to unit 7
---
test/unit/7.cfg | 85 ++++++++++++++++++-------------------------------------
test/unit/7.sh | 5 ++-
2 files changed, 31 insertions(+), 59 deletions(-)
diff --git a/test/unit/7.cfg b/test/unit/7.cfg
index f27b575..cf62c82 100644
--- a/test/unit/7.cfg
+++ b/test/unit/7.cfg
@@ -31,10 +31,6 @@
# You have to insert all locally served domains (i.e.
# "kamailioctl domain add your.domain.com").
#
-# nat-mediaproxy:
-# You have to install mediaproxy
-# (http://mediaproxy.ag-projects.com/) for relaying RTP traffic.
-#
# usr-preferences:
# This feature relies on UUID-based provisioning. Thus, you have
# to add the uuid-column to the subscriber table ("alter table
@@ -104,9 +100,9 @@
########################################################################
listen = udp:127.0.0.1:5060
-mpath = "../modules"
+mpath = "../../modules"
children = 8
-debug = 3
+debug = 2
fork = yes
disable_tcp = no
log_facility = LOG_DAEMON
@@ -124,6 +120,8 @@ dns_try_ipv6 = yes
dns_use_search_list = yes
loadmodule "pv/pv.so"
+loadmodule "corex/corex.so"
+loadmodule "kex/kex.so"
loadmodule "usrloc/usrloc.so"
modparam("usrloc", "user_column", "username")
@@ -179,24 +177,22 @@ modparam("mi_fifo", "reply_indent", "\t")
loadmodule "domain/domain.so"
modparam("domain", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
-modparam("domain", "db_mode", 1)
modparam("domain", "domain_table", "domain")
modparam("domain", "domain_col", "domain")
loadmodule "nathelper/nathelper.so"
modparam("nathelper", "natping_interval", 0)
modparam("nathelper", "ping_nated_only", 1)
-modparam("nathelper", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")
-modparam("nathelper", "rtpproxy_disable_tout", 60)
-modparam("nathelper", "rtpproxy_tout", 1)
-modparam("nathelper", "rtpproxy_retr", 5)
modparam("nathelper", "sipping_method", "OPTIONS")
modparam("nathelper", "received_avp", "$avp(i:801)")
-loadmodule "textops/textops.so"
+loadmodule "rtpproxy/rtpproxy.so"
+modparam("rtpproxy", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")
+modparam("rtpproxy", "rtpproxy_disable_tout", 60)
+modparam("rtpproxy", "rtpproxy_tout", 1)
+modparam("rtpproxy", "rtpproxy_retr", 5)
-loadmodule "mediaproxy/mediaproxy.so"
-modparam("mediaproxy", "mediaproxy_socket", "/var/run/proxydispatcher.sock")
+loadmodule "textops/textops.so"
loadmodule "siputils/siputils.so"
@@ -216,7 +212,7 @@ modparam("registrar", "path_use_received", 0)
modparam("registrar", "received_avp", "$avp(i:801)")
loadmodule "sl/sl.so"
-modparam("sl", "enable_stats", 1)
+modparam("sl", "bind_tm", 1)
loadmodule "db_mysql/db_mysql.so"
modparam("db_mysql", "ping_interval", 300)
@@ -224,8 +220,6 @@ modparam("db_mysql", "auto_reconnect", 1)
loadmodule "auth/auth.so"
modparam("auth", "nonce_expire", 300)
-modparam("auth", "rpid_suffix", ";party=calling;id-type=subscriber;screen=yes")
-modparam("auth", "rpid_avp", "$avp(s:rpid)")
loadmodule "auth_db/auth_db.so"
modparam("auth_db", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
@@ -274,25 +268,9 @@ modparam("permissions", "peer_tag_avp", "$avp(s:peer_uuid)")
loadmodule "lcr/lcr.so"
modparam("lcr", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
-modparam("lcr", "gw_table", "gw")
-modparam("lcr", "gw_name_column", "gw_name")
-modparam("lcr", "ip_addr_column", "ip_addr")
-modparam("lcr", "port_column", "port")
-modparam("lcr", "uri_scheme_column", "uri_scheme")
-modparam("lcr", "transport_column", "transport")
-modparam("lcr", "grp_id_column", "grp_id")
-modparam("lcr", "lcr_table", "lcr")
-modparam("lcr", "strip_column", "strip")
-modparam("lcr", "prefix_column", "prefix")
-modparam("lcr", "from_uri_column", "from_uri")
-modparam("lcr", "priority_column", "priority")
-modparam("lcr", "gw_uri_avp", "$avp(i:1400)")
-modparam("lcr", "ruri_user_avp", "$avp(i:1402)")
-modparam("lcr", "fr_inv_timer_avp", "$avp(s:fr_inv_timer_avp)")
-modparam("lcr", "fr_inv_timer", 90)
-modparam("lcr", "fr_inv_timer_next", 30)
-modparam("lcr", "rpid_avp", "$avp(s:rpid)")
-modparam("lcr", "flags_avp", "$avp(i:712)")
+modparam("lcr", "gw_uri_avp", "$avp(709)")
+modparam("lcr", "ruri_user_avp", "$avp(500)")
+modparam("lcr", "tag_avp", "$avp(lcr_tag)")
loadmodule "uac_redirect/uac_redirect.so"
modparam("uac_redirect", "default_filter", "accept")
@@ -308,9 +286,10 @@ modparam("alias_db", "alias_domain_column", "alias_domain")
modparam("alias_db", "use_domain", 0)
loadmodule "uac/uac.so"
-modparam("uac", "rr_store_param", "vsf")
-modparam("uac", "from_restore_mode", "auto")
-modparam("uac", "from_passwd", "s1p:Wiz4rd!")
+modparam("uac", "rr_from_store_param", "vsf")
+modparam("uac", "rr_to_store_param", "vsf")
+modparam("uac", "restore_mode", "auto")
+modparam("uac", "restore_passwd", "s1p:Wiz4rd!")
loadmodule "acc/acc.so"
modparam("acc", "early_media", 0)
@@ -337,17 +316,9 @@ modparam("acc", "multi_leg_info", "src_leg=$avp(i:901);dst_leg=$avp(i:902)")
########################################################################
# Request route 'main'
########################################################################
-route[0]
-{
+request_route {
xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
force_rport();
- if(msg:len > max_len)
- {
-
- xlog("L_INFO", "Message too big - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
- sl_send_reply("513", "Message Too Big");
- exit;
- }
if (!mf_process_maxfwd_header("10"))
{
@@ -368,7 +339,7 @@ route[0]
}
if(is_method("CANCEL") || is_method("BYE"))
{
- end_media_session();
+ rtpproxy_destroy();
}
if(loose_route())
{
@@ -562,7 +533,7 @@ route[10]
{
if(isflagset(22))
{
- end_media_session();
+ rtpproxy_destroy();
}
}
@@ -635,7 +606,7 @@ route[12]
if(!isflagset(22) && !search("^Content-Length:[ ]*0"))
{
setflag(22);
- use_media_proxy();
+ rtpproxy_manage();
}
t_on_reply("2");
@@ -669,12 +640,12 @@ route[12]
xlog("L_INFO", "Request leaving server, D-URI='$du' - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
# no 100 (we already sent it) and no DNS blacklisting
- if(!t_relay("0x05"))
+ if(!t_relay_to("0x05"))
{
sl_reply_error();
if(is_method("INVITE") && isbflagset(6))
{
- end_media_session();
+ rtpproxy_destroy();
}
}
exit;
@@ -687,7 +658,7 @@ route[12]
route[13]
{
sl_send_reply("100", "Trying");
- if(from_gw())
+ if(from_gw(1))
{
$avp(s:caller_uuid) = "0";
@@ -835,7 +806,7 @@ route[16]
if(uri =~ "^sip:[0-9]+@")
{
# only route numeric users to PSTN
- if(!load_gws())
+ if(!load_gws(1))
{
xlog("L_ERR", "Error loading PSTN gateways - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
@@ -1027,7 +998,7 @@ onreply_route[2]
{
if(!search("^Content-Length:[ ]*0"))
{
- use_media_proxy();
+ rtpproxy_manage();
}
}
exit;
@@ -1097,7 +1068,7 @@ failure_route[2]
route(14);
exit;
}
- if($avp(s:cfc) != NULL)
+ if($avp(s:cfc) != $null)
{
avp_delete("$avp(s:acc_caller_user)/g");
avp_delete("$avp(s:acc_caller_domain)/g");
diff --git a/test/unit/7.sh b/test/unit/7.sh
index b2851a4..b4dab07 100755
--- a/test/unit/7.sh
+++ b/test/unit/7.sh
@@ -33,10 +33,11 @@ if ! (check_kamailio); then
fi ;
# start
-$BIN -w . -f $CFG > /dev/null
+$BIN -w . -f $CFG -a no -E -e -dd
+#> /dev/null
ret=$?
sleep 1
$KILL
-exit $ret
\ No newline at end of file
+exit $ret
More information about the sr-dev
mailing list