Setup Jigasi with FreePBX (asterisk) and IVR

Thank you. I was always wondering about this line. So if all runs on the same server, I can write localhost oder my local server’s up here?!

I have already created the extension. I put an IVR behind it in PBX according to the instruction linked in my first post above. I hope that also works to enter a specific jitsi room and not only the default one (for testing of course I will use the default one first).

How about the outbound line? So I need to use another extension for it?

I will get back here as soon as I tried it later today.

Yes, you should be able replace with the local host. Check the asterisk CLI to be sure you see registration.

No need for another extension. Jigasi will use the same extension for in/outbound. If you can already make an outbound call with a softphone, you’re good. If you haven’t gone that far in your FreePBX setup, you need an outbound route.

Pro Tip: Test registration, inbound / outbound call, and check for audio both ways with a phone or softphone before assuming Jigasi is the source of any issues that may pop up.

I tried a few different setups.

I needed to differ a bit from your suggestion as I am registering sip over pjsip.

Asterisk seems to be connected to sipgate basic.
Also jigasi registers the asterisk user. I can call the sip number and hear the IVR (see link down for IVR setup). Anything else, such as creating a simple extension as described by you did not work.

Jigasi.log:

RegistrationStateChangeEvent[ oldState=Registering; newState=RegistrationState=Registered; userRequest=false; reasonCode=-1; reason=null]

In asterisk log I can see the following:

[2020-04-30 17:00:03] VERBOSE[25736] pbx_variables.c: Setting global variable 'SIPDOMAIN' to 'my-public-ip'
[2020-04-30 17:00:13] VERBOSE[30144][C-00000009] pbx.c: Spawn extension (from-did-direct, h, 1) exited non-zero on 'PJSIP/Sipgate3-00000008'
[2020-04-30 17:03:10] VERBOSE[30260][C-0000000a] app_verbose.c: result is: {Pin}
[2020-04-30 17:03:11] VERBOSE[30260][C-0000000a] app_verbose.c: result is: {JITSI}
[2020-04-30 17:03:11] WARNING[30260][C-0000000a] pbx.c: No application 'Macro' for extension (from-did-direct, h, 1)

I am reading that macro app is an old app in asterisk and not used anymore. But it might be needed in the used dial plan? Or is sipgate basic causing the problem?

I used the following dial plan according to this post: [jitsi-dev] IVR/Dial-In setup

[ext-local]
exten => 6338,1,Set(__RINGTIMER={IF([“${DB(AMPUSER/6338/ringtimer)}” > “0”]?{DB(AMPUSER/6338/ringtimer)}:{RINGTIMER_DEFAULT})})
exten => 6338,n(getmeeting),Playback(conf-getconfno)
exten => 6338,n,Read(Pin,beep,20)
exten => 6338,n,Verbose(result is: {Pin}) exten => 6338,n,SayDigits({Pin},m)
exten => 6338,n,AGI(jitsi_curling.sh,{Pin}) exten => 6338,n,Verbose(result is: {JITSI})
exten => 6338,n,GotoIf(["{JITSI}" = “false}”]?invalidnum:joinmeeting)
exten => 6338,n(invalidnum),Playback(conf-invalid)
exten => 6338,n,Goto(getmeeting)
exten => 6338,n(joinmeeting),SIPAddHeader(Jitsi-Conference-Room: {JITSI})
exten => 6338,n,Playback(auth-thankyou)
exten => 6338,n,playback(conf-placeintoconf)
exten => 6338,n,Macro(exten-vm,novm,6338,0,0,0)
exten => 6338,n,Goto({IVR_CONTEXT},return,1)

My extension number is 9999 instead. I also created the .sh script mentioned in the linked post.

Any tips on that?

Update:
It seems to be some macro app problem:
I changed the extension dial plan like the following and I could type some room number to join (room 146). But right after joining the room the call dropped.

