Ah I hadn’t even thought of using the context in that way. That’s an excellent 
solution!

Ben Newlin

From: Users <[email protected]> on behalf of Mickael Hubert 
<[email protected]>
Date: Tuesday, October 10, 2023 at 5:37 AM
To: OpenSIPS users mailling list <[email protected]>
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 
<[email protected]<mailto:[email protected]>> 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 
<[email protected]<mailto:[email protected]>> on 
behalf of Mickael Hubert <[email protected]<mailto:[email protected]>>
Date: Monday, October 9, 2023 at 11:00 AM
To: OpenSIPS users mailling list 
<[email protected]<mailto:[email protected]>>
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 
<[email protected]<mailto:[email protected]>> a écrit :
avp_dbquery if I am not wrong.

Op ma 9 okt 2023 om 16:31 schreef Johan De Clercq 
<[email protected]<mailto:[email protected]>>:
write the info to a custom table and fetch it from there ?


Op ma 9 okt 2023 om 16:03 schreef Mickael Hubert 
<[email protected]<mailto:[email protected]>>:
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
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to