Add PJSIP header on inbound channel

157 views Asked by At

I am trying to add PJSIP header in asterisk in node.js but headers are not setting.

await new Promise((resolve, reject) => {

    incoming.setChannelVar(
        {variable: 'PJSIP_HEADER(add,X-header)', value: '12423'},
        function (err) {
            if (err) {
                console_log(3, "SET-VAR ERROR", err);
            }
            resolve('done');
        }
    );
    }).catch(function (e) {
        console.log('Catch Error in executing setChanVar: ');
    });

As per Asterisk document we can only add PJSIP header on outbound channel Asterisk Wiki

Is there any alternate solution?

0

There are 0 answers