[ext-local]
exten => 9999,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/9999/ringtimer)}" > "0"]?${DB(AMPUSER/9999/ringtimer)}:${RINGTIMER_DEFAULT})})
exten => 9999,2,Read(Pin,"custom/my_system_recording")
exten => 9999,3,Verbose(result is: ${Pin})
exten => 9999,4,AGI(jitsi_curling.sh,${Pin})
exten => 9999,5,Verbose(result is: ${JITSI})
exten => 9999,6,Set(HASH(__SIPHEADERS,Jitsi-Conference-Room)=${JITSI})
exten => 9999,7,Macro(exten-vm,novm,9999,0,0,0)
exten => 9999,8(dest),Set(__PICKUPMARK=)
exten => 9999,9,Goto(${IVR_CONTEXT},return,1)

Asterisk log:

[2020-04-30 17:41:47] VERBOSE[619] asterisk.c: Asterisk Ready.
[2020-04-30 17:44:34] VERBOSE[929][C-00000001] app_verbose.c: result is: 146
[2020-04-30 17:44:34] VERBOSE[929][C-00000001] app_verbose.c: result is:
[2020-04-30 17:44:34] WARNING[929][C-00000001] pbx.c: No application 'Macro' for extension (from-did-direct, 9999, 7)
[2020-04-30 17:44:34] WARNING[929][C-00000001] pbx.c: No application 'Macro' for extension (from-did-direct, h, 1)

On the Extension piece… what exactly wasn’t working? Before getting too involved with the Jigasi end… Try creating 2 extensions , register them with softphones, call one with the other and make sure you have audio both ways.

For the Macro Piece… Judging from the log, you’re right about the Macro being the culprit. I don’t use exten-vm myself so I can’t attest to any known issues, but it looks to me like there’s too much going on in the macro call. If you’re going to use it , I don’t get the need for the zeros.

This should be the proper usage (but I’d probably just not use it at all.):

exten => 9999,7,Macro(exten-vm,novm,9999)

I also don’t really get why a script is being used to curl the API only to then have to call the script via AGI , when curl can be initiated directly from the Dial plan. I’m probably being overly critical , but that looks kind of like a wild frankenstein project.

I’ll see if I can get some time to document a more elegant setup and share. I think a lot of folks are in the same boat , feeling around in the dark out of their depth.

Hi,
It would be great to have some sort of instructions for individual password-protected jitsi rooms over SIP (asterisk and freepbx). I have seen some people use these exten => Macro() instructions as in the linked post but I have no clue why they do not see problems with the long removed macro app?!

I documented my production setup here: FreePBX integration. Built the IVR from scratch.

That will get you setup with Dial-in options and an IVR. What it doesn’t cover is the actual Jitsi install and setup. I’m using Prosody authentication for Jitsi hosts and an anonymous guest domain.
This ensures random people can’t start meetings, they can only access the main page. Hosts would need to start a meeting before unauthenticated guests can join.

Hi Craig,

Thanks for the good guide. I was especially following step 8.
I might need further details on the following topics.

  1. with chan sip, I can interact with the dial plan. With pjsip, I can not interact with the dial plan
  2. My FreePBX had no edit_config, and it needed to be installed in the admin -> updates panel
  3. I needed to install music on hold package as well
  4. I am missing a lot of the recordings you use in your dial plan
  5. it seems like the conference mapper does not work. How is the API supposed to get data from my self-hosted instance?

In summary: asterisk is dropping the call in den dial plan and says “Status Busy”. My extension is 6664.

Asterisk log:

[2020-05-01 07:14:52] VERBOSE[32043][C-00000005] app_verbose.c: {"message":"No conference mapping was found","id":1234,"conference":false}
[2020-05-01 07:15:09] WARNING[32043][C-00000005] res_musiconhold.c: Music on Hold class 'silence' not found in memory. Verify your configuration.
[2020-05-01 07:15:09] WARNING[32043][C-00000005] res_musiconhold.c: Music on Hold class 'silence' not found in memory. Verify your configuration.
[2020-05-01 07:15:09] WARNING[32043][C-00000005] res_musiconhold.c: Music on Hold class 'default' not found in memory. Verify your configuration.
[2020-05-01 07:15:10] VERBOSE[32043][C-00000005] app_verbose.c: Contacting 6664... Status is BUSY

Now, jigasi seemed to throw some errors:

