Summary: | ASTERISK-25137: endpoint stasis messages are delivered twice | ||||
Reporter: | Vitezslav Novy (vnovy) | Labels: | |||
Date Opened: | 2015-05-27 07:16:16 | Date Closed: | 2016-01-06 06:48:59.000-0600 | ||
Priority: | Minor | Regression? | |||
Status: | Closed/Complete | Components: | Core/Stasis | ||
Versions: | 13.3.0 | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | Attachments: | ||||
Description: | If I subscribe topic ast_endpoint_topic_all_cached I receive all endpoint messages twice.
In function endpoint_internal_create called from ast_endpoint_create single endpoint topic is created and forwarded to ast_endpoint_all topic by calling stasis_cp_single_create(ast_endpoint_cache_all(), endpoint->id); After that, same single topic is forwarded to tech_topic which is also forwarded to ast_endpoint_all topic. Example of resulted topic tree is SIP/8888 -> SIP -> ast_endpoint_all SIP/8888 -----------------^ and subscriber who subscribes ast_endpoint_all or higher level topic receives endponit messages twice. I think direct forwarding from single topic to ast_endpoint_all can be deleted from the tree (not created at all) and I can prepare patch if somebody confirms that it is correct way how to fix the problem | ||||
Comments: | By: Joshua C. Colp (jcolp) 2015-05-27 08:19:38.010-0500 I think you are correct. For endpoints with a resource they should be forwarded to the tech endpoint topic only. For endpoints without a resource (which is just the technology itself) they should be forwarded to the endpoint all topic. The other alternative being to just not forward the tech topic to the endpoint all topic. By: George Joseph (gjoseph) 2015-05-27 09:55:11.247-0500 Vitezslav, If you have a patch to not do the forward, go ahead and submit it to Gerrit. Otherwise I can remove the forward. By: Vitezslav Novy (vnovy) 2015-05-27 10:02:49.117-0500 I do not have patch yet, in fact I get lost in code. So please use your solution. By: George Joseph (gjoseph) 2015-05-27 10:09:29.715-0500 No worries. Thanks for finding the cause! By: Joshua C. Colp (jcolp) 2016-01-05 06:07:32.653-0600 This is continuing to occur to some degree on 13 causing the tests/endpoints/statsd and tests/rest_api/applications/subscribe-endpoint/nominal/tech tests to fail despite the changes that have been done. However it is not occuring on master. Quite odd. |