Hi Joachim,
why do you need a variable key name? wouldn't this work for you?
avp_printf("i:10", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","i:10");
regards, bogdan
Joachim Fabini wrote:
Hi,
Is there a way or workaround to generate AVPs with header values as AVP name? It seems to me that the current AVP concept defines the AVPs at OpenSER startup, so header-value-based names are not feasible.
What I need is the following: Store/retrieve a (key,value) pair where the key is the current message's call-id and the value some combination of header values and pseudo- variables.
e.g. use the ops avp_printf("$hdr(call-id)", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","$hdr(call-id)");
in order to append the following header to the SIP message: Myheader: 23459@10.0.0.1-4235627623
Any idea how to do this in OpenSER?
thanks in advance --Joachim
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Bogdan,
why do you need a variable key name?
To generate and store a time- and call-id- (and maybe tag)-dependent string at first time when a proxy sees a specific call-id. And to be able to retrieve this string at later time (possibly from other proxies when they process messages having this call-id). Background: add/remove information/headers in the core network that must not be visible to the UA.
wouldn't this work for you?
avp_printf("i:10", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","i:10");
Two problems that I see: 1. This stores the attribute on a per-contact base. In the case of an UA having several concurrent calls (imho) I can track at most one call. 2. Other proxies can not access this info (as it could if the call-id-related stuff was written to a DBS with the call-id as name/key)
The main requirement is thus firstly to have database- stored AVPs on a per-call base. And, secondly, to be able to retrieve the AVP values from the DBS when processing the content of any message belonging to this call, even by a component that did not generate this AVP.
regards --Joachim
Joachim Fabini wrote:
Hi,
Is there a way or workaround to generate AVPs with header values as AVP name? It seems to me that the current AVP concept defines the AVPs at OpenSER startup, so header-value-based names are not feasible.
What I need is the following: Store/retrieve a (key,value) pair where the key is the current message's call-id and the value some combination of header values and pseudo- variables.
e.g. use the ops avp_printf("$hdr(call-id)", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","$hdr(call-id)");
in order to append the following header to the SIP message: Myheader: 23459@10.0.0.1-4235627623
Any idea how to do this in OpenSER?
thanks in advance --Joachim
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi,
Meanwhile I tried several approaches on this topic but none of them were successful.
To restate and clarify the problem: We must store values in the DBS for any call that passes through the proxy. There can be several concurrent calls for the same contact (e.g. Register, Subscribe, Invite, etc. ). So the information that must be stored in (and/or retrieved from) the DBS is NOT contact- but call-dependent. I.e. the AVP _name_ must contain the call-id in some way.
AVPOPS do currently not support a variable name field. (i.e., in the simplest case, an attribute name that depends, e.g., on the current call id value). OpenSER complains at startup about the variable header name. But: I see this as the only way how to store call-dependent info in OpenSER.
This feature is required for avp_db_store() and for avp_db_load(), i.e. avp_db_store("$hdr(call-id)", "s:my_tmp_icid"); and avp_db_load("$hdr(call-id)", "s:my_tmp_icid");
The solution of using the acc-module does not work. Our task is to manipulate (add/remove) some sip message headers, not to just create DB entries.
Does anyone have another idea for a work-around? Does anyone else need this feature? Unfortunately it seems to me that this change in the AVP module requires significant implementation effort. Maybe someone of the implementors can comment on this.
For my part, I consider having call-dependent AVP names as a huge improvement over the current AVP implementation - it's a change in paradigm and gives AVP users much more fine-grained control than they have currently.
Many thanks in advance for your help, best regards --Joachim
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Bogdan-Andrei Iancu Sent: Donnerstag, 15. Dezember 2005 11:51 To: Joachim Fabini Cc: users@openser.org Subject: Re: [Users] AVPops question
Hi Joachim,
why do you need a variable key name? wouldn't this work for you?
avp_printf("i:10", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","i:10");
regards, bogdan
Joachim Fabini wrote:
Hi,
Is there a way or workaround to generate AVPs with header values as AVP name? It seems to me that the current AVP concept defines the AVPs at OpenSER startup, so header-value-based names are not feasible.
What I need is the following: Store/retrieve a (key,value) pair where the key is the current message's call-id and the value some combination of header values and pseudo- variables.
e.g. use the ops avp_printf("$hdr(call-id)", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","$hdr(call-id)");
in order to append the following header to the SIP message: Myheader: 23459@10.0.0.1-4235627623
Any idea how to do this in OpenSER?
thanks in advance --Joachim
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users