Hi List
Testing failure situations, I discovered unset_dlg_profile can not be used in request_route:
I count the channels per customer in a dlg_profile to know when they are busy. Residential POTS customer have 1 channel.
Now this situation (Trying to mimik POTS behavior)
Kamailio <=> CPE of 'John-Doe'
=> INVITE set_dlg_profile of John-Doe is 0: Not busy set_dlg_profile of John-Doe +1 <= 100 trying <= 180 ringing
== LINK to CPE DISRUPTED ==
X<= 200 OK (not reaching kamailio) CPE is sending 200 a couple of times and fails. Caller is still hearing ringing tone as it never got 200 OK.
The caller does not want to wait longer and hangs up =>X CANCEL (NOT reaching CPE)
This is the moment, on which I would like to unset_dlg_profile of John-Doe to mark his channel available again.
But the CPE is never going to acknowledge this CANCEL with 487.
Unfortunately: unset_dlg_profile(): dialog delete profile cannot be used in request route
Only when kamailio has sent CANCEL a couple of times and the failure_route for this CANCEL is triggered, I can remove the call from the dlg_profile of that customer within failure_route.
If I am unlucky, in the meantime other calls get 'busy' instead of being re-routed to the configured backup number of that customer.
Agreed, after a couple of seconds, the call goes to the failure route and the dialogue is ending thus calls work as expected. But wouldn't it be nice to be able to unset the dlg_profile upon receiving the CANCEL instead on when the CANCEL transaction is successful?
Mit freundlichen Grüssen
-Benoît Panizzon-
Hello,
maybe I do not fully understand the task. But my understanding of the dialog profiles is that they actually use the dialog tracking functionality to maintain its internal state. That means there should be no need to remove the dialog manually from the dialog profile that tracks it.
If the user agent does not reply correctly to the CANCEL, maybe the user agent should be fixed?
Cheers,
Henning
Hi Henning
If the user agent does not reply correctly to the CANCEL, maybe the user agent should be fixed?
As mentioned. I was testing various fail situation, like disconnecting the user agent while in dialog or while in transaction to see what happes.
But agreed, that is probably not a situation which occurs often so having the CANCEL to time out and only then removing the dialogue is probably acceptable.