Jigasi recieved the JWT token from SIP but not passing to prosody, Error verifying token err:not-allowed, reason:token required

Hi Team,

I am sending Room name and JWT token in SIP message like below,

in the SIP invite message,
X-Room-Name: puja@conference.jigasitest.videoconferencia.online
X-SIP-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJqaXRzaSIsImlzcyI6ImVjb3MxMjMiLCJzdWIiOiIqIiwicm9vbSI6IioiLCJqdGkiOiJmMDExZTJmOC0wNDYzLTRhNDItYTQzYy00Y2
MjFkMTNkZjUiLCJpYXQiOjE2MjIwMDkyOTYsImV4cCI6MTYyMjAxMjg5Nn0.KvBLG_DUAEOENbkHydH0ic21SVI0iB9VwjUMhKS01UY

Jigasi Log :

2021-05-26 10:11:44.919 INFO: [4578] org.jitsi.jigasi.SipGateway.incomingCallReceived().216 [ctx=16220167049191429915010] Incoming call received…
2021-05-26 10:11:44.920 INFO: [4580] org.jitsi.jigasi.SipGatewaySession.run().1718 [ctx=16220167049191429915010] Wait thread cancelled
2021-05-26 10:11:44.920 INFO: [4578] org.jitsi.jigasi.JvbConference.start().479 [ctx=16220167049191429915010] Starting JVB conference room: puja@conference.jigasitest.videoconferencia.online
2021-05-26 10:11:44.921 INFO: [4578] org.jitsi.jigasi.JvbConference.setXmppProvider().622 [ctx=16220167049191429915010] Using ProtocolProviderServiceJabberImpl(Jabber:4f48109e@jigasitest.videoconferencia.online/4f48109e)
2021-05-26 10:11:44.990 INFO: [4581] impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.registrationStateChanged().127 Jingle : ON
2021-05-26 10:11:44.990 INFO: [4581] org.jitsi.jigasi.JvbConference.registrationStateChanged().673 [ctx=16220167049191429915010] Registering XMPP.
2021-05-26 10:11:44.991 WARNING: [4585] org.jivesoftware.smack.sasl.SASLError.fromString() Could not transform string ‘not_allowed’ to SASLError
java.lang.IllegalArgumentException: No enum constant org.jivesoftware.smack.sasl.SASLError.not_allowed
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at org.jivesoftware.smack.sasl.SASLError.valueOf(SASLError.java:27)
at org.jivesoftware.smack.sasl.SASLError.fromString(SASLError.java:51)
at org.jivesoftware.smack.sasl.packet.SaslStreamElements$SASLFailure.(SaslStreamElements.java:209)
at org.jivesoftware.smack.util.PacketParserUtils.parseSASLFailure(PacketParserUtils.java:797)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1099)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.base/java.lang.Thread.run(Thread.java:829)
2021-05-26 10:11:44.992 SEVERE: [4581] impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin().1003 Failed to connect to XMPP service
org.jivesoftware.smack.sasl.SASLErrorException: SASLError using ANONYMOUS: not-allowed
at org.jivesoftware.smack.SASLAuthentication.authenticationFailed(SASLAuthentication.java:292)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1100)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:1000)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:1016)
at java.base/java.lang.Thread.run(Thread.java:829)
2021-05-26 10:11:44.996 SEVERE: [4581] org.jitsi.jigasi.JvbConference.registrationStateChanged().677 [ctx=16220167049191429915010] XMPP Connection failed.
2021-05-26 10:11:44.997 WARNING: [4581] org.jitsi.jigasi.JvbConference.leaveConferenceRoom().1109 [ctx=16220167049191429915010] MUC room is null
2021-05-26 10:11:47.228 INFO: [4589] org.jitsi.jigasi.SipGatewaySession.handleCallState().1614 [ctx=16220167049191429915010] SIP call ended: CallPeerChangeEvent: type=CallPeerStatusChange oldV=net.java.sip.communicator.service.protocol.CallPeerState:Incoming Call newV=net.java.sip.communicator.service.protocol.CallPeerState:Disconnected for peer=1005 1005@eternitypbx.videoconferencia.online;status=Disconnected

Prosody Log:

May 26 10:11:44 c2s55d15cbe82e0 info Client connected
May 26 10:11:44 c2s55d15cbe82e0 info Stream encrypted (TLSv1.2 with ECDHE-RSA-AES128-GCM-SHA256)
May 26 10:11:44 general warn Error verifying token err:not-allowed, reason:token required
May 26 10:11:44 c2s55d15cbe82e0 info Client disconnected: connection closed

In prosody log, it seems token not received from Jigasi.

If i try to connect from browser with same room and JWT token, it is connected.
Issue only when we try to connect from SIP server via jigasi.

Please guide me how to achieve from SIP with JWT token.

Have you implemented the functionality in jigasi to use the token?

I am new to Jitsi, configuring and integrating first time with SIP.
It will be great if u guide me how to implement this in jigasi.
Thanks in advance.

Well its not so complicated, but also not a one line change, you can check how …-Room-Name is implemented and that will give you an idea, it is room name header and password header

Hi @Syed_Kadar ,

Were you able to implement this ?
I am trying but still without any success.
Any help would be greatly appreciated .

We would like to pass all user information via JWT through incoming SIP call via header as well.

Any help would be greatly appreciated.

Regards,
Srdjan I.