2020-05-01 04:35:47.612 WARNUNG: [49] org.jitsi.jigasi.xmpp.CallControl.<init>().139 Always trust in remote TLS certificates mode is enabled
2020-05-01 07:15:09.614 INFORMATION: [677] org.jitsi.jigasi.SipGateway.incomingCallReceived().196 [ctx=1588310109604144522128] Incoming call received...
2020-05-01 07:15:09.624 INFORMATION: [679] org.jitsi.jigasi.SipGatewaySession.run().1450 [ctx=1588310109604144522128] Wait thread cancelled
2020-05-01 07:15:09.632 INFORMATION: [677] org.jitsi.jigasi.JvbConference.start().422 [ctx=1588310109604144522128] Starting JVB conference room: {"message":"No conference mapping was found","id":1234,"conference":false}
2020-05-01 07:15:09.721 INFORMATION: [677] org.jitsi.jigasi.JvbConference.setXmppProvider().553 [ctx=1588310109604144522128] Using ProtocolProviderServiceJabberImpl(Jabber:1950085f@meet.domain.com/1950085f)
2020-05-01 07:15:09.908 INFORMATION: [681] impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.registrationStateChanged().127 Jingle : ON2020-05-01 07:15:09.909 INFORMATION: [681] org.jitsi.jigasi.JvbConference.registrationStateChanged().606 [ctx=1588310109604144522128] Registering XMPP.
2020-05-01 07:15:09.961 INFORMATION: [681] impl.protocol.jabber.ProtocolProviderServiceJabberImpl.authenticated().2535 Authenticated: false
2020-05-01 07:15:09.975 INFORMATION: [681] org.jitsi.jigasi.JvbConference.joinConferenceRoom().685 [ctx=1588310109604144522128] Joining JVB conference room: {"message":"No conference mapping was found","id":1234,"conference":false}2020-05-01 07:15:09.996 SCHWERWIEGEND: [681] org.jitsi.jigasi.JvbConference.joinConferenceRoom().801 [ctx=1588310109604144522128]net.java.sip.communicator.service.protocol.OperationFailedException: {"message":"No conference mapping was found","id":1234,"conference":false} is not a valid JID local part
net.java.sip.communicator.service.protocol.OperationFailedException: {"message":"No conference mapping was found","id":1234,"conference":false} is not a valid JID local part
        at net.java.sip.communicator.impl.protocol.jabber.OperationSetMultiUserChatJabberImpl.getCanonicalRoomName(OperationSetMultiUserChatJabberImpl.java:662)
        at net.java.sip.communicator.impl.protocol.jabber.OperationSetMultiUserChatJabberImpl.findRoom(OperationSetMultiUserChatJabberImpl.java:316)
        at org.jitsi.jigasi.JvbConference.joinConferenceRoom(JvbConference.java:687)
        at org.jitsi.jigasi.JvbConference.registrationStateChanged(JvbConference.java:583)
        at net.java.sip.communicator.service.protocol.AbstractProtocolProviderService.fireRegistrationStateChanged(AbstractProtocolProviderService.java:187)
        at net.java.sip.communicator.service.protocol.AbstractProtocolProviderService.fireRegistrationStateChanged(AbstractProtocolProviderService.java:141)
        at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:1389)
        at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:970)
        at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.initializeConnectAndLogin(ProtocolProviderServiceJabberImpl.java:795)
        at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.register(ProtocolProviderServiceJabberImpl.java:500)
        at org.jitsi.jigasi.util.RegisterThread.run(RegisterThread.java:59)
Caused by: org.jxmpp.stringprep.XmppStringprepException: Localpart must not contain '"'
        at org.jxmpp.stringprep.simple.SimpleXmppStringprep.localprep(SimpleXmppStringprep.java:74)
        at org.jxmpp.stringprep.XmppStringPrepUtil.localprep(XmppStringPrepUtil.java:62)
        at org.jxmpp.jid.parts.Localpart.from(Localpart.java:137)
        at net.java.sip.communicator.impl.protocol.jabber.OperationSetMultiUserChatJabberImpl.getCanonicalRoomName(OperationSetMultiUserChatJabberImpl.java:657)
        ... 10 more
