Jigasi never sees the SIP headers for room name or password?

We are connecting our jitsi-meet install with our asterisk SIP server. We have a configuration that is working as proof of concept; In our /etc/jitsi/jigasi/sip-communicator.properties file if we have the line:


and do not provide a password, then join that meeting from the browser and call in, it works fine. If we add a password, we start getting an error (filtered for severe errors only):

2020-12-31 23:41:48.237 SEVERE: [226] impl.protocol.jabber.ChatRoomJabberImpl.joinAs().712 Failed to join chat room siptest@conference.::JITSINAME::.::DOMAIN::.::TLD:: with nickname: 35e7e7b8. The chat room requests a password.
2020-12-31 23:41:48.237 SEVERE: [226] org.jitsi.jigasi.JvbConference.joinConferenceRoom().843 [ctx=1609458107142682683787]net.java.sip.communicator.service.protocol.OperationFailedException: Failed to join chat 
room siptest@conference.::JITSINAME::.::DOMAIN::.::TLD:: with nickname: 35e7e7b8. The chat room requests a password.
2020-12-31 23:41:48.243 SEVERE: [226] org.jitsi.jigasi.xmpp.CallControlMucActivator.joinCommonRoom().339 java.lang.NullPointerException
2020-12-31 23:41:48.247 SEVERE: [93] org.jitsi.jigasi.AbstractGateway.notifyCallEnded().120 [ctx=1609458107142682683787] Call resource not exists for session.

If we remove the line in the sip-communicator.properties file, so we’re not providing a default room name, we get the following error (SEVERE/ERROR/WARNING/INFO):

2020-12-31 22:49:28.949 INFO: [109] org.jitsi.jigasi.SipGateway.incomingCallReceived().216 [ctx=16094549689491645348708] Incoming call received...
2020-12-31 22:49:29.950 INFO: [110] org.jitsi.jigasi.SipGatewaySession.run().1549 [ctx=16094549689491645348708] No JVB room name provided in INVITE header
2020-12-31 22:49:29.953 INFO: [70] org.jitsi.jigasi.SipGatewaySession.handleCallState().1425 [ctx=16094549689491645348708] SIP call ended: CallPeerChangeEvent: type=CallPeerStatusChange oldV=net.java.sip.communi
cator.service.protocol.CallPeerState:Incoming Call newV=net.java.sip.communicator.service.protocol.CallPeerState:Failed for peer=::ORG NAME:: <::NUMBER::@::ASTERISK.SERVER.IP::>;status=Failed
2020-12-31 22:49:29.953 INFO: [70] org.jitsi.jigasi.SipGatewaySession.sipCallEnded().616 [ctx=16094549689491645348708] Sip call ended: Call: id=16094549689471760193556 peers=0
2020-12-31 22:49:29.953 SEVERE: [70] org.jitsi.jigasi.AbstractGateway.notifyCallEnded().120 [ctx=16094549689491645348708] Call resource not exists for session.
2020-12-31 22:49:29.954 INFO: [70] org.jitsi.jigasi.SipGatewaySession.peerStateChanged().1491 null SIP peer state: Failed

For these reasons, we have concluded that the headers are NOT making it from the SIP system into jigasi.

We have confirmed that the asterisk server is providing the headers, and in the sip-communicator.properties file we have the following line:


We have enabled “Finest” logging but it hasn’t helped us. We are stuck and think we have been through all the documentation we can find. Is there a way to confirm what SIP headers jigasi is seeing in the invite request?

Here is the Asterisk Dial Plan Code

exten => s,n,Dial(PJSIP/${Jitsi},3,B(Add-Jitsi-Headers^s^1(${CURL_RESULT}^${confpin})),m(silence)A(/tmp/name-${rnum})M(Jitsi-join))
exten => s,n,Verbose(0, Contacting ${Jitsi}... Status is ${DIALSTATUS} );
**exten => s,n,Verbose(0, ${PJSIP_HEADER(read,Jitsi-Conference-Room-Pass)})**
**exten => s,n,Verbose(0, ${PJSIP_HEADER(read,X-Room-Name)})**  


exten => s,1,Set(PJSIP_HEADER(add,X-Room-Name)=${ARG1}))
same => n,Set(PJSIP_HEADER(add,Jitsi-Conference-Room-Pass)=${ARG2}))
same => n,Return()

