InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
494 stars 244 forks source link

Can not find module #196

Open beatific-angel opened 2 years ago

beatific-angel commented 2 years ago

image

so I tried. but I can see error image

I think this is for arm chip. so I think it doesnt need in the centos for vps am i right?

InnovateAsterisk commented 2 years ago

Correct, Asterisk don’t (last time I checked) compile the opus codec in arm. So leave these steps out, and just select it in the make menuselect screen.

beatific-angel commented 2 years ago

Thank you Conrad!

image

I think this is same. so I removed this too.

and then I changed sip.conf and pjsip.conf as you mentioned. but while run asterisk command -- asterisk -r image

image

I can see many warning messages. I can not run the webrtc phone.

I want chat with you in private way. please help me

InnovateAsterisk commented 2 years ago

You will need to post your issues to this forum, unfortunately I cant offer personal support. This is a free and open source solution, so if you are having issues, others may be too - and your steps and solutions that you come up with here may help others.

beatific-angel commented 2 years ago

I understand. currently, I gonna develop a custom webrtc sip phone for my VOIP system with your solution. But yet this solution doesn't work on centos (FreePBX work). Could you help me?

If not, can you please help me to make this solution work for my platform?

InnovateAsterisk commented 2 years ago

Either way, yes, you need the solution to work on your stack, so whats not working?

It wouldn't make sense for me to make a custom sip phone for you, as I have already made a very customisable one here. It would only make sense for me to make this phone more and more flexible to suite your and any needs... I do this already for free. or coffee ;-)

so, send me whats not working? whats step are you stuck at?

beatific-angel commented 2 years ago

Thanks. so Currently I followed your steps. I will explain firstly. image

This step is for Raspberry Pi. I think It doesn't need. So I skipped this part.

And then I skipped Samba part too. I think this too. Am i right?

And then I have root permission for Linux system. so I can not find other dir in the /home. so about Cert part, I created on the /home.

Am I right? Firstly About this, please Confirm And then I will explain continually.

InnovateAsterisk commented 2 years ago

This step is for Raspberry Pi. I think It doesn't need. So I skipped this part.

Correct

And then I skipped Samba part too. I think this too. Am i right?

Correct, if its hosted, then it may be better to access the file system via ssh or FileZilla

And then I have root permission for Linux system. so I can not find other dir in the /home. so about Cert part, I created on the /home.

That's fine. If you are logged in as root, then you don't need to execute the su commands or prepend the sudo

Am I right? Firstly About this, please Confirm And then I will explain continually.

What VPS service are you using - they often come with SSL certificates for you to use?

beatific-angel commented 2 years ago

current I am using vps. I login vps with ssh. I installed centos and freepbx on the vps.

so I have to use ssh cert or have to create? currently I created as you mentioned.

InnovateAsterisk commented 2 years ago

Ok, we can come back to that.

Are you in control of a domain that can point DNS records to the VPS server?

Is Asterisk Installed? If so what is the result of: $ sudo asterisk -r and then in the Asterisk CLI: CLI> http show status and CLI> pjsip show endpoints

beatific-angel commented 2 years ago

Currently I am using IP address. The Ip address is 195.2.67.189

And then The result of "asterisk -r" is this. image

And then The result of "https show status" is this. image

And then The result of "pjsip show endpoints" image

InnovateAsterisk commented 2 years ago

I would use PJSIP, make sure you cover the steps on PJSIP, so you can disable chan_sip. https://github.com/InnovateAsterisk/Browser-Phone#chan_sip-or-chan_pjsip

Go down to the PJSIP part. You cannot continue until you have:

*CLI> pjsip show endpoints

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================
InnovateAsterisk commented 2 years ago

You should restart all of asterisk after the module changes. CLI> core restart now or $ sudo service asterisk restart

beatific-angel commented 2 years ago

I see. currently I tried as you mentioned about pjsip. but I can see warning messages.

Firstly please see this pjsip.conf

image

in here, we can see pjsip_custom.conf so I added the context into custom.conf image

image

and I followed as you mentioned.

but plz see image

InnovateAsterisk commented 2 years ago