2020-05-01 07:15:09.997 WARNUNG: [681] org.jitsi.jigasi.JvbConference.leaveConferenceRoom().883 [ctx=1588310109604144522128] MUC room is null
2020-05-01 07:15:09.997 INFORMATION: [681] org.jitsi.jigasi.JvbConference.stop().513 [ctx=1588310109604144522128] Removing account Jabber:1950085f@meet.domain.com/1950085f
2020-05-01 07:15:10.040 INFORMATION: [681] impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.registrationStateChanged().134 Jingle : OFF
2020-05-01 07:15:10.052 INFORMATION: [693] org.jitsi.jigasi.SipGatewaySession.handleCallState().1318 [ctx=1588310109604144522128] SIP call ended: CallPeerChangeEvent: type=CallPeerStatusChange oldV=net.java.sip.communicator.service.protocol.CallPeerState:Incoming Call newV=net.java.sip.communicator.service.protocol.CallPeerState:Failed for peer=anonymous <anonymous@my-servers-local-ip>;status=Failed
2020-05-01 07:15:10.053 INFORMATION: [693] org.jitsi.jigasi.SipGatewaySession.sipCallEnded().585 [ctx=1588310109604144522128] Sip call ended: Call: id=15883101094851510781408 peers=0
2020-05-01 07:15:10.056 SCHWERWIEGEND: [693] org.jitsi.jigasi.AbstractGateway.notifyCallEnded().120 [ctx=1588310109604144522128] Call resource not exists for session.
2020-05-01 07:15:10.057 INFORMATION: [693] org.jitsi.jigasi.SipGatewaySession.peerStateChanged().1384 null SIP peer state: Failed

Update on question 3) from my post one above

I found the asterisk sound packages.

http://downloads.asterisk.org/pub/telephony/sounds/

And some other third-party recordings (free&commercial ones) can be found here:

I downloaded all of the English (en) packages: core, extra and MOH op sounds in .alaw format and the sounds seem to work now

One point less on my list :slight_smile:

1 Like

Next update:
Chan sip interaction with dial plan works.

There are two things which do not work:

  1. conference mapper. I also went through the guide of adding the dial-in numbers to the instance, but the website in the people invite link shows “oops, something went wrong”.
    https://jitsidomain.com/static/dialInInfo.html?room=LeadingPausesFillResponsibly

  2. If I find out the conference pin over the API myself as I cannot get it through my invite link, I can dial through the IVR and enter the room. A second after that the session is over.

Here is the jigasi log:

org.jitsi.jigasi.SipGatewaySession.peerStateChanged().1384 [ctx=15883242127031724954480] SIP peer state: Connected
2020-05-01 11:10:14.173 INFORMATION: [175] service.protocol.media.CallPeerMediaHandler.start().1961 Starting
2020-05-01 11:10:14.203 INFORMATION: [171] service.protocol.media.MediaHandler.registerDynamicPTsWithStream().1003 Dynamic PT map: 126=rtpmap:-1 telephone-event/8000; 111=rtpmap:-1 opus/48000/2 fmtp:useinbandfec=1;minptime=10; 103=rtpmap:-1 unknown/90000;
2020-05-01 11:10:14.203 INFORMATION: [171] service.protocol.media.MediaHandler.registerDynamicPTsWithStream().1020 PT overrides [103->104 ]
2020-05-01 11:10:14.213 INFORMATION: [171] service.protocol.media.CallPeerMediaHandler.start().1961 Starting
2020-05-01 11:10:14.326 INFORMATION: [175] service.protocol.media.TransportManager.sendHolePunchPacket().552 Send NAT hole punch packets
2020-05-01 11:10:14.351 INFORMATION: [171] org.jitsi.jigasi.JvbConference.callStateChanged().1160 [ctx=15883242127031724954480] JVB conference call IN_PROGRESS.
2020-05-01 11:10:14.366 SCHWERWIEGEND: [239] net.sf.fmj.media.Log.error()   Unable to handle format: LINEAR, 48000.0 Hz, 16-bit, Mono, LittleEndian, Signed
2020-05-01 11:10:14.369 SCHWERWIEGEND: [239] net.sf.fmj.media.Log.error() Failed to prefetch: net.sf.fmj.media.ProcessEngine@44a4268
2020-05-01 11:10:14.376 SCHWERWIEGEND: [233] net.sf.fmj.media.Log.error() Error: Unable to prefetch net.sf.fmj.media.ProcessEngine@44a4268

