[OpenSIPS-Users] Take the value of the newly added SIP X-header for the log

Oleg Podguyko podguiko at mail.ru
Thu Sep 26 13:47:26 EDT 2019

Hello everebody!
My opensips works as proxy. Get INVITE from one side and communicates with a remote web server via rest. Opensips sends a request to the web server and receives a lot of custom data, which it converts to SIP X-header. In the end I get 10 different SIP X-headers
$var(i) = 0; 
            while( $json(resp/headers[$var(i)]) )
                $var(i) = $var(i) + 1;           
                # add sip headers
 Everything works. Now, In the next route (BALANCE), I want to output the header that was just added to the log
xlog("L_INFO", "$X-My-Custom-Header: $(hdr(X-My-Custom-Header))");
But in the log I always see null. Although in the INVITE wich opensips sends, all SIP X-header in place. 
Does this mean I can't get the value of the newly added SIP X-header? What should I do to get these values?
Олег Подгуйко
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190926/0cc098a8/attachment.html>

More information about the Users mailing list