[SR-Users] Calling ims charging function in route_failure

Shane Harrison Shane.Harrison at imgtec.com
Wed Mar 11 04:52:06 CET 2015


Hi all,

Using a technique Daniel mentioned in a previous post, I have removed the parser issue.  I called a separate route block from the failure_route block and call the Ro_CCR from there.

However my questions still remain as I don't really know how to determine if that Ro_CCR() is safe to call from there.  Documentation has some stern warnings :-)

Cheers
Shane

> -----Original Message-----
> From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of
> Shane Harrison
> Sent: Wednesday, 11 March 2015 4:06 p.m.
> To: Kamailio (SER) - Users Mailing List
> Subject: [SR-Users] Calling ims charging function in route_failure
> 
> Hi all,
> 
> What I want to do
> ~~~~~~~~~~~~~~
> If a call to a SIP AoR fails then try the PSTN number associated with the AoR
> by routing the request to a PSTN gateway.  Calls to a PSTN gateway need to
> be charged so need to call the Ro_CCR function in ims_charging module.
> 
> How I tried to do it
> ~~~~~~~~~~~~~~
> In the failure_route[MANAGE_FAILURE] block I call the Ro_CCR()
> 
> Result was
> ~~~~~~~~
> Kamailio fails to parse config file.
> yyparse(): misused command Ro_CCR
>  yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 1162,
> column 91: Command cannot be used in the block
> 
> So two questions:
> 1) What constraints are there for calling functions in the failure_route blocks
> i.e. how does parser decide what can be called and what can't
> 2) Any thoughts of how I can do effectively a late charging decision
> 
> Cheers and thanks in advance
> Shane
> 
> Shane Harrison
> Senior Software Engineer
> 
> Imagination Technologies NZ Limited
> Level 2
> 1 Market Grove
> Lower Hutt, 5010
> New Zealand
> 
> PO Box 30-449
> Lower Hutt, 5040
> New Zealand
> 
> Phone: +64 4 890-3681 ext 3361
> 
> 
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-
> users at lists.sip-router.org http://lists.sip-router.org/cgi-
> bin/mailman/listinfo/sr-users



More information about the sr-users mailing list