[jitsi-dev] IVR/Dial-In setup

Hello all,

First and foremost, I'm new to this mailing list so if I am breaching some kind of etiquette or something by sending this out, please correct me, and thanks in advance for any assistance.

I'm having an issue I am hoping to get some assistance with, and everything I've seen in issue links has suggested asking the mailing list first.

I've implemented my own Jitsi Meet server using the Quick-Install guide, also installed Jigasi, and was attempting to replicate the "call-in numbers" feature on the meet.jit.si demo site.
This led me to this issue: https://github.com/jitsi/jigasi/issues/81

In it, it is mentioned that using the Jitsi implementation of the conferenceMapper api endpoint is fine, but that we'll need to create our own IVR and implementation of phoneNumberList.

I have confirmed that you can feed the conferenceMapper api endpoint a URL for any room on any server [even ones that don't technically exist] and it will spit out an ID.
For example, https://jitsi-api.jitsi.net/conferenceMapper?conference=testroom@meet.contoso.com

I manage my FreePBX server, and I can create an IVR to do what I need. I have phone numbers, but what I'm unsure of is what I actually need to configure my IVR to do, and at what point [ivr, jitsi meet server, etc] the mapping between ID and conference name is done.

[as a side note, it seems like my UI isn't changing like it should when I add features. For example when I installed Jigasi, I confirmed that it can make sip calls but the 'phone button' that was supposed to appear in the toolbar on a reload never did appear. I suspect that once I solve the above issue this problem will still cause me an issue actually displaying the phone numbers when I click the info button, but I'll cross that bridge when I come to it]

Thanks all,

~Mike

Hi,

Hello all,

First and foremost, I’m new to this mailing list so if I am breaching some
kind of etiquette or something by sending this out, please correct me, and
thanks in advance for any assistance.

I’m having an issue I am hoping to get some assistance with, and everything
I’ve seen in issue links has suggested asking the mailing list first.

I’ve implemented my own Jitsi Meet server using the Quick-Install guide,
also installed Jigasi, and was attempting to replicate the “call-in numbers”
feature on the meet.jit.si demo site.

This led me to this issue: https://github.com/jitsi/jigasi/issues/81

In it, it is mentioned that using the Jitsi implementation of the
conferenceMapper api endpoint is fine, but that we’ll need to create our own
IVR and implementation of phoneNumberList.

I have confirmed that you can feed the conferenceMapper api endpoint a URL
for any room on any server [even ones that don’t technically exist] and it
will spit out an ID.
For example,
https://jitsi-api.jitsi.net/conferenceMapper?conference=testroom@meet.contoso.com

I manage my FreePBX server, and I can create an IVR to do what I need. I
have phone numbers, but what I’m unsure of is what I actually need to
configure my IVR to do, and at what point [ivr, jitsi meet server, etc] the
mapping between ID and conference name is done.

What you need is to create IVR that asks the user to enter conference
pin, then take that pin and query the conference mapper
(mapper-address/conferenceMapper?cid=user_entered_conference_pin).
Extract the conference address (jid) from the response and pass is as
Jitsi-Conference-Room sip header when calling the jigasi user. This
way the user doing the inbound call will be connected through jigasi
to the right conference.
You can call meet.jit.si numbers to check that IVR.

[as a side note, it seems like my UI isn’t changing like it should when I
add features. For example when I installed Jigasi, I confirmed that it can
make sip calls but the ‘phone button’ that was supposed to appear in the
toolbar on a reload never did appear. I suspect that once I solve the above
issue this problem will still cause me an issue actually displaying the
phone numbers when I click the info button, but I’ll cross that bridge when
I come to it]

Hum, this means that jicofo doesn't detect the jigasi instance ... Do
you have modifications to the interface_config.js?

Hope this helps.

Regards
damencho

···

On Mon, Mar 5, 2018 at 1:13 PM, Michael Stanley <mstanley@vectorform.com> wrote:

Thanks all,

~Mike

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

Thank you for the assistance.

I was able to get this working, just tying up some loose ends now.

More details on my setup can be shared if anybody wants them.

~Mike

···

-----Original Message-----
From: dev [mailto:dev-bounces@jitsi.org] On Behalf Of Damian Minkov
Sent: Tuesday, March 6, 2018 10:36 AM
To: Jitsi Developers <dev@jitsi.org>
Subject: Re: [jitsi-dev] IVR/Dial-In setup

Hi,

On Mon, Mar 5, 2018 at 1:13 PM, Michael Stanley <mstanley@vectorform.com> wrote:

Hello all,

First and foremost, I’m new to this mailing list so if I am breaching
some kind of etiquette or something by sending this out, please
correct me, and thanks in advance for any assistance.

I’m having an issue I am hoping to get some assistance with, and
everything I’ve seen in issue links has suggested asking the mailing list first.

I’ve implemented my own Jitsi Meet server using the Quick-Install
guide, also installed Jigasi, and was attempting to replicate the “call-in numbers”
feature on the meet.jit.si demo site.

This led me to this issue: https://github.com/jitsi/jigasi/issues/81

In it, it is mentioned that using the Jitsi implementation of the
conferenceMapper api endpoint is fine, but that we’ll need to create
our own IVR and implementation of phoneNumberList.

I have confirmed that you can feed the conferenceMapper api endpoint a
URL for any room on any server [even ones that don’t technically
exist] and it will spit out an ID.
For example,
https://jitsi-api.jitsi.net/conferenceMapper?conference=testroom@meet.
contoso.com

I manage my FreePBX server, and I can create an IVR to do what I need.
I have phone numbers, but what I’m unsure of is what I actually need
to configure my IVR to do, and at what point [ivr, jitsi meet server,
etc] the mapping between ID and conference name is done.

What you need is to create IVR that asks the user to enter conference pin, then take that pin and query the conference mapper (mapper-address/conferenceMapper?cid=user_entered_conference_pin).
Extract the conference address (jid) from the response and pass is as Jitsi-Conference-Room sip header when calling the jigasi user. This way the user doing the inbound call will be connected through jigasi to the right conference.
You can call meet.jit.si numbers to check that IVR.

[as a side note, it seems like my UI isn’t changing like it should
when I add features. For example when I installed Jigasi, I confirmed
that it can make sip calls but the ‘phone button’ that was supposed to
appear in the toolbar on a reload never did appear. I suspect that
once I solve the above issue this problem will still cause me an issue
actually displaying the phone numbers when I click the info button,
but I’ll cross that bridge when I come to it]

Hum, this means that jicofo doesn't detect the jigasi instance ... Do you have modifications to the interface_config.js?

Hope this helps.

Regards
damencho

Thanks all,

~Mike

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

Michael_Stanley I am attempting the very same thing right now… any and all of your thoughts or assistance is welcome and appreciated

OK, Thought I’d share my setup… maybe it’ll help someone else?

on the asterisk server I created this /var/lib/asterisk/agi-bin/jitsi_curling.sh

    #!/bin/bash
 
jit_rm=$(curl --silent https://jitsi-api.jitsi.net/conferenceMapper?id=$1 | cut -d \, -f 3 | cut -d \: -f 2 | cut -d \" -f 2 | cut -d \@ -f 1)
echo "SET VARIABLE JITSI \"${jit_rm}\" "

and then in /etc/asterisk/extensions_override_freepbx.conf

[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)

I used Extension 6338(meet) as my conference bridge number.
The IVR menu could be optimized but this works for me so far.
thanks for all the help guys, I hope this is useful… if not or if it’s inaccurate feel free to remove it.

I’m starting down this road, and I’m having a difficult time finding all the documentation I need. Would you mind sharing any documentation you have on how you accomplished this? Thanks in advance!

Hi Michael - wondering if you can share your setup for freepbx

Hi! i did not understand why you set the “jit_rm” variable if you do not use it in the script of the ivr.

Care to explain?

Thank you!

I had to add cut -d \} -f 1 to your script because otherwise it would return false} instead of false resulting in the GotoIf to fail.