The problem is you are trying to mix my "pure asterisk" configurations with FreePBX configurations. This generally doesn't work well, you must either use the exact config in the video or use FreePBX, I think you will struggle to mix both. Based on the fact that you already have FreePBX, i would continue with that - there are loads on how-to articles on how to get a webrtc endpoint/extension setup.

The reason you are struggling with this, and probably the reason why the PJSIP options are not appearing in FreePBX, is because the res_pjsip.so files are not install. You must go back to the beginning and make sure that you have the following commands installed:

(This is for Asterisk 18... but you can choose)

$ sudo service asterisk stop
$ cd ~
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
$ tar -xvf asterisk-18[tab]
$ cd asterisk-18[tab]
$ sudo su
(The next few commands are done as super suder)
# contrib/scripts/install_prereq install
# apt-get install xmlstarlet libopus-dev libopusfile-dev
# ./configure --with-pjproject-bundled
# make menuselect
(make sure you select codec_opus, then Save & Exit)
# make && make install && make config
# exit
$ sudo service asterisk start
beatific-angel commented 2 years ago

but this is for asterisk 18 I have to use asterisk 16. because freepbx should be work with asterisk 16

InnovateAsterisk commented 2 years ago

change the 18 to a 16

$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz
$ tar -xvf asterisk-16[tab]
$ cd asterisk-16[tab]
beatific-angel commented 2 years ago

okay. I will try again. image

reinstalled and make but same result image

InnovateAsterisk commented 2 years ago

Centos doesn't use the shorted "-dev" notation, it would probably libopus-devel.

But it really doesn't mater, the main problem is that the pjproject is not installing. I just did a quick google, and I see on Centos you need to build the pj project separately. https://unixcop.com/how-to-install-asterisk-18-on-centos-8/ or https://techviewleo.com/install-asterisk-18-lts-on-centos-linux/ or https://computingforgeeks.com/how-to-install-asterisk-16-centos-7-linux/

beatific-angel commented 2 years ago