Asterisk Console Logs

   -- Executing [s@Jitsi-Conference-Entry:26] Dial("PJSIP/provider", "PJSIP/jitsi,3,B(Add-Jitsi-Headers^s^1(siptest^1234)),m(silence)A(/tmp/name-603811256)M(Jitsi-join)") in new stack
    -- PJSIP/provider Internal Gosub(Add-Jitsi-Headers,s,1(siptest,1234)) start
    -- Executing [s@Add-Jitsi-Headers:1] Set("PJSIP/provider", "PJSIP_HEADER(add,X-Room-Name)=siptest)") in new stack
    -- Executing [s@Add-Jitsi-Headers:2] Set("PJSIP/provider", "PJSIP_HEADER(add,Jitsi-Conference-Room-Pass)=1234)") in new stack
    -- Executing [s@Add-Jitsi-Headers:3] Return("PJSIP/provider", "") in new stack
  == Spawn extension (Jitsi-Conference-Entry, s, 26) exited non-zero on 'PJSIP/provider'
    -- PJSIP/provider Internal Gosub(Add-Jitsi-Headers,s,1(siptest,1234)) complete GOSUB_RETVAL=
    -- Called PJSIP/jitsi
    -- PJSIP/jitsi-000093d2 is ringing
    -- PJSIP/jitsi-000093d2 is ringing
    -- PJSIP/jitsi-000093d2 is ringing
    -- PJSIP/jitsi-000093d2 is ringing
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [s@Jitsi-Conference-Entry:27] Verbose("PJSIP/provider", "0, Contacting jitsi... Status is BUSY ") in new stack
    -- Executing [s@Jitsi-Conference-Entry:28] Verbose("PJSIP/provider", "0, 1234)") in new stack
    -- Executing [s@Jitsi-Conference-Entry:29] Verbose("PJSIP/provider", "0, siptest)") in new stack

2 ideas: The default SIP header for the room that jigasi stable is picking up is: Jitsi-Conference-Room

So unless you have set the room header to something else in jigasi’s sip-communicator.properties file, try setting that header.

Second: Try GitHub - sipcapture/sipgrep: SIPGREP: Display and Troubleshoot SIP signaling over IP networks in console to see if the SIP headers are really sent out from your asterisk to jigasi. I am suggesting this as pjsip SIP headers for outgoing calls are notoriously difficult to get right, but from what I see comparing with Asterisk 13 Function_PJSIP_HEADER - Asterisk Project - Asterisk Project Wiki you did it the same. So just confirming it via sipgrep might be worthwile.

How did you do that? You saw the headers in Wireshark on the jigasi side? You can enable packet logging

And you can check the pcap files in jigasi log folder whether you see the header in the incoming SIP INVITE message.

Sorry for the delay, holidays and all.

This is the pcap contents, it looks like the headers are there on the invite sent to jitsi. We can’t see the content of those headers on the jigasi side, but from the verbose asterisk logs above the headers show as populated.

Are the values correct for the custom headers? I think both values are just ), am I right?

Yes, but I think it only looks blank because Wireshark is not decoding the rest, note the Note/Undecoded0:Unrecognized SIP header (x-room-name). I’m communicating this as our systems guy and our networking person is handling the wireshark stuff, but if you think there’s something else I can do to help debug let me know.

We’re gonna look into sipgrep tomorrow.

Enable packet logging in jigasi and check those pcap files.

In addition, by default jigasi expects the room name in the header “Jitsi-Conference-Room”, not X-Room-Name, see GitHub - jitsi/jigasi: Jigasi: a server-side application acting as a gateway to Jitsi Meet conferences. Currently allows regular SIP clients to join meetings and provides transcription capabilities.

So unless you have also configured this custom room header in jigasis config: net.java.sip.communicator.impl.protocol.sip.accXXXXX.JITSI_MEET_ROOM_HEADER_NAME=X-Room-Name this is not going to work…

Can you please check on this in your sip-communicator.properties to go either way: Set the default header “Jitsi-Conference-Room” on the SIP side and not configure a custom header in sip-communicator.properties or set X-Room-Name and configure that as well.

That pcap screenshot is from jigasi’s packet logging, opened by our network admin in wireshark. The header is X-Room-Name in sip-communicator.properties (following some guide in setting this up). If it’s better to set the expected default we can do that, however somewhere between asterisk and jitsi it seems that header isn’t coming through, we’ll try sipgrep today.

here is our working config that might be of use for you:

; Sets appropriate headers for Jigasi to know where to route the call
exten => caller_handler,1,NoOp(Set Header Jitsi-Conference-Room: ${ARG1} -Pass: ${ARG2})
same => n,GotoIf($[${LEN(${ARG1})} == 0]? 5)
same => n,Set(PJSIP_HEADER(add,Jitsi-Conference-Room)=${ARG1})
same => n,Set(PJSIP_HEADER(add,X-Room-Name)=${ARG1})
same => 5,GotoIf($[${LEN(${ARG2})} != 0]? 10)
same => n,Return()
same => 10,Set(PJSIP_HEADER(add,Jitsi-Conference-Room)=${ARG2})
same => n,Return()

it uses the conferenceMapper to get the correct room name.

Now, I see it. There is an extra ), maybe this is your problem and that’s why both headers are with value ) or maybe there is more - maybe ARG1 is also empty …

Our network admin will commit a change after our call center closes tonight, I’ll check back after.

Great news, it’s working! Per our network admin the retry code was clearing out the headers.

Thanks for the assistance!