[jitsi-dev] Send a SIP header to Asterisk from JIGASI


#1

Hi!

I'm using JIGASI and I would like to send a SIP header to Asterisk server
with some data as roomName for example, when I make a call from Jitsi. In
Jitsi the Call SIP number dialog call the function:

dial: function (to, from, roomName, roomPass) {
                var self = this;
                var req = $iq(
                    {
                        type: 'set',
                    }
                );
                req.c('dial',
                    {
                        xmlns: this.RAYO_XMLNS,
                    });
                req.c('header',
                    {
                        name: 'JvbRoomName',
                        value: roomName
                    }).up();

                if (roomPass !== null && roomPass.length) {

                    req.c('header',
                        {
                            name: 'JvbRoomPassword',
                            value: roomPass
                        }).up();
                }

                this.connection.sendIQ(
                    req,
                    function (result) {
                        console.info('Dial result ', result);

                        var resource = $(result).find('ref').attr('uri');
                        this.call_resource =
resource.substr('xmpp:'.length);
                        console.info(
                                "Received call resource: " +
this.call_resource);
                    },
                    function (error) {
                        console.info('Dial error ', error);
                    }
                );
            },

but JIGASI doesn't send JvbRoomName to SIP server.

I really appreciate any help you can provide.

···

to: this.connection.emuc.focusMucJid
                        to: to,
                        from: from