[OpenSIPS-Devel] Using dialog module functions from LOCAL_ROUTE

Alex Massover alex at jajah.com
Sun Sep 27 13:09:51 CEST 2009


Hi!

It's a BYE request generated by dlg_end_dlg(). I need to fetch_dlg_value() to get variables stored on the dialog to send them with accounting extra headers.

This is what I have in opensips.cfg:

modparam("acc", "radius_extra", "Connect-Info=$avp(s:info);....... ")
...
...
...
local_route
{
         if(is_method("BYE"))
         {
                fetch_dlg_value("internal_callid","$avp(s:info)");
                acc_rad_request("200");
         }
}

This works for me for regular BYEs, but not with locally generated BYEs, even with the hack below.


--
Sincerely yours,
Alex Massover
VoIP R&D TL
Jajah Inc.

> -----Original Message-----
> From: devel-bounces at lists.opensips.org [mailto:devel-
> bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Sunday, September 27, 2009 1:32 PM
> To: OpenSIPS devel mailling list
> Subject: Re: [OpenSIPS-Devel] Using dialog module functions from
> LOCAL_ROUTE
>
> Hi Alex,
>
> for what kind of requests (from LOCAL route) you try to use the dlg
> stuff?
>
> Regards,
> Bogdan
>
> Alex Massover wrote:
> >
> > Hi!
> >
> > I'm looking for a way to use fetch_dlg_value() inside LOCAL_ROUTE. I
> > edited dialog.c to to enable it:
> >
> > {"fetch_dlg_value",(cmd_function)w_fetch_dlg_value, 2,fixup_dlg_fval,
> >
> > 0, REQUEST_ROUTE| FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE |
> > LOCAL_ROUTE },
> >
> > Now I can write fetch_dlg_value() inside the LOCAL_ROUTE, but I'm
> > getting NULLs always.
> >
> > Can anybody point me what else do I need to hack to have access to
> > dialog variables from LOCAL_ROUTE?
> >
> > Also what is the reason not to enable all dialog functions from
> > LOCAL_ROUTE?
> >
> > --
> >
> > Best Regards,
> >
> > Alex Massover
> >
> > VoIP R&D TL
> >
> > Jajah Inc.
> >
> >
> >
> > This mail was sent via Mail-SeCure System.
> > ---------------------------------------------------------------------
> ---
> >
> > _______________________________________________
> > Devel mailing list
> > Devel at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
> >
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
> This mail was received via Mail-SeCure System.
>


This mail was sent via Mail-SeCure System.





More information about the Devel mailing list