Direct invitation or simple msg doesn't get sent

Hi,

We are trying to build a chat application in MVC using strophe.js.

We have created a chat room using rest api and want other user to join the room.

We tried to send direct invitation using below code. but somehow, stanzas are not getting generated and sent. even no error is thrown.

Even, we tried to send simple message to other user. but that also doesn’t show up in network panel in firefox or reach to other user…

We have added other user to roster and vice versa with both subscription. but somehow, none of the message get sent.

We added mediated invitation before this stanza. it gets sent; I mean no error is received. but doesn’t get received on other end.

could it be , we are using old version of strophe.js ? we are using one from professional xmpp book source code.

we actually tried very latest from github. but then also there was no luck

will appreciate any help ! thanks in advance

XMPPComm.connection.send($msg({

from: XMPPComm.User_Id,

to: to + ‘@servername

})

.c(‘x’, {

xmlns: “jabber:x:conference”,

jid: RoomId

}));

var message = $msg({

to: to + ‘@eworkplace0’,

“type”: “chat”

})

.c(‘body’).t(‘Room Joining invitation by sachin shinde,’ + RoomId).up()

    .c('active', { xmlns: "http://jabber.org/protocol/chatstates" });

somehow, our chat on existing chat room created works fine.

Regards,

Sachin Shinde