2020-05-01 11:10:14.516 SCHWERWIEGEND: [272] net.sf.fmj.media.Log.error()   Unable to handle format: LINEAR, 48000.0 Hz, 16-bit, Mono, LittleEndian, Signed
2020-05-01 11:10:14.517 SCHWERWIEGEND: [272] net.sf.fmj.media.Log.error() Failed to prefetch: net.sf.fmj.media.ProcessEngine@7f5a5dce
2020-05-01 11:10:14.525 SCHWERWIEGEND: [270] net.sf.fmj.media.Log.error() Error: Unable to prefetch net.sf.fmj.media.ProcessEngine@7f5a5dce

2020-05-01 11:10:14.912 INFORMATION: [116] org.jitsi.jigasi.SipGatewaySession.sipCallEnded().585 [ctx=1588324206942284605576] Sip call ended: Call: id=15883242068861599827184 peers=0
2020-05-01 11:10:14.917 INFORMATION: [116] org.jitsi.jigasi.JvbConference.memberPresenceChanged().964 [ctx=1588324206942284605576] Member left : OWNER focus@my-domain...blablub

Any ideas how the conference mapping / conference pin on the static dial-in page can be debugged and how to get rid of the audio/stream errors that let my call deop instantly??

  1. If you’re using PJSIP , you’d need to modify the Dial Plan for that technology type. I would use CHAN SIP extensions though. Its older and more stable. Personally, I haven’t seen a super compelling reason to use PJSIP.

  2. , 2., and 3. These are probably not included if you’re not using a FreePBX ISO. I’m a little surprised they didn’t come natively with asterisk though. I see you worked through those :slight_smile:

  3. The conference mapper API will return False as shown below if the pin is incorrect. Also, I believe if the meeting has not started. PIN’s are 10 digit’s long from what I’ve been seeing on my install.

app_verbose.c: {"message":"No conference mapping was found","id":1234,"conference":false}

Do you have the JSON & PHP files setup per step 6? what happens when you try accessing your PHP file in a browser?

Yeah, the pin I have used was a created room with the name 1234. I thought only numerical room names work as you can only answer number to the IVR.

Then I guess what is left, is actually obtaining the PIN through step 6 of your guide.

I get this message if I navigate to the PHP file on my server. I can only access the PHP file on http (port 80).

{"message":"Phone numbers available.","numbers":{"GER"["+49.1234.567.56"]},"numbersEnabled":true}

I am running all services on the same server. My apache file looks like this:

<Directory />
Header set Access-Control-Allow-Origin "https://meet.mydomain.com"
AllowOverride none
Require all denied
</Directory>

<Directory /var/www/html/admin>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

The admin page is the freepbx webserver.

Correct, you’ll need step 6 working in order for a PIN to populate. Your examples look good on the surface. Although, you may run into unique hurdles with everything on the same server.

If all is functioning , the PIN would appear like the picture below. The PIN is what the IVR collects. Then, the CURL part of the dial plan requests the meeting name.

All of that said, If you want to bypass using the API and simply use numeric meeting names, You can do that too. I have another Tutorial I setup for a client here: Asterisk IVR without conference mapper API

Hi Craig,
I think I got all my previous error sorted. Some pulseaudio problems were solved using the instruction on this link: https://askubuntu.com/questions/426648/how-to-reinstall-pulseaudio-ubuntu-12-04

Now everything connects in jigasi but there is the following error log when the call arrives at jigasi. I could see an anonymous caller joining the room for a second, then it left right away.

Jigasi:

