Hello,

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...
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:
sprintf( cmd, "SipAddHeader(command:%s)", command );
res = astcmd( chan, cmd );
astcmd is a custom function wrapped onto pbx_exec().

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.
res = pbx_builtin_setvar_helper(chan, "PJSIP_HEADER(add, X-test)", "test");


How can I use PJSIP_HEADER in a C module ?, which libraries should I need
to import ?

Thanks

--

Benoit
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to