Hello, I am currently trying to do accurate billing with openser. I found that dialog and sst modules can be used to determine failed transactions. i.e. If UA crashed and no BYE received at all. I tried to configure dialog and sst modules as specified in the documentation. But active dialogs keep incrementing even after hangup. It would be nice if someone can post a good example. I am using cvs head of openser. Snippet of config is as below:
###################### DIALOG ###################### modparam("dialog", "dlg_flag", 13) modparam("dialog", "timeout_avp", "$avp(i:10)") modparam("dialog", "use_tight_match", 1) modparam("dialog", "enable_stats", 1)
###################### SST ###################### modparam("sst", "enable_stats", 1) modparam("sst", "timeout_avp", "$avp(i:10)") modparam("sst", "sst_flag", 14)
route { ........ ........ if(method=="INVITE") { setflag(13); # set the dialog flag setflag(14); # Set the sst flag avp_write("15","$avp(i:10)"); }; if (method=="INVITE") { record_route_preset("192.168.1.2:5060;nat=yes;did=1"); }; ......... ......... }
On Tuesday 26 December 2006 6:20 am, Asterisk Expert wrote:
Hello, I am currently trying to do accurate billing with openser. I found that dialog and sst modules can be used to determine failed transactions. i.e. If UA crashed and no BYE received at all. I tried to configure dialog and sst modules as specified in the documentation. But active dialogs keep incrementing even after hangup. It would be nice if someone can post a good example. I am using cvs head of openser.
I will take a look at the SST code, this sounds like a bug. There has been a great deal of change in the dialogs, and stats lately and something could have gotten by me.
your script looks like it should work, the only thing is the avp_write("15", "$avp(i:10)"); Why a 15 second dialog timeout, what is the SST refresh time? 15 seconds is too short.
ronw
Hello Ron, Thanks for your response. Now I'm able to start and destroy dialog properly. But I guess dialog timer is reset when openser receives "Update" message. I looked in dialog and sst module codes and found that they rely on UA to send "Update" message periodically to keep the dialog active. I dont think it is good idea to rely on clients as all clients may not be sending "UPDATE" messages after call is established. Correct me if I'm wrong. Also I think that I may have to change source code of dialog or sst to send bye if any UA is broken and can't send "Bye" in case of dialog timeout.
On 1/2/07, Ron Winacott ronw@somanetworks.com wrote:
On Tuesday 26 December 2006 6:20 am, Asterisk Expert wrote:
Hello, I am currently trying to do accurate billing with openser. I found that dialog and sst modules can be used to determine failed transactions. i.e
.
If UA crashed and no BYE received at all. I tried to configure dialog
and
sst modules as specified in the documentation. But active dialogs keep incrementing even after hangup. It would be nice if someone can post a
good
example. I am using cvs head of openser.
I will take a look at the SST code, this sounds like a bug. There has been a great deal of change in the dialogs, and stats lately and something could have gotten by me.
your script looks like it should work, the only thing is the avp_write("15", "$avp(i:10)"); Why a 15 second dialog timeout, what is the SST refresh time? 15 seconds is too short.
ronw
-- Ron Winacott - SOMA Networks, Inc. Work: 1-416-348-1580 - ronw@somanetworks.com
A bad xhost is a good thing to waste, here have a cookie! -- Brian Onn
On Tuesday 02 January 2007 9:00 am, Asterisk Expert wrote:
Hello Ron, Thanks for your response. Now I'm able to start and destroy dialog properly. But I guess dialog timer is reset when openser receives "Update" message. I looked in dialog and sst module codes and found that they rely on UA to send "Update" message periodically to keep the dialog active. I dont think it is good idea to rely on clients as all clients may not be sending "UPDATE" messages after call is established. Correct me if I'm wrong. Also I think that I may have to change source code of dialog or sst to send bye if any UA is broken and can't send "Bye" in case of dialog timeout.
But waiting and acting on UPDATE/re-INVITE is what SST (RFC-4028) is all about. The SST module is an implementation of the RFC for a SIP proxy. One of the clients in the dialog must support timers (SST) and the module will figure out who does and request SST timers (UPDATE/RE-INVITE) from that UAC if nether UAC want to use timers.
As for the proxy sending a BYE on a timed out SST/dialog, this is against the RFC. A proxy can't inject a SIP message into the conversation like that. Also, there is the technical issue that nether the SST or dialog module track/save enough information (as far as routing goes) to send the BYE.
The SST module is for statefull proxy servers to allow them to free up locally held resources when a dialog times out without having a default dialog time out value of 24 hours, and causing one of the UAC's to "ping" the signal path to let everyone on it know the conversation is still on.
Without one side supporting timers (SST) I would suggest you do not use SST for any kind of accounting information because as per the RFC, one side must support timers/SST for it to work.
ronw
Do you know any UA which support SST timers?
On 1/2/07, Ron Winacott ronw@somanetworks.com wrote:
On Tuesday 02 January 2007 9:00 am, Asterisk Expert wrote:
Hello Ron, Thanks for your response. Now I'm able to start and destroy dialog properly. But I guess dialog timer is reset when openser receives
"Update"
message. I looked in dialog and sst module codes and found that they
rely
on UA to send "Update" message periodically to keep the dialog active. I dont think it is good idea to rely on clients as all clients may not be sending "UPDATE" messages after call is established. Correct me if I'm wrong. Also I think that I may have to change source code of dialog or
sst
to send bye if any UA is broken and can't send "Bye" in case of dialog timeout.
But waiting and acting on UPDATE/re-INVITE is what SST (RFC-4028) is all about. The SST module is an implementation of the RFC for a SIP proxy. One of the clients in the dialog must support timers (SST) and the module will figure out who does and request SST timers (UPDATE/RE-INVITE) from that UAC if nether UAC want to use timers.
As for the proxy sending a BYE on a timed out SST/dialog, this is against the RFC. A proxy can't inject a SIP message into the conversation like that. Also, there is the technical issue that nether the SST or dialog module track/save enough information (as far as routing goes) to send the BYE.
The SST module is for statefull proxy servers to allow them to free up locally held resources when a dialog times out without having a default dialog time out value of 24 hours, and causing one of the UAC's to "ping" the signal path to let everyone on it know the conversation is still on.
Without one side supporting timers (SST) I would suggest you do not use SST for any kind of accounting information because as per the RFC, one side must support timers/SST for it to work.
ronw
-- Ron Winacott - SOMA Networks, Inc. Work: 1-416-348-1580 - ronw@somanetworks.com
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning
- Unknown
On Tuesday 02 January 2007 9:33 am, Asterisk Expert wrote:
Do you know any UA which support SST timers?
I work for a company who wrote their own SIP UA (call SSUA) and it supports timers. (the full RFC) I also wrote the SST module for OpenSER to use with SSUA in the SOMA Networks configuration. (We are a telco-grade/broadband to the home wireless last mile solutions company) Most PSTN media gateways also support timers which in my case the media gateway is the other side of the conversation (Back-2-Back UA). As for other non-Soma UA's, don't know.
Hope this helps, but I did write the SST module for SOMA to use in our product which happens to use OpenSER, but gave the module back to the Open Source Community.
ronw