[Devel] module UAC
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Wed Sep 13 19:06:12 CEST 2006
Hi Thiago,
even if you need the new value for the FROM URI and not for the RURI, it
still can be done with what we have now:
1) save RURI into an avp A1 (use avp_write)
2) call exec() that will return the value into RURI
3) move the RURI into another avp A2
4) restore the original RURI from avp A1 (use avp_pushto)
5) use A2 for uac_replace_from()
the idea is to avoid code duplicity if possible.
regards,
bogdan
Thiago Maluf wrote:
> I know but this function is similar to exec_dset but is to from is not
> to uri.
> I don`t know if to you it`s important but to most people should be.
> Best Regards,
> Thiago.
>
>
> 2006/9/10, Daniel-Constantin Mierla <daniel at voice-system.ro
> <mailto:daniel at voice-system.ro>>:
>
> Hello,
>
> maybe a better approach would be to store the result of executing the
> script in an AVP and from there do what ever one needs. There are
> functions to rewrite ruri/from-uri which accept AVPs as parameters.
>
> Cheers,
> Daniel
>
>
> On 09/09/06 23:17, Thiago Maluf wrote:
> > I and my work`s friends already finnished one new function to
> module UAC.
> > The new function is uac_rewrite_from .
> > It is working same work the function exec_dset however it change the
> > header field FROM not the field uri.
> > For example:
> > you have a script that make a change in user's uri :
> > sip:fone2 at 200.123.45.9 <mailto:sip:fone2 at 200.123.45.9> ->
> sip:fone2 at openser.org <mailto:sip:fone2 at openser.org>
> > or make other change.
> > then you use : uac_rewrite_from(/etc/openser/script $fu);
> >
> > I would like know how I insert this new function in the Openser
> code.
> > thanks for advanced,
> >
> > Thiago Maluf Resende
> >
> > _______________________________________________
> > Devel mailing list
> > Devel at openser.org <mailto:Devel at openser.org>
> > http://openser.org/cgi-bin/mailman/listinfo/devel
> >
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Devel mailing list
>Devel at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/devel
>
>
More information about the Devel
mailing list