I downloaded the pj project and compiled. but the result is same 'No such module res_pjsip.so' :(

InnovateAsterisk commented 2 years ago

What versions of CentOS are you using?

beatific-angel commented 2 years ago

CentOs 8

InnovateAsterisk commented 2 years ago

Busy booting a VPS now

beatific-angel commented 2 years ago

so you are trying now on the centos?

InnovateAsterisk commented 2 years ago

Yes, at Google Cloud Platform

beatific-angel commented 2 years ago

I will try on centos 7 too. will downgrade.

InnovateAsterisk commented 2 years ago

Asterisk 16 with PJSIP on CentOS 8 via Google Cloud Platform: SSL via Certbot

image

InnovateAsterisk commented 2 years ago

I have noted the steps, and will do a video - there are a few people looking to achieve the same

beatific-angel commented 2 years ago

hi so it works now? Could you provide the guide to me?

InnovateAsterisk commented 2 years ago

This was from a fresh install off GCP:

$ sudo yum update -y
$ sudo yum install wget nano net-tools

$ sudo nano /etc/selinux/config
SELINUX=disabled
$ sudo setenforce 0

$ sudo yum install epel-release
$ sudo yum groupinstall "Development Tools"

$ sudo dnf install dnf-plugins-core
$ sudo dnf upgrade
$ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ sudo dnf config-manager --set-enabled powertools
-- Test must have PowerTools --
$ sudo dnf repolist

$ cd ~
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz
$ tar -xvf asterisk-16[tab]
$ cd asterisk-16.[tab]

$ sudo su

# contrib/scripts/install_prereq install
# ./configure --with-pjproject-bundled
# make menuselect
-- Check Codec Opus, and any other config changes you want --
# make && make install && make config
# exit

Note: at this point Asterisk cant boot yet, because there are no config files, you can grab a copy of a set from one of my git projects:

$ cd ~
$ git clone https://github.com/InnovateAsterisk/S2E1.git
$ sudo cp ~/S2E1/config/* /etc/asterisk

Now start/restart asterisk, and check that the PJSIP modules are loaded.

beatific-angel commented 2 years ago

"" there are no config files, you can grab a copy of a set from one of my git projects"" which is your git project? what do I have to copy config files? please tell me the location :)

beatific-angel commented 2 years ago

And then I have another important problem. how can save the call history and contact lists (phone numbers) etc? where is the location???

InnovateAsterisk commented 2 years ago

If it is a fresh install of CentOS, the /etc/asterisk/ folder is empty at that point (after it builds).

which is your git project?

This one: https://github.com/InnovateAsterisk/S2E1

what do I have to copy config files?

$ git clone https://github.com/InnovateAsterisk/S2E1.git $ sudo cp ~/S2E1/config/* /etc/asterisk

please tell me the location :)

When you clone it, it is downloaded to the folder you are in, when you issue the cp command to copies to /etc/asterisk/

beatific-angel commented 2 years ago

I have done I can see this error image

InnovateAsterisk commented 2 years ago

how can save the call history and contact lists (phone numbers) etc? where is the location???

There are two long term storage location available to Modern Browsers, they can both be found in the Developer Tools > Application tab. Look for Local Storage and IndexDB. They are not in a very human readable format, it's meant only for the software to use. If you want to upload or export or otherwise use this data, it's completely up to you to develop.

Soon I will be launching a commercial version of this software with a Hosted Cloud Storage component for access to all these features and much more, including mobile apps etc. You can add yourself to the mailing list here: https://www.siperb.com/

InnovateAsterisk commented 2 years ago

Ya, don't worry about that error, it's complaining that the pjsip_wizard.conf file is missing, you can ignore that, its not used. Otherwise add it, or prevent the pjsip_wizard module from loading with the modules.conf

beatific-angel commented 2 years ago

how can save the call history and contact lists (phone numbers) etc? where is the location???

There are two long term storage location available to Modern Browsers, they can both be found in the Developer Tools > Application tab. Look for Local Storage and IndexDB. They are not in a very human readable format, it's meant only for the software to use. If you want to upload or export or otherwise use this data, it's completely up to you to develop.

Soon I will be launching a commercial version of this software with a Hosted Cloud Storage component for access to all these features and much more, including mobile apps etc. You can add yourself to the mailing list here: https://www.siperb.com/

have done.

beatific-angel commented 2 years ago

but to integrate with freepbx, I think I have to save the data to freepbx or seperate db or asterisk db. how is your think?

beatific-angel commented 2 years ago

goal is integration with freepbx and webrtc phone

InnovateAsterisk commented 2 years ago

Well, you can look at it this way. The idea for this project was for it to completely replace a desktop phone, like Yealink/Snom/etc etc, and provide much more security and functionality.

Up until now we have largely managed with the CDRs generated in Asterisk, and we just trust that our Yealink phones are doing what they need to at the end point. So you could continue to do so, and just review the CDRs from Asterisk & FreePBX. Asterisk even does the call recoding for you... so that also works, and sounds like this is what would suit you.

You can now install FreePBX, but it will probably replace the existing configs etc. NOTE: I don't know FreePBX at all. Please follow a guide on how to do this. At this point you have a fully working Asterisk PBX, what you want to install is FreePBX over your existing installation of Asterisk.

beatific-angel commented 2 years ago

I see. after trying again in the centos and if have any problems, I will let you know.

beatific-angel commented 2 years ago

so you made video?

beatific-angel commented 2 years ago

as your new guide, I did image

then what do I have to do for the browser phone? I gonna follow from a step of browser phone git downloading. then I have to skip this or not? image

and then I have to do this again? image

beatific-angel commented 2 years ago

I have to create cert again?

InnovateAsterisk commented 2 years ago

If you have access to a domain that you are in control of, and you can create a DNS entry like asterisk-webrtc-1.my-controlled-domain.com then you can get certbot to generate and maintain a LE certificate.

If not, you would have to use a self-signed certificate, but this wouldn't be a great large scale, because you would have to distribute the CA certificate to all the client devices. (This is best for a small controlled audience)

beatific-angel commented 2 years ago

where is sms module? sms module implemented? With Browser phone, I can do sms too?