[OpenSIPS-Users] t_new_request and X-headers

Mickael Hubert mickael at winlux.fr
Tue Oct 10 09:34:45 UTC 2023


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.Newlin at 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
>
>
>
> Ben Newlin
>
>
>
> *From: *Users <users-bounces at lists.opensips.org> on behalf of Mickael
> Hubert <mickael at winlux.fr>
> *Date: *Monday, October 9, 2023 at 11:00 AM
> *To: *OpenSIPS users mailling list <users at 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 <Johan at democon.be> a écrit :
>
> avp_dbquery if I am not wrong.
>
>
>
> Op ma 9 okt 2023 om 16:31 schreef Johan De Clercq <Johan at 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 <mickael at 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 at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20231010/38d6f8fb/attachment-0001.html>


More information about the Users mailing list