[OpenSER-Users] obtain content of header dynamically
Daniel-Constantin Mierla
miconda at gmail.com
Tue May 27 11:46:19 CEST 2008
Hello,
what version of openser are you using? The $hdr() PV should accept
dynamic name, so you can have:
$var(hdrname) = "To";
$var(hdrvalue) = $hdr($var(hdrname));
Is it what you need? If does not work, please open a bug on the tracker
and provide details about how you tried.
Cheers,
Daniel
On 05/27/08 12:32, Yazid Hadj Said wrote:
> Hi,
> I try to obtain content of header dynamically, but with $hdr(...) i
> can't do this because it accept only static parameters. For example I
> try to use:
>
> $avp(s:body)=$mb;
> $avp(s:HdName)="To";
> avp_subst("$avp(s:corps)/$avp(s:HdContent)","/^$avp(s:HdName):(.*)\r\n(.*)/\1/");
>
> With this manner, i can change header name ($avp(s:HdName)
> )dynamically from data source (e.g database) and use his content in my
> script.
> But until now i don't obtain what i want.
>
>
> Regards,
> Yazid
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
--
http://www.asipto.com
More information about the sr-users
mailing list