2020-05-03 21:17:13.611 INFORMATION: [106] org.jitsi.jigasi.SipGateway.incomingCallReceived().196 [ctx=15885334336111396714603] Incoming call received...
2020-05-03 21:17:13.612 INFORMATION: [107] org.jitsi.jigasi.SipGatewaySession.run().1450 [ctx=15885334336111396714603] Wait thread cancelled
2020-05-03 21:17:13.612 INFORMATION: [106] org.jitsi.jigasi.JvbConference.start().422 [ctx=15885334336111396714603] Starting JVB conference room: hallo
2020-05-03 21:17:13.615 INFORMATION: [106] org.jitsi.jigasi.JvbConference.setXmppProvider().553 [ctx=15885334336111396714603] Using ProtocolProviderServiceJabberImpl(Jabber:262ebe94@domain/262ebe94)
2020-05-03 21:17:13.682 INFORMATION: [109] impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.registrationStateChanged().127 Jingle : ON
2020-05-03 21:17:13.682 INFORMATION: [109] org.jitsi.jigasi.JvbConference.registrationStateChanged().606 [ctx=15885334336111396714603] Registering XMPP.
2020-05-03 21:17:13.728 INFORMATION: [109] impl.protocol.jabber.ProtocolProviderServiceJabberImpl.authenticated().2535 Authenticated: false
2020-05-03 21:17:13.742 INFORMATION: [109] org.jitsi.jigasi.JvbConference.joinConferenceRoom().685 [ctx=15885334336111396714603] Joining JVB conference room: hallo@conference.domain
2020-05-03 21:17:13.830 INFORMATION: [114] impl.protocol.jabber.ChatRoomJabberImpl.joined().1256 hallo@conference.domain/focus has joined the hallo@conference.domain chat room.
2020-05-03 21:17:13.843 INFORMATION: [114] impl.protocol.jabber.ChatRoomJabberImpl.joined().1256 hallo@conference.domain/c8e8ef16 has joined the hallo@conference.domain chat room.
2020-05-03 21:17:14.654 INFORMATION: [124] impl.protocol.jabber.IceUdpTransportManager.createIceAgent().346 End gathering harvester within 582 ms
2020-05-03 21:17:16.148 INFORMATION: [124] impl.protocol.jabber.CallPeerMediaHandlerJabberImpl.harvestCandidates().1198 End candidate harvest within 1160 ms
2020-05-03 21:17:16.168 INFORMATION: [124] org.jitsi.jigasi.JvbConference.incomingCallReceived().1055 [ctx=15885334336111396714603] Got invite from focus
2020-05-03 21:17:16.344 INFORMATION: [134] service.protocol.media.MediaHandler.registerDynamicPTsWithStream().1003 Dynamic PT map: 126=rtpmap:-1 telephone-event/8000; 111=rtpmap:-1 opus/48000/2 fmtp:useinbandfec=1;minptime=10; 103=rtpmap:-1 unknown/90000;
2020-05-03 21:17:16.344 INFORMATION: [134] service.protocol.media.MediaHandler.registerDynamicPTsWithStream().1020 PT overrides [103->104 ]
2020-05-03 21:17:16.395 INFORMATION: [134] service.protocol.media.CallPeerMediaHandler.start().1961 Starting
2020-05-03 21:17:16.530 INFORMATION: [133] service.protocol.media.MediaHandler.registerDynamicPTsWithStream().1003 Dynamic PT map: 101=rtpmap:-1 telephone-event/8000;
2020-05-03 21:17:16.530 INFORMATION: [133] service.protocol.media.MediaHandler.registerDynamicPTsWithStream().1020 PT overrides []
2020-05-03 21:17:16.552 INFORMATION: [133] org.jitsi.jigasi.SipGatewaySession.peerStateChanged().1384 [ctx=15885334336111396714603] SIP peer state: Connecting*
2020-05-03 21:17:16.586 INFORMATION: [152] org.jitsi.jigasi.SipGatewaySession.handleCallState().1303 [ctx=15885334336111396714603] Sip call IN_PROGRESS: Call: id=**88533433609473143113 peers=1
2020-05-03 21:17:16.587 INFORMATION: [152] org.jitsi.jigasi.SipGatewaySession.handleCallState().1312 [ctx=15885334336111396714603] SIP call format used: rtpmap:0 PCMU/8000
2020-05-03 21:17:16.600 INFORMATION: [152] org.jitsi.jigasi.SipGatewaySession.peerStateChanged().1384 [ctx=15885334336111396714603] SIP peer state: Connected
2020-05-03 21:17:16.602 INFORMATION: [152] service.protocol.media.CallPeerMediaHandler.start().1961 Starting
2020-05-03 21:17:17.044 INFORMATION: [134] org.jitsi.jigasi.JvbConference.callStateChanged().1160 [ctx=15885334336111396714603] JVB conference call IN_PROGRESS.
2020-05-03 21:17:17.096 SCHWERWIEGEND: [201] net.sf.fmj.media.Log.error()   Unable to handle format: LINEAR, 48000.0 Hz, 16-bit, Mono, LittleEndian, Signed
2020-05-03 21:17:17.097 SCHWERWIEGEND: [201] net.sf.fmj.media.Log.error() Failed to prefetch: net.sf.fmj.media.ProcessEngine@738350f
2020-05-03 21:17:17.114 INFORMATION: [152] service.protocol.media.TransportManager.sendHolePunchPacket().552 Send NAT hole punch packets
2020-05-03 21:17:17.115 SCHWERWIEGEND: [200] net.sf.fmj.media.Log.error() Error: Unable to prefetch net.sf.fmj.media.ProcessEngine@738350f

2020-05-03 21:17:18.674 INFORMATION: [220] org.jitsi.jigasi.SipGatewaySession.handleCallState().1318 [ctx=15885334336111396714603] SIP call ended: CallPeerChangeEvent: type=CallPeerStatusChange oldV=net.java.sip.communicator.service.protocol.CallPeerState:Connected newV=net.java.sip.communicator.service.protocol.CallPeerState:Disconnected for peer=anonymous <anonymous@local-ip>;status=Disconnected
2020-05-03 21:17:18.676 INFORMATION: [220] org.jitsi.jigasi.SipGatewaySession.peerStateChanged().1384 [ctx=15885334336111396714603] SIP peer state: Disconnected
2020-05-03 21:17:23.676 INFORMATION: [221] org.jitsi.jigasi.SipGatewaySession.sipCallEnded().585 [ctx=15885334336111396714603] Sip call ended: Call: id=1588533433609473143113 peers=0
2020-05-03 21:17:23.679 INFORMATION: [221] org.jitsi.jigasi.JvbConference.memberPresenceChanged().964 [ctx=15885334336111396714603] Member left : OWNER focus@auth.domain/focus2166204994434475
2020-05-03 21:17:23.679 INFORMATION: [221] org.jitsi.jigasi.JvbConference.memberPresenceChanged().972 [ctx=15885334336111396714603] Focus left! - stopping
2020-05-03 21:17:23.680 SCHWERWIEGEND: [221] org.jitsi.jigasi.JvbConference.stop().483 [ctx=15885334336111396714603] Already stopped !
2020-05-03 21:17:23.680 INFORMATION: [221] org.jitsi.jigasi.JvbConference.memberPresenceChanged().964 [ctx=15885334336111396714603] Member left : OWNER c8e8ef16-6c0e-47dd-9c35-3a6956bd7529@guest.domain/1518ddae-d08d-4c0f-abc2-e9bc226b29112020-05-03 21:17:23.680 INFORMATION: [221] org.jitsi.jigasi.JvbConference.memberPresenceChanged().964 [ctx=15885334336111396714603] Member left : OWNER jigasi@auth.domain
2020-05-03 21:17:23.685 INFORMATION: [221] org.jitsi.jigasi.AbstractGateway.notifyCallEnded().128 [ctx=15885334336111396714603] Removed session for call. Sessions:0
2020-05-03 21:17:23.703 SCHWERWIEGEND: [139] org.jitsi.impl.neomedia.RTPConnectorOutputStream.log() Failed to send a packet to target /192.168.178.67:9990:java.io.IOException: No active socket.
2020-05-03 21:17:23.704 SCHWERWIEGEND: [223] org.jitsi.impl.neomedia.RTPConnectorOutputStream.log() Failed to send a packet to target /192.168.178.67:9990:java.io.IOException: No active socket.
2020-05-03 21:17:23.720 INFORMATION: [223] impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.registrationStateChanged().134 Jingle : OFF
2020-05-03 21:17:23.724 INFORMATION: [223] org.jitsi.jigasi.CallManager$HangupCallThread.run().597 [ctx=15885334336111396714603] Removing account Jabber:262ebe94@domain/262ebe94
2020-05-03 21:17:23.724 INFORMATION: [223] impl.protocol.jabber.OperationSetBasicTelephonyJabberImpl.registrationStateChanged().134 Jingle : OFF

I feel like running from one error to another xD

The Serious warning about rtp is normal after a caller disconnects:

SCHWERWIEGEND: [223] org.jitsi.impl.neomedia.RTPConnectorOutputStream.log() Failed to send a packet to target /192.168.178.67:9990:java.io.IOException: No active socket.

The issue is why does the call drop?

Seems like asterisk is able to effectively get the call over to Jigasi, but something is preventing continued packet exchange. I’d normally say RTP NAT issue, but I believe you’re running jitsi/freepbx on the same server.

Try 2 tests:

1st - no SIP header.

  • Paste the below into your extensions_custom.conf on FreePBX (replace 888 with your jitsi extension)
  • from a SIP phone, dial 4321
  • This should send you to the default room (siptest)

If this works without headers, there’s probably a header issue.

[from-internal]
exten => _4321,1,Dial(SIP/888,30)
exten => _4321,n,Hangup()

2nd - manual SIP header.

  • Paste the below into your extensions_custom.conf on FreePBX (replace 888 with your jitsi extension)
  • from a SIP phone, dial 1234
  • This should send you to a room called “test123”
[from-internal]
exten => _1234,1,SIPAddHeader(Jitsi-Conference-Room:test123)
;exten => _1234,n,SIPAddHeader(Jitsi-Conference-Room-Pass:1234)
exten => _1234,n,Dial(SIP/888,30)
exten => _1234,n,Hangup()

In both instances, make sure you have the rooms up in a web browser before dialing.

  • If the 1st test fails without headers, there’s probably a Jitsi config issue.
  • If the 1st works / 2nd fails, Jitsi probably doesn’t like the header format. Not sure what causes it, but I’ve seen some people work around it by changing the header type in jigasi to X-Room-Name and likewise in asterisk.
  • If both tests work, then I would validate the IVR setup is curling a result properly. It should be, but I’ve seen some folks obtain room names with blank spaces after the name and still allows the call through for bit.

Hi,
A little update from my side.
I could resolve the issue with the dropping of the call right after join. It seemed to be some problem of the dial plan of the extension. Besides not having the Macro app which is used after the call connects, I also removed the A command from the dial plan

So these following two commands I removed from the call plan in two parts of the script

A(/tmp/name-${rnum}))
M(Jitsi-join))

The recording is saved as .gsm file and I sometimes here the recording in the jitsi room but right after it was played, the call drops.
It might have to do something with the audio codec. I only have alaw (g711) available at my sip provider and allowed only that in my jigasi setup.

By the way: what is that whisper command in the dial plan? And what is the Macro doing?

The “Jitsi-Join” Macro waits for the call to answer, then originates playback of a tone which is injected using Chan spy via the Whisper macro. So, it’s essentially 2 macros required to inject the join tone back to the caller. you could remove M(Jitsi-join) and not use the whisper, or also swap the tone out for another recording. such as, “you are now being joined to the conference”.

But as it is working now, I can also live completly without Marco (as it is just included in build from source package if selected, as far as I know).
My question was more about if theses lines in the dial plan are essential for making asterisk joining the right room.

No, they are not essential. You could cut it all the way down to just:

exten => s,n,Dial(SIP/${Jitsi},120)

Which would be execution of dialing the Jitsi extension and seconds to ring

1 Like

HI,
i need change the welcome voice for my custom voice …is possible?