Hello,
after a transaction suspend/resume, the execution context is similar to a failure_route. The msg_apply_changes() cannot be used after creating the transaction due to various cross-linking inside transaction structure, plus callbacks set by various modules (e.g., acc, dialog, ...).
Header changes (like updating contact) should propagate to each outgoing branch if they are done before creating the transaction, then they should be on per processed outgoing branch.
An alternative could be use of siprepo module, which is still in an incipient phase, but leveraging other modules around it could offer a different mechanism for async operations:
- https://www.kamailio.org/docs/modules/stable/modules/siprepo.html
Cheers, Daniel
On 30.09.22 02:54, Alex Balashov wrote:
I ran into similar issues, but unfortunately don’t remember how I solved them and no longer have the config handy. I deemed http_async_client nonviable for these kinds of reasons, though that may have been a dated conclusion.
As best as I can remember—which may be not at all—my solution was to use regular request routes with the regular blocking HTTP client, suspended/resumed over mqueue + rtimer.
— Alex
On Sep 29, 2022, at 5:56 PM, Brooks Bridges bbridges@call48.com wrote:
I'm also running into issue with append_branch working correctly inside the http_async event route, in that it's appending multiple strings in the contact header for each additional unique invite. E.g. the first invite has the response I expect, but the second invite's response has the contact header from the first invite on it, and then additionally the header for the second invite. The 3rd invite ends up with the 2 previous ones and the "new" one, and so on. I've never seen this happen and I can only surmise that's it's some kind of odd value collision in the http_async result route?
Brooks Bridges 1200 S. Rogers Circle, Unit 6 Boca Raton, FL 33487 Office: 916-235-2097 Main: 888-444-1111 email: bbridges@call48.com | web: www.call48.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Brooks Bridges Sent: Thursday, September 29, 2022 14:09 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] http_async_client "route_name" is what type of route?
That was kind of my thought too, but ...
Anyway, that just brought up a whole host of other problems, so I don't see that being feasible either. Any suggestions on a way to rewrite (or in this case replace) a Contact header in the http_async reply route?
Brooks Bridges 1200 S. Rogers Circle, Unit 6 Boca Raton, FL 33487 Office: 916-235-2097 Main: 888-444-1111 email: bbridges@call48.com | web: www.call48.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Thursday, September 29, 2022 14:00 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] http_async_client "route_name" is what type of route?
There is arguably no sense in using http_async_client if you don’t use suspend.
On Sep 29, 2022, at 4:58 PM, Brooks Bridges bbridges@call48.com wrote:
Specifically msg_apply_changes() is what I'm trying to make work to return an updated Contact header.
I will look into the suspend option, thanks!
Brooks Bridges 1200 S. Rogers Circle, Unit 6 Boca Raton, FL 33487 Office: 916-235-2097 Main: 888-444-1111 email: bbridges@call48.com | web: www.call48.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Thursday, September 29, 2022 13:50 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] http_async_client "route_name" is what type of route?
It’s a module-specific event route.
Are you using $http_req(suspend)? If so, try — and it’s a long shot, but try it:
route[HTTP_REPLY] { … route(ANOTHER_ROUTE); }
Are the functions you want available inside route[ANOTHER_ROUTE]?
— Alex
On Sep 29, 2022, at 4:46 PM, Brooks Bridges bbridges@call48.com wrote:
Running into an issue where I can't access certain functions inside the response route or "route_name" for handling the asynchronous reply from an http_async_query() that's being run. Does anyone know what type of route that is considered to be? I know it's not a request route or a failure route based on the errors I'm getting, but I can't find anything that outlines what that route actually is.
Thanks!
Brooks Bridges 1200 S. Rogers Circle, Unit 6 Boca Raton, FL 33487 Office: 916-235-2097 Main: 888-444-1111 email: bbridges@call48.com | web: www.call48.com
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: