Hello,
exit from configuration file can happen if a function returns 0.
Can you use debugger module with cfgtrace parameter set to 1 and see
what is the last function executed in the configuration file?
Cheers,
Daniel
On 11/12/13 17:49, Flavio Battimo wrote:
Hello,
i'm encountering in some strange behaviours while working with S-CSCF
version: kamailio 4.1.0 (x86_64/linux) 350d2e
Making some tests, in particular with Ro interface for online
charging, the script execution doesn't follow normal flow (checking it
by adding some xlog call).
Looking at the following code script, i have made some modifications:
1) Modify the P-Asserted-Identity so as to add angle brackets to the value.
2) Add user=phone parameter to uri if it doesn't exists
3) Enabled RO interface for accounting
The amazing thing is that if kamailio is executed with this script the
whole flow terminates without any notice just after record_route()
call. Making some attempts, removing record_route() call flow
continues until Ro_CCR method, where same behaviour appears (call flow
is unpredictable terminated and no diameter CCR request is made)
Which kind of operations can lead to this strange behaviour
If is needed i can attach some logs in debug level mode
Thanks in advance
######################################################################
# Originating, Intial Requests
######################################################################
route[orig]
{
xlog("L_DBG","Enter orig route\n");
# modifica di P-Asserted-Identity
subst('/P\-Asserted\-Identity:[
]*([\+0-9a-z@\.\-\:]*)/P-Asserted-Identity: <\1>\r\n/ig');
if ($ru =~ ".*;user=phone.*" ){
xlog("L_DBG","Parameter user=phone already exists");
} else {
xlog("L_DBG","Adding parameter user=phone");
$ru = $ru + ";user=phone";
}
xlog("L_DBG","$rm $ru");
set_dlg_profile("orig");
# we MAYBE need something like this to check if a user is barred
# if (S_originating_barred()){
# sl_send_reply("403","Forbidden - Originating Public Identity
barred");
# exit;
# }
xlog("L_DBG","Checking AVP mo custom\n");
if (is_method("INVITE|SUBSCRIBE")) {
xlog("L_DBG","Adding AVP mo custom parameter\n");
$avp(RR_CUSTOM_USER_AVP)="mo";
xlog("L_DBG","call record_route\n");
record_route();
}
#!ifdef WITH_RO
# before we allow call - lets check credit
xlog("L_DBG","Checking if RO must be called\n");
if (is_method("INVITE")) {
xlog("L_DBG","Sending initial CCR Request for call\n");
Ro_CCR("CHARGING_CCR_REPLY", "orig", "SCUR", "",
"30");
}
#!else
xlog("L_DBG","calling route[finalize_orig]");
route(Finalize_Orig);
#!endif
}
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda