Dear list members
I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
---------------------- if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails }
------------------------- if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog
------------- route[name] {
# --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); }
if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup");
# --- DialPlan section --- get the routing group id
xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int}); xlog("----- The destination Drouting GroupID is $avp(s:dstgrp) -----\n "); }
bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n");
# --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; } bm_log_timer("blacklist_lookup"); # --- Dynamic routing section --- route the call based on the routing group id bm_start_timer("drouting_lookup"); if (!do_routing("$avp(s:dstgrp)")) { xlog("----- DRouting don't match dstgrp $avp(s:dstgrp) -----\n");
sl_send_reply("404","Route Not Found -$rU-"); exit; } bm_log_timer("drouting_lookup"); xlog("-----DRouting with $rU and $avp(s:dstgrp) -and $avp(s:service_prefix)----\n"); # Append service prefix in front of number $ru = "sip:" + $avp(s:service_prefix) + $rU + "@" + $rd;
xlog(" ------ $ru ----$rU- $avp(s:user)---\n");
t_on_failure("FAIL_ONE"); route(RELAY); exit; return; }
Regards
Panagiotis
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr
Dear list members
I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails }
if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog
route[name] {
# --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); } if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup"); # --- DialPlan section --- get the routing group id xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int}); xlog("----- The destination Drouting GroupID is
$avp(s:dstgrp) -----\n "); }
bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n"); # --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; }
... set a flag for that, as it's just sending the 403 and then exit
-Laszlo
Dear Lazlo
I did set a flag for it, in fact I set all flags but it does not write anything on the mysql or on a log file.
if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); setflag(1); setflag(2); setflag(3); exit; }
Thanks
Panagiotis
Laszlo wrote:
2010/4/15 Panagiotis Skoulikaritis <pskoul@algonet.gr mailto:pskoul@algonet.gr>
Dear list members I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ? Below are parts of the config file # ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif ---------------------- if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails } ------------------------- if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog ------------- route[name] { # --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); } if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int <http://s.int>}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n"); bm_log_timer("pdt_lookup"); # --- DialPlan section --- get the routing group id xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int <http://s.int>}); xlog("----- The destination Drouting GroupID is $avp(s:dstgrp) -----\n "); } bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n"); # --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; }
... set a flag for that, as it's just sending the 403 and then exit
-Laszlo
You are sending a reply via the sl module and no tm transaction was created. Accounting is bind to tm (a tm transaction must be created in order to have an acc log).
Try to do manual accounting: http://sip-router.org/docbook/sip-router/branch/master/modules_s/acc_syslog/... http://kamailio.org/docs/modules/stable/modules_k/acc.html#id2850646
Regards, Ovidiu Sas
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr:
Dear Lazlo
I did set a flag for it, in fact I set all flags but it does not write anything on the mysql or on a log file.
if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); setflag(1); setflag(2); setflag(3); exit; }
Thanks
Panagiotis
Laszlo wrote:
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr
Dear list members
I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails }
if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog
route[name] {
# --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); } if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup");
# --- DialPlan section --- get the routing group id
xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int}); xlog("----- The destination Drouting GroupID is $avp(s:dstgrp) -----\n "); }
bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n"); # --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; }
... set a flag for that, as it's just sending the 403 and then exit
-Laszlo
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Dear Ovidiu
Thanks, I will give it a try
Regards
Panagiotis
Ovidiu Sas wrote:
You are sending a reply via the sl module and no tm transaction was created. Accounting is bind to tm (a tm transaction must be created in order to have an acc log).
Try to do manual accounting: http://sip-router.org/docbook/sip-router/branch/master/modules_s/acc_syslog/... http://kamailio.org/docs/modules/stable/modules_k/acc.html#id2850646
Regards, Ovidiu Sas
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr:
Dear Lazlo
I did set a flag for it, in fact I set all flags but it does not write anything on the mysql or on a log file.
if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); setflag(1); setflag(2); setflag(3); exit; }
Thanks
Panagiotis
Laszlo wrote:
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr
Dear list members
I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails }
if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog
route[name] {
# --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); } if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup"); # --- DialPlan section --- get the routing group id xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int}); xlog("----- The destination Drouting GroupID is
$avp(s:dstgrp) -----\n "); }
bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n"); # --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; }
... set a flag for that, as it's just sending the 403 and then exit
-Laszlo
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Dear Ovidiu
It worked thanks
Panagiotis
Panagiotis Skoulikaritis wrote:
Dear Ovidiu
Thanks, I will give it a try
Regards
Panagiotis
Ovidiu Sas wrote:
You are sending a reply via the sl module and no tm transaction was created. Accounting is bind to tm (a tm transaction must be created in order to have an acc log).
Try to do manual accounting: http://sip-router.org/docbook/sip-router/branch/master/modules_s/acc_syslog/...
http://kamailio.org/docs/modules/stable/modules_k/acc.html#id2850646
Regards, Ovidiu Sas
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr:
Dear Lazlo
I did set a flag for it, in fact I set all flags but it does not write anything on the mysql or on a log file.
if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); setflag(1); setflag(2); setflag(3); exit; }
Thanks
Panagiotis
Laszlo wrote:
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr
Dear list members
I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
#!endif
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails }
if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog
route[name] {
# --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); } if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup"); # --- DialPlan section --- get the routing group id xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int}); xlog("----- The destination Drouting GroupID is
$avp(s:dstgrp) -----\n "); }
bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n"); # --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; }
... set a flag for that, as it's just sending the 403 and then exit
-Laszlo
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Glad to hear that. Another option (if you want to use flags and avoid manual accounting) would be to create a transaction with t_newtran() and then send a reply via t_reply(code, reason_phrase): http://sip-router.org/docbook/sip-router/branch/master/modules/tm/tm.html#t_... http://sip-router.org/docbook/sip-router/branch/master/modules/tm/tm.html#t_...
Regards, Ovidiu Sas
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr:
Dear Ovidiu
It worked thanks
Panagiotis
Panagiotis Skoulikaritis wrote:
Dear Ovidiu
Thanks, I will give it a try
Regards
Panagiotis
Ovidiu Sas wrote:
You are sending a reply via the sl module and no tm transaction was created. Accounting is bind to tm (a tm transaction must be created in order to have an acc log).
Try to do manual accounting:
http://sip-router.org/docbook/sip-router/branch/master/modules_s/acc_syslog/... http://kamailio.org/docs/modules/stable/modules_k/acc.html#id2850646
Regards, Ovidiu Sas
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr:
Dear Lazlo
I did set a flag for it, in fact I set all flags but it does not write anything on the mysql or on a log file.
if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); setflag(1); setflag(2); setflag(3); exit; }
Thanks
Panagiotis
Laszlo wrote:
2010/4/15 Panagiotis Skoulikaritis pskoul@algonet.gr
Dear list members
I'm using kamailio 3 and the problem that I'm facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record. Is this normal behavior or I need to configure something somewhere ?
Below are parts of the config file
# ----- acc params ----- modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) modparam("acc", "detect_direction", 0) modparam("acc", "failed_transaction_flag", 3) #!ifdef WITH_ACCDB modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 2) modparam("acc", "db_url", "mysql://username:password@localhost/openser") modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); # ... even if the transaction fails }
if (is_method("INVITE")) { setflag(1); # do accounting setflag(2); # log missed calls setflag(3); # log failed calls setflag(4); # do siptrace setflag(5); # log dialog
route[name] {
# --- Remove # or %23 from rU --- bm_start_timer("hash_remove"); if($rU =~ "^.*%+") { xlog("------- The number contains %23 ---- "); $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/}); xlog(" ------- The perl $rU ------- "); } if($rU =~ "^.*#+") { xlog("------- The number contains # ----"); $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/}); xlog("------- The perl $rU ------- "); } bm_log_timer("hash_remove"); # --- PDT section ------ get service prefix to be appended before is send out bm_start_timer("pdt_lookup"); if(!prefix2domain("2", "0")) { sl_send_reply("404", "Prefix not found"); exit; } $var(dstgrp) = 0; $var(dstgrp) = $(rd{s.int}); if($var(dstgrp)==0) { sl_send_reply("404", "Service not found"); exit; } $avp(s:service_prefix) = $var(dstgrp); xlog("--$rU----------- $avp(s:service_prefix) --- PDT ---------\n");
bm_log_timer("pdt_lookup");
# --- DialPlan section --- get the routing group id
xlog("----- The rU is $rU before DP -----\n"); bm_start_timer("dialplan_lookup"); if(dp_translate("1", "$rU/$rU")) { $avp(s:dstgrp) = $(var(dpattrs){s.int}); xlog("----- The destination Drouting GroupID is $avp(s:dstgrp) -----\n "); }
bm_log_timer("dialplan_lookup"); xlog("----- The rU is $rU after DP -----\n"); # --- Global Blacklist section --- bm_start_timer("blacklist_lookup"); if(!check_blacklist("globalblacklist")){ xlog("----- The number is blacklisted globaly! -----"); sl_send_reply("403", "Forbidden"); exit; }
... set a flag for that, as it's just sending the 403 and then exit
-Laszlo
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users