Ah I hadn’t even thought of using the context in that way. That’s an excellent solution!
Ben Newlin From: Users <users-boun...@lists.opensips.org> on behalf of Mickael Hubert <mick...@winlux.fr> Date: Tuesday, October 10, 2023 at 5:37 AM To: OpenSIPS users mailling list <users@lists.opensips.org> Subject: Re: [OpenSIPS-Users] t_new_request and X-headers EXTERNAL EMAIL - Please use caution with links and attachments ________________________________ Hi, it's perfect, thanks a lot ! I use json to catch and send my data to t_new_request t_new_request("INFO","$tu","$fu","$tu", , "$json(data)"); local_route { if (is_method("INFO")) { $json(data) := $avp(uac_ctx); #xlog("$json(data)\n"); append_hf("X-call-id: $json(data/X-call-id)\r\n"); append_hf("X-rtp-a: $json(data/X-rtp-a)\r\n"); append_hf("X-rtp-b: $json(data/X-rtp-b)\r\n"); } } Le lun. 9 oct. 2023 à 17:13, Ben Newlin <ben.new...@genesys.com<mailto:ben.new...@genesys.com>> a écrit : Do you have the Call-ID from the first leg when you create the second leg with t_new_request? If os, you can use the ctx parameter from that function to make it visible in the new transaction. https://opensips.org/docs/modules/3.4.x/tm.html#func_t_new_request<https://opensips.org/docs/modules/3.4.x/tm.html#func_t_new_request> Ben Newlin From: Users <users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org>> on behalf of Mickael Hubert <mick...@winlux.fr<mailto:mick...@winlux.fr>> Date: Monday, October 9, 2023 at 11:00 AM To: OpenSIPS users mailling list <users@lists.opensips.org<mailto:users@lists.opensips.org>> Subject: Re: [OpenSIPS-Users] t_new_request and X-headers EXTERNAL EMAIL - Please use caution with links and attachments ________________________________ Thanks for your help, I already tested avp, but the main issue now is, how can I catch call_id (or other id) from my second request (created by t_new_request) to get my variables from the first leg. Le lun. 9 oct. 2023 à 16:33, Johan De Clercq <jo...@democon.be<mailto:jo...@democon.be>> a écrit : avp_dbquery if I am not wrong. Op ma 9 okt 2023 om 16:31 schreef Johan De Clercq <jo...@democon.be<mailto:jo...@democon.be>>: write the info to a custom table and fetch it from there ? Op ma 9 okt 2023 om 16:03 schreef Mickael Hubert <mick...@winlux.fr<mailto:mick...@winlux.fr>>: Hi all, I need to send an INFO message with X-headers from other dialog. I use t_new_request to send my request (apart from first dialog): OK I use local_route to add fixed X-header: OK But I want to copy some information from the first dialog to the new dialog (created by t_new_request). How can I do that please ? Thanks in advance _______________________________________________ Users mailing list Users@lists.opensips.org<mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> _______________________________________________ Users mailing list Users@lists.opensips.org<mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users> _______________________________________________ Users mailing list Users@lists.opensips.org<mailto:Users@lists.opensips.org> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users