Since I use PJSIP my configuration looks quite different. I’ve put everything together here: Working configuration for Jitsi/Jigasi with Asterisk/SIP

@Claudio_Miklos jit_rm is only used to set JITSI with SET VARIABLE...

I would ditch the script , dial plan is fully capable of handling curl.

Assuming ${confid} would be the pin…

  • Option 1 - call curl via Asterisk Shell command. (In action here: Asterisk IVR)
;system CURL Jitsi API with meeting pin & retrieve meeting name as the result 
exten => s,n,Set(CURL_RESULT=${SHELL(curl --silent https://jitsi-api.jitsi.net/conferenceMapper?id=${confid} | sed -e 's/.*"conference":"\(.*\)@.*/\1/')})
exten => s,n,Verbose(0, ${CURL_RESULT});
  • Option 2 - Stay within Asterisk (no Shell usage)
;Asterisk CURL Jitsi API with meeting pin & retrieve meeting name as the result 
exten => s,n,Set(CURL_RESULT=$["${REPLACE(CURL(https://jitsi-api.jitsi.net/conferenceMapper?id=${confid}),\",')}"=~"'conference':'(.*)@"]) 
exten => s,n,Verbose(0, ${CURL_RESULT});

I’m new to both jitsi and asterisk. follow this guide. When I type the PIN and I got “That’s not a valid conference number, please try again.” But I see that the number in “User entered” is correct. I wonder if the PIN variable is correct or not.

And this is my asterisk log.
I would be grateful if someone can help. Thanks

[2020-05-21 15:20:44] VERBOSE[5948][C-00000001] app_read.c: User entered ‘3904115425’
[2020-05-21 15:20:44] VERBOSE[5948][C-00000001] pbx.c: Executing [200@from-internal:4] Verbose(“SIP/201-00000000”, “esult is:{Pin}”) in new stack
[2020-05-21 15:20:44] VERBOSE[5948][C-00000001] app_verbose.c: result is:{Pin}
[2020-05-21 15:20:44] VERBOSE[5948][C-00000001] pbx.c: Executing [200@from-internal:5] SayDigits(“SIP/201-00000000”,"{Pin}") in new stack
[2020-05-21 15:20:44] VERBOSE[5948][C-00000001] pbx.c: Executing [200@from-internal:6] AGI(“SIP/201-00000000”, “jits_curling.sh,{Pin}”) in new stack
[2020-05-21 15:20:44] VERBOSE[5948][C-00000001] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/jitsi_curlig.sh
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] res_agi.c: <SIP/201-00000000>AGI Script jitsi_curling.sh completed, eturning 0
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] pbx.c: Executing [200@from-internal:7] Verbose(“SIP/201-00000000”, “esult is: {JITSI}”) in new stack
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] app_verbose.c: result is: {JITSI}
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] pbx.c: Executing [200@from-internal:8] GotoIf(“SIP/201-00000000”, “[{JITSI}” = “false}”]?invalidnum:joinmeeting") in new stack
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] pbx_builtins.c: Goto (from-internal,200,9)
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] pbx.c: Executing [200@from-internal:9] Playback(“SIP/201-00000000”, conf-invalid") in new stack
[2020-05-21 15:20:45] VERBOSE[5948][C-00000001] file.c: <SIP/201-00000000> Playing ‘conf-invalid.gsm’ (language ‘en’

Hi @HarryQuach ,
Looking at the dial plan shared in the thread above, which has you edit override_freepbx.conf , I see several issues. Maybe it’s working in some obscure cases with modified configurations.

However…

  • You should not be writing directly to extensions_override_freepbx.conf (FreePBX even warns not to do this)
  • Custom dial plans are to be placed in extensions_custom.conf
  • Variables are not in the correct syntax , they should be ${VARIABLE} , not {VARIABLE}

My initial glance at this says there’s no way the dial plan should be functioning, but there’s probably other dependencies/modifications or maybe even older software versions that are somehow making this work for the original user.

If you’re set on making this work - fix the variables, place the dial plan in extensions_custom.conf , and make this a destination for your routes. If you’re not exactly invested in this, try: FreePBX Jitsi IVR

Thanks @Craig_Eustice for replying to both of my posts. I’m using this method because I think it’s easier. I’m not sure is there any difference between Issabel and FreePBX cause I’m using Issabel and configuring it for internal use.

I’ve changed the variables and also moved configuration to extensions_custom.conf but it didn’t work. Now I move it back to extensions_overide_issabelpbx.conf. Thanks to your advice about variables, I figure out somethins’s wrong with the GoToIf. It doesn’t work as expected.

I believe that line should be as follows

exten => 6338,n,GotoIf($["${JITSI}" = "false"]?invalidnum:joinmeeting)

I changed it to this and now it works. Thanks for your help.

exten => 200,n,GotoIf(["{JITSI}" = “false”]?invalidnum:joinmeeting)