[OpenSIPS-Users] Problem with setup radius accounting and redirect INVITE to Asterisk
Brett Nemeroff
brett at nemeroff.com
Mon Apr 12 16:25:25 CEST 2010
You don't need to apologize for your question.. :)
Look at your code, that won't work.. It's painfully recursive... see
how route[1] calls route(1)? You'll never make it to the t_relay..
you'll just loop over and over..
route(1) calls the route[1] code block.. although it may look from the
demo code that anytime you want to send the call out, you just call
route(1).. The reality is that route[1] is just another code block...
The t_relay sends the call out..
So try the logic again, with that in mind.
As for the accounting, typically you can set the accounting flag when
you see the invite come in. Most of what you need in the acc module
happens automatically once you set the flag and proceed in transaction
stateful modes.
-Brett
On Mon, Apr 12, 2010 at 12:08 AM, Akhat Yeshmaganbetov <akhat at ymail.com> wrote:
> Dear opensips users,
>
> I cant understand where to include accounting and redirect to Asterisk
> routes in routing logic.
>
> In my understand I put it in following piece of routing logic:
>
> route[1] {
> # for INVITEs enable some additional helper routes
> if (is_method("INVITE")) {
> rewritehostport("192.168.152.148:5060");
> route(1);
> }
> if (!t_relay()) {
> sl_reply_error();
> };
> exit;
> }
More information about the Users
mailing list