HI HO!
Correct me if I'm wrong, but it seems you trying to use the AVPops to capture a time stamp of the very first INVITE of a transaction? To get this same information, I've used the acc module.
For billing and user call logging purposes, I needed this info and have used: acc_db_request("CallStart", "acc"); in openser.cfg.
This logs a record to the acc table containing the sip_callid, timestamps, and in "sip_status" is the string "CallStart". I then had various scripts parse acc to the format I needed for the end user.
Hope this helps, jj
------------------------------
Message: 7 Date: Thu, 15 Dec 2005 13:09:20 +0100 From: Klaus Darilion klaus.mailinglists@pernau.at Subject: Re: [Users] AVPops question To: Joachim Fabini Joachim.Fabini@tuwien.ac.at Cc: 'Joachim Fabini' joachim.fabini@gmx.net, users@openser.org Message-ID: 43A15CF0.3070206@pernau.at Content-Type: text/plain; charset=ISO-8859-1; format=flowed
But the name of the header changes for each transaction/dialog?
klaus
Joachim Fabini wrote:
Not sure if I understand the problem correctly. Does the name of the header change?
No, it does not change during the lifetime of the AVP. The name is set to the call-id and stays constant as long as the AVP exists. The problem is imho the content of pseudo-variables can not be used as the names of AVPs.
--Joachim
# AVP 101 with alias modparam("avpops","avp_aliases","myheaderavp=I:101");
avp_printf("$myheaderavp", "$hdr(call-id)-$Ts"); avp_pushto("$Myheader","$myheaderavp");
klaus
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,
Correct me if I'm wrong, but it seems you trying to use the AVPops to capture a time stamp of the very first INVITE of a transaction? To get this same information, I've used the acc module.
It's about accounting but requires some extra. I must generate a unique id and attach it in a specific header. Hint: RFC 3544, P-Charging-Vector.
For billing and user call logging purposes, I needed this info and have used: acc_db_request("CallStart", "acc"); in openser.cfg.
This logs a record to the acc table containing the sip_callid, timestamps, and in "sip_status" is the string "CallStart". I then had various scripts parse acc to the format I needed for the end user.
Thanks - anyhow, I'm afraid that this does not solve my problem. As stated already before: Inserting the call-id into an AVP and writing it to the SIP header is no problem. What makes the topic difficult is to store the content in a call-specific (and not contact-specific) way.
--Joachim