#!KAMAILIO
#
####### Global Parameters #########
### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
log_stderror=yes
memdbg=5
memlog=5
log_facility=LOG_LOCAL0
log_stderror=yes
fork=no
/* uncomment the next line to disable TCP (default on) */
disable_tcp=yes
/* uncomment the next line to disable the auto discovery of local aliases
* based on reverse DNS on IPs (default on) */
auto_aliases=no
/* add local domain aliases */
#alias="sip.mydomain.com"
/* uncomment and configure the following line if you want Kamailio to
* bind on a specific interface/port/proto (default bind on all available) */
#listen=udp:10.0.0.10:5060
/* port to listen to
* - can be specified more than once if needed to listen on many ports */
port=5060
# life time of TCP connection when there is no traffic
# - a bit higher than registration expires to cope with UA behind NAT
tcp_connection_lifetime=3605
####### Modules Section ########
# set paths to location of modules (to sources or installation folders)
mpath="modules"
loadmodule "pv.so"
loadmodule "cfgt.so"
loadmodule "xlog.so"
loadmodule "debugger.so"
# ----------------- setting module-specific parameters ---------------
modparam("cfgt", "basedir", "/log/cfgt")
modparam("cfgt", "mask", 4)
# ----- debugger params -----
modparam("debugger", "cfgtrace", 1)
modparam("debugger", "mod_level_mode", 1)
modparam("debugger", "mod_hash_size", 4)
modparam("debugger", "mod_level", "core=3")
modparam("debugger", "cfgtest", 1)
####### Routing Logic ########
route[TEST1] {
$var(script_var) = "test1";
}
onsend_route {
xlog("onsend\n");
$var(script_var) = "on_send";
}
reply_route {
xlog("reply\n");
$var(script_var) = "on_reply";
}
route[TEST2] {
$var(script_var) = "test2";
}
# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
# - note: this is the same as route { ... }
request_route {
if(status=~"4[0-9][0-9]") {
exit;
}
$var(script_var) = "ini";
route(TEST1);
route(TEST2);
$du = "sip:reply@192.168.106.1";
forward();
exit;
}
confirmed:
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=86 a=16 n=if
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=86 a=63 n=assign
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=87 a=5 n=route
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[TEST1] c=[/etc/kamailio/kamailio.cfg] l=62 a=63 n=assign
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=88 a=5 n=route
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[TEST2] c=[/etc/kamailio/kamailio.cfg] l=76 a=63 n=assign
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=89 a=63 n=assign
kamailio_1 | 13(20) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=90 a=1 n=forward
kamailio_1 | 13(20) DEBUG: <core> [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: 2ba6b842aef10b2968059c36d9581118
kamailio_1 | 13(20) DEBUG: <core> [core/forward.c:557]: forward_request(): Sending:
kamailio_1 | OPTIONS sip:kamailio SIP/2.0
kamailio_1 | Via: SIP/2.0/UDP 172.19.0.2;branch=z9hG4bK2aec.2ba6b842aef10b2968059c36d9581118.0
kamailio_1 | Via: SIP/2.0/UDP 172.19.0.3:36095;received=172.19.0.3;branch=z9hG4bK.38e42f28;rport=44285;alias
kamailio_1 | From: sip:sipsak@172.19.0.3:36095;tag=23de4e29
kamailio_1 | To: sip:kamailio
kamailio_1 | Call-ID: 601771561@172.19.0.3
kamailio_1 | CSeq: 1 OPTIONS
kamailio_1 | Contact: sip:sipsak@172.19.0.3:36095
kamailio_1 | Content-Length: 0
kamailio_1 | Max-Forwards: 70
kamailio_1 | User-Agent: sipsak 0.9.7pre
kamailio_1 | Accept: text/plain
kamailio_1 |
kamailio_1 | .
kamailio_1 | 13(20) DEBUG: <core> [core/forward.c:558]: forward_request(): orig. len=341, new_len=450, proto=1
kamailio_1 | 13(20) ERROR: *** cfgtrace:onsend_route=[TEST1] c=[/etc/kamailio/kamailio.cfg] l=66 a=25 n=xlog
kamailio_1 | 13(20) ERROR: <script>: onsend
kamailio_1 | 13(20) ERROR: *** cfgtrace:onsend_route=[TEST1] c=[/etc/kamailio/kamailio.cfg] l=67 a=63 n=assign
after the fix:
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=86 a=16 n=if
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=86 a=63 n=assign
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=87 a=5 n=route
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[TEST1] c=[/etc/kamailio/kamailio.cfg] l=62 a=63 n=assign
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=88 a=5 n=route
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[TEST2] c=[/etc/kamailio/kamailio.cfg] l=76 a=63 n=assign
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=89 a=63 n=assign
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=90 a=1 n=forward
kamailio_1 | 11(18) DEBUG: <core> [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: 831d32523fe7b7fab3ed5ec35c417c91
kamailio_1 | 11(18) DEBUG: <core> [core/forward.c:557]: forward_request(): Sending:
kamailio_1 | OPTIONS sip:kamailio SIP/2.0
kamailio_1 | Via: SIP/2.0/UDP 172.19.0.2;branch=z9hG4bKda4c.831d32523fe7b7fab3ed5ec35c417c91.0
kamailio_1 | Via: SIP/2.0/UDP 172.19.0.3:37327;received=172.19.0.3;branch=z9hG4bK.63f4bc52;rport=54327;alias
kamailio_1 | From: sip:sipsak@172.19.0.3:37327;tag=1287317e
kamailio_1 | To: sip:kamailio
kamailio_1 | Call-ID: 310849918@172.19.0.3
kamailio_1 | CSeq: 1 OPTIONS
kamailio_1 | Contact: sip:sipsak@172.19.0.3:37327
kamailio_1 | Content-Length: 0
kamailio_1 | Max-Forwards: 70
kamailio_1 | User-Agent: sipsak 0.9.7pre
kamailio_1 | Accept: text/plain
kamailio_1 |
kamailio_1 | .
kamailio_1 | 11(18) DEBUG: <core> [core/forward.c:558]: forward_request(): orig. len=341, new_len=450, proto=1
kamailio_1 | 11(18) ERROR: *** cfgtrace:onsend_route=[DEFAULT_SEND] c=[/etc/kamailio/kamailio.cfg] l=66 a=25 n=xlog
kamailio_1 | 11(18) ERROR: <script>: onsend
kamailio_1 | 11(18) ERROR: *** cfgtrace:onsend_route=[DEFAULT_SEND] c=[/etc/kamailio/kamailio.cfg] l=67 a=63 n=assign
kamailio_1 | 11(18) ERROR: cfgt [cfgt_int.c:332]: cfgt_save_node(): failed to make directory: No such file or directory
kamailio_1 | 11(18) ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=91 a=2 n=exit
kamailio_1 | 11(18) DEBUG: <core> [core/receive.c:344]: receive_msg(): request-route executed in: 2634 usec
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.