New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pua_dialoginfo: failed calls triggers sending PUBLISH errors #142
Comments
Hi Ovidiu, It may sounds as a stupid question, but shouldn't we send a PUBLISH (with trying) all th time when a new call is started ? (like the publish_on_trying is set to 1 all the time) Regards, |
Hello Bogdan, I circumvented this issue by setting publish_on_trying to 1. The questions/issues here are:
Regards, |
Hi Bogdan, The main reason why I added that setting in the first place was to workaround the SIP PUBLISH problem in OpenSIPS. We wanted to minimize the number of PUBLISH being sent. For example, when you call a device that is BUSY, you will be notified through a PUBLISH that there was a call attempt, then that the call was finished, instantly. With the unordered PUBLISH problems, the BLF was most of the time stuck in a wrong state. In general, even if that specific problem has been fixed, I think that it is preferable to minimize state changes on servers with many users, and many BLFs, It is probably best to be notified as soon as the call is ringing state, but not before to prevent such rapid state changes. I would keep the option, but I would apply Ovidiu's suggesting : when the publish_on_trying parameter is disabled, we should not try publishing the terminated state. Moreover, the RFC 4235 states: 3.10. Rate of Notifications For reasons of congestion control, it is important that the rate of So I think that "trying" -> "terminated" instant transitions should be prevented, and that is what the publish_on-trying option is trying to do. |
Hello Damien, Please update the documentation with what you described here. Thanks, |
Hi Ovidiu, I can change the default value, and adapt the documentation. Please note that the trying state corresponds to dialoginfo_set being called in the dialplan. Not to the remote peer answering with a 100 Trying. However, fixing the bogus error probe seems difficult. I can't see a way in pua_dialoginfo to prevent publishing the "terminated" state if there was no previous publication (ie if we did not reach the "trying" state when publish_on_trying is set to 0). There is actually no way to determine the state before the callback is triggered. Do you, or Bogdan, have an implementation suggestion ? |
Hi, Damien, two aspects:
Regards, |
Hi Bogdan,
|
@dsandras @bogdan-iancu Regards, |
@ovidiusas : Yes, I meant a response from the remote peer transiting over the network. |
Just to avoid any confusion, the doc should be updated with a diagram: For a successful call we have:
If we choose to avoid the "trying" state, then "early" will be triggered on the first 18x provisional reply.
The issue is with rejected calls. If we don't have a 18x provisional reply, then we have this:
If we don't have a 18x provisional reply and we avoid the "trying" state, then we don't have any PUBLISH at all:
|
Thanks for fixing this ! |
If a call fails without receiving a provisional reply first, it will trigger an error:
ERROR:pua_dialoginfo:dialog_publish: sending publish failed for pres_uri [SIP URI] to server [SERVER]
The issue here is that the call is in trying state and then is terminated.
If we set:
modparam("pua_dialoginfo", "publish_on_trying", 1)
the error doesn't occur because an initial PUBLISH is sent for trying.
If the "publish_on_trying" parameter is not set (the default value being 0), then the first PUBLISH is sent when the dialog is terminated. The PUBLISH has an expiration set to 0 and since there was no previous states published before, pua does not send any PUBLISH, hence the error.
The relevant pua code (pua/send_publish.c send_publish_int):
if(presentity== NULL)
{
if(publ->expires== 0)
{
LM_DBG("request for a publish with expires 0 and"
" no record found\n");
goto error;
}
The fix should be in pua_dialoginfo, there should be no PUBLISH sent out when:
To test this, a call should be made to a SIP device that will reject the call without sending any 18x provisional replies first.
Regards,
Ovidiu Sas
The text was updated successfully, but these errors were encountered: