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
}
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:
- Modify the P-Asserted-Identity so as to add angle brackets to the value.
- Add user=phone parameter to uri if it doesn't exists
- 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
}
Hi Flavio,
i need to update the example configuration files in order to work with Diameter-Ro. The Diameter operations are now all asnchronous, so the example for the S-CSCF is no longer correct for the current Diameter-Ro-Module. The Message processing stops after calling CCR_Ro() and is continued in a separate route, once the Diameter-Response arrives.
An example, how the Call to CCR_Ro() should be constructed can be found here: http://kamailio.org/docs/modules/devel/modules/ims_charging.html#idp1834808
I'll update the S-CSCF example later this week.
Kind regards, Carsten
2013/12/11 Flavio Battimo flaviobattimo@gmail.com:
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:
- Modify the P-Asserted-Identity so as to add angle brackets to the value.
- Add user=phone parameter to uri if it doesn't exists
- 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
}
-- Flavio Battimo flavio.battimo@gmail.com fbattimo@meetecho.com skype: flaviobattimo
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