Hello All!
Right now OpenSER generates Acc-Session-Start when "200 OK" message arrives. I need to generate Acc-Session-Start exactly in that moment when INVITE received (I can't need to wait for answer from other side).
So how can I do it?
El Wednesday 13 February 2008 13:52:21 Peter Lemenkov escribió:
Hello All!
Right now OpenSER generates Acc-Session-Start when "200 OK" message arrives. I need to generate Acc-Session-Start exactly in that moment when INVITE received (I can't need to wait for answer from other side).
So how can I do it?
AFAIK that is impossible. OpenSer accounting in based in transactions, not in single messages. A transaction involves a reply (or various).
BTW, how is possible "you can't need to wait for answer from other side"???
AFAIK that is impossible. OpenSer accounting in based in transactions, not in single messages. A transaction involves a reply (or various).
BTW, how is possible "you can't need to wait for answer from other side"???
First of all - sorry for the mistake. My knowledge of English is rather poor.
We take accounting information (Acct-Session-Time) from Cisco CS2800 which provides us very reliable info about duration of calls. But before call will be established there is some complex logic with rewriting of Request-URI in multiple steps. We need to track all these steps for our internal purposes.
We could do it in a different ways and one of them we consider is to generate Start-messages (or some other message) for each INVITE passed though OpenSER exactly then INVITE is arrived.
Hi Peter,
From accounting point of view, the relevant timestamp is when the call starts and, from sip point of view, this is 200 OK.
But if from whatever reasons you want to account the timestamp for INVITE, use extra accounting (see acc module page). At INVITE time store in an AVP the current timestamp (use pseudo-vars for this) and set this AVP into extra acc.
regards, Bogdan
Peter Lemenkov wrote:
Hello All!
Right now OpenSER generates Acc-Session-Start when "200 OK" message arrives. I need to generate Acc-Session-Start exactly in that moment when INVITE received (I can't need to wait for answer from other side).
So how can I do it?
2008/2/13, Bogdan-Andrei Iancu bogdan@voice-system.ro:
Hi Peter,
From accounting point of view, the relevant timestamp is when the call starts and, from sip point of view, this is 200 OK.
BTW our Cisco gateway sends Start exactly then INVITE arrives.
Actually all I need is to make sights of redirected calls. For example if UserA calls UserB and UserB wants to redirect all calls to UserC and UserC redirects all calls to UserD in case of failure etc.
The main problem is that if I make a huge number of rewrites or RURI all I can send to RADIUS in Start-message is a combination of from-uri, to-uri and request-uri. All intermediate steps will be completely lost - - in the upper example RADUIS won't know anything about UserC. That's not good fo me.
To resolve this problem I initially decided to log all INVITEs even they and the best way to do so is to mimic the behavior of Cisco which sends Start-messages on each INVITE and not on 200OKs.
Maybe there are other ways to keep information about previous Request-URI in the body of SIP-message?
Hi Peter,
First, if you start accounting when the INVITE comes in, you charge the user for the time while the phone rings...?!? :D..
Secondly, for redirect scenarios, see in ACC module, the multi-leg section. It is what you are looking for.
Regards, Bogdan
Peter Lemenkov wrote:
2008/2/13, Bogdan-Andrei Iancu bogdan@voice-system.ro:
Hi Peter,
From accounting point of view, the relevant timestamp is when the call starts and, from sip point of view, this is 200 OK.
BTW our Cisco gateway sends Start exactly then INVITE arrives.
Actually all I need is to make sights of redirected calls. For example if UserA calls UserB and UserB wants to redirect all calls to UserC and UserC redirects all calls to UserD in case of failure etc.
The main problem is that if I make a huge number of rewrites or RURI all I can send to RADIUS in Start-message is a combination of from-uri, to-uri and request-uri. All intermediate steps will be completely lost - - in the upper example RADUIS won't know anything about UserC. That's not good fo me.
To resolve this problem I initially decided to log all INVITEs even they and the best way to do so is to mimic the behavior of Cisco which sends Start-messages on each INVITE and not on 200OKs.
Maybe there are other ways to keep information about previous Request-URI in the body of SIP-message?
2008/2/15, Bogdan-Andrei Iancu bogdan@voice-system.ro:
Hi Peter,
First, if you start accounting when the INVITE comes in, you charge the user for the time while the phone rings...?!? :D..
In my case - no. We don't use accounting from OpenSER for these purposes cause it can't generate Acct-Session-Time at all. We rely on Cisco's generated accounting info. Earlier we used asterisk b2bua for this task.
Secondly, for redirect scenarios, see in ACC module, the multi-leg section. It is what you are looking for.
Ok, I'll look there.