<div dir="ltr">Hello,<br><br>We have a module written in C which was developed initially for asterisk 1.4, modified a few years ago to run in asterisk 1.8 then 11. This module is used to verify user's limits, route calls etc... <br>Actually, I try to adapt it to run in asterisk 16, I moved from chan_sip to PJSIP and I don't know how can I add SIP Headers into the channel. With chan_sip we used that:<div>sprintf( cmd, "SipAddHeader(command:%s)", command );<br>res = astcmd( chan, cmd );<br>astcmd is a custom function wrapped onto pbx_exec(). <br><br>I tried to use pbx_builtin_setvar_helper(), with the function PJSIP_HEADER() but I didn't see any custom headers in SIP... and no errors, res = 0.</div><div>res = pbx_builtin_setvar_helper(chan, "PJSIP_HEADER(add, X-test)", "test");<br></div><div><br><br>How can I use PJSIP_HEADER in a C module ?, which libraries should I need to import ?<br><br>Thanks<br clear="all"><div><br></div>--<div><br></div><div>Benoit<br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="color:rgb(136,136,136)"><div dir="ltr"><div style="font-size:12.8px"></div></div></div></div></div></div></div></div></div></div></div></div></div>