Soporte & Consultoria

Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita

jueves, 14 de octubre de 2021

flowwroute incoming IP

 flowwroute  incoming IP


147.75.60.160/28, 34.210.91.112/28, 34.226.36.32/28, 147.75.65.192/28



https://support.flowroute.com/895670-FreePBX-PJSIP-Trunk-Setup

miércoles, 13 de octubre de 2021

asternic

 

Description

Asternic CDR reports is a call detail records reporting solution for the open source Asterisk© PBX. In order to use the software you must have a working Asterisk PBX with CDR records stored in a MySQL database. Most popular distributions for Asterisk store CDR on a MySQL database by default.

Asterisk is a powerful and complex software. You won't find instructions on setting up Asterisk itself here. If you are new to Asterisk and VoIP and want to get started, an easy and quick way is to install one Asterisk based Linux distribution like Elastix, PBXinaFlash, AsteriskNow, etc. Any of these distributions will install a complete Linux system with Asterisk and a web fronted for configuring it.

Once you have Asterisk working you can install Asternic CDR Reports to get the best of breed CDR reporting available for it. Don't take our word for it. Download it and see it for yourself.


System Requirements

Asternic CDR Reports is a PHP application, encoded with Ioncube. There are certain requirements to be met in order to successfully run the software

Server Requirements

On the server side you need:

  • A web server (Apache/Nginx)
  • 32 or 64 bits Linux Operating System
  • PHP 5.2 or above
  • MySQL Server 5 or above
  • Ioncube Loader

If you have PHP 5.1 it might work, but you will have to be sure some modules are installed, like php-pecl-zip

We recommend to use PHP 5.2 or higher if you can.

Client Requirements

You access rerpots using your web browser. For a full experience you have to use a modern one:

  • Modern Web Browser (IE8 or above, Google Chrome, Safari, Firefox)
  • Javascript enabled

In order to listen to recordings directly on the browser, you must have Adobe Flash Player installed and working in your browser. Without it you won't be able to listen to call recordings, but you will be able to download them and listen directly in your Operating System.


Getting the software

You can see available downloads in http://www.asternic.net/cdrreports/download.php. Asternic CDR Reports requires an activation code, you can purchase a license to get a perpetual activation code, or you can request a 30 days trial code for testing it out before buying.

You also have the choice of installing the open source Lite version of our software. It is important to note that it is not the same software as the commercial version. Database schemas differ and installation instructions are also different. There is another installation guide for the free IssabelPBX module that you can find here.

So, log into your server and run this from your server command line:

cd /usr/src
wget http://download.asternic.net/asternic-cdr-1.1.7.tgz 

Installation

Once the download finishes, extract the package:

tar zxvf asternic-cdr-1.1.7.tgz

Then change to the newly extracted directory that contains all files:

cd asternic-cdr-1.1.7

Note

You must know beforehand the MySQL root password in order for the installation to succeed. The auxiliary tables need to be created, and you must enter that password when prompted. Otherwise, installation will be partial and non working.

And finally start the installation script:

make install

Note

If you use some trimmed down distributions, the make command might not be installed by default. In the case that the above command throws a command not found error, you will need to install the make utility and try again. (This is not needed if you do not receive any command not found errors). To install make run:

yum -y install make

The installation script will do several things:

  • Check if the software is already installed, if so it will abort and exit
  • It will install the ionCube loader for your platform and PHP version
  • It will create MySQL tables in the asteriskcdrdb database
  • It will install the web application in /var/www/html/cdrstats

Configuration

When installing on systems with popular Asterisk© configuration GUI, like Issabel, you do not need to configure anything special. It will just work. However, if you do not use any of those or you have a vanilla Asterisk setup, then you will have to enter MySQL credentials into the config file located in /var/www/html/cdrstats/config.php

define('USE_BACKEND_AUTH',true);

// This database parameters are only needed if you are not using 
// a supported configuration GUI for Asterisk. Most of them are supported.
// If any of the above systems config files is found, connections details 
// on those config files will be used instead of what you set manually here
$DBHOST="localhost";
$DBUSER="mysqluser";
$DBPASS="mysqlpassword";
$DBNAME="asteriskcdrdb";
$TABLENAME="cdr";
$DEBUG=false;

Activating the License

In order to run reports, you need a valid activation code to get your license, either a trial or purchased one. Once you have your code at hand, use your browser and go to:

http://your.web.server/cdrstats

You should be prompted for both the activation code, and a registration name. The registration name can be chosen by you and it could be your company name, customer name, etc. A legend will appear in the reports footer saying "Licensed to XXXXX" where XXXXX is the registation name you used at time of activation. That name cannot be changed in the future, so please chose wisely.

Afer entering both the activation code and registration name, click the button to acquire a license file. That's it! After a short while, you will be presented with the login form. The default user/pass to access the system is: admin/admin . You can change the password once logged by selecting the Setup/Users menu inside Asternic GUI.

Continue reading the Administrator Guide in order to configure or set preferences for your reports.


Recordings and FreePBX

Asternic CDR Reports can be configured to listen/download to recordings if they are stored in the CDR tables already. Different backends might use different ways to store that meta data. In this article we will describe the needed settings to make recordings availabe with FreePBX version 12 and up.

Log as an administrator into Asternic CDR Reports PRO by pointing your browser to http://your.server/cdrstats and select Setup / Preferences from the menu.

Once there be sure to add the following settings:

keyword: recording_field
parameter:
value: recordingfile

The above settings indicates that the filename for the recording is to be foudn on the recordingfile field on the CDR table.

keyword: recordings_path
parameter:
value: /var/spool/asterisk/monitor/%Y/%m/%d

The above setting will instruct Asternic to find the recording file over the directory /var/spool/asterisk/monitor and the YEAR / MONTH / DAY subdirectories.

Finally:

keyword: recordings_basedir
parameter:
value: /var/spool/asterisk/monitor

This one is there for security reasons, to not let downloads outside from /var/spool/asterisk/monitor to happen.

With those settings in place, you will see icons to play/download recordings if they are available on your system.

Uninstalling the Software

In case you want to remove all related files and services, asuming you installed via the make install command, follow these steps:

Remove /var/www/html/cdrstats

rm -rf /var/www/html/cdrstats

Remove tables:

mysqladmin -u root -p asteriskcdrdb 'drop table acdrchannels'
mysqladmin -u root -p asteriskcdrdb 'drop table acdrcost'
mysqladmin -u root -p asteriskcdrdb 'drop table acdrnormalisationrules'
mysqladmin -u root -p asteriskcdrdb 'drop table acdrrates'
mysqladmin -u root -p asteriskcdrdb 'drop table acdrsetup'
mysqladmin -u root -p asteriskcdrdb 'drop table acdruserchannel'
mysqladmin -u root -p asteriskcdrdb 'drop table acdruserfilter'
mysqladmin -u root -p asteriskcdrdb 'drop table acdrusers'

And that's it.




https://www.tecmint.com/install-ioncube-loader-in-centos-7/




cp ioncube_loader_lin_5.6_ts.so /usr/lib64/php/modules

viernes, 8 de octubre de 2021

SSL freepbx

 

[HOW TO] Enable Secure Web Access with Lets Encrypt

This tutorial will guide you through the steps of obtaining a Free SSL certificate via Let’s Encrypt and use that SSL certificate to secure the FreePBX web interface.

There are a couple pre-requisites that you must have:

  • You must be running FreePBX 13 or higher
  • Make sure that all module and distribution updates have been applied
  • A valid DNS “A” record that resolves to your PBX’s IP.
  • The Let’s Encrypt service running on port 80.

The DNS entry needs to be set up with the DNS provider for your domain. An example DNS record would be:

pbx1.example.com – 192.168.1.1

Next you will need to move your Admin Web Interface to a separate port, and move the Let’s Encrypt service to port 80. This is done via Admin > System Admin > Port Management and should look something like this:

Once you have that completed, we can request the SSL certificate from Let’s Encrypt. From your FreePBX admin web interface, Choose Admin, Certificate Management:

Next we will Choose “New Certificate”, “Generate Let’s Encrypt Certificate”:

Next, if you have the FreePBX firewall enabled (which we recommend) you will need to allow Let’s Encrypt and FreePBX.org access to your PBX. This only allows Let’s Encrypt and FreePBX.org access to the web URL for your PBX so they can verify that there is a web server on the IP. The do not have access to actually log into your PBX.

Click “Update Firewall” to allow the access.

Next you will need to fill in the following:

  • Host Name – This is a valid DNS entry (like pbx1.example.com)
  • Description – We suggest that you use the same name as “Host Name”.
  • Country – The country that your business is located in.
  • State/Province – The state/province your business is located in

An example screen is shown here:

Click “Generate Certificate” to submit the SSL certificate request to Let’s Encrypt. The SSL certificate should now show in your list of SSL certificates:

We can now use this SSL certificate to secure the web interface the the PBX. From the PBX admin choose Admin, System Admin. In the right hand menu, choose HTTP Setup:

Click on Settings:

Choose the SSL certificate that you created above and click ‘Install”

Your PBX now has a valid SSL certificate installed and you can access it via the https:// protocol!

jueves, 23 de septiembre de 2021

Bandwidth Requirements

 

General Requirement: 

viernes, 3 de septiembre de 2021

Asterisk webrtc configuration

 https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients





asterisk -vvvvvvvvvgc”  | grep http

https://community.asterisk.org/t/asterisk-15-https-server/72517/6


https://feeding.cloud.geek.nz/posts/using-letsencrypt-cert-with-asterisk/

--------------------channel driver= pjsip


Transport  = 0.0.0.0-wss


Enable AVPF = yes


Enable ICE Support =Yes


Enable rtcp Mux =Yes


RTP Symmetric = Yes

 

Rewrite Contact = Yes 


Force rport=  Yes 


Enable WebRTC defaults =Yes



Media Encryption  = SRTP


Allow Non-Encrypted Media (Opportunistic SRTP) = Yes



Enable DTLS= No 

Auto Generate Certificate =No


Use Certificate = default


DTLS Verify  = fingerprint


DTLS Setup = Act/Pass


DTLS Rekey Interval= 0

SIP explained

 https://datatracker.ietf.org/doc/html/rfc7329

martes, 31 de agosto de 2021

OPTION REQUEST explained




11.1 Construction of OPTIONS Request

   An OPTIONS request is constructed using the standard rules for a SIP
   request as discussed in Section 8.1.1.

   A Contact header field MAY be present in an OPTIONS.

   An Accept header field SHOULD be included to indicate the type of
   message body the UAC wishes to receive in the response.  Typically,
   this is set to a format that is used to describe the media
   capabilities of a UA, such as SDP (application/sdp).

   The response to an OPTIONS request is assumed to be scoped to the
   Request-URI in the original request.  However, only when an OPTIONS
   is sent as part of an established dialog is it guaranteed that future
   requests will be received by the server that generated the OPTIONS
   response.

   Example OPTIONS request:

      OPTIONS sip:carol@chicago.com SIP/2.0
      Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKhjhs8ass877
      Max-Forwards: 70
      To: <sip:carol@chicago.com>
      From: Alice <sip:alice@atlanta.com>;tag=1928301774
      Call-ID: a84b4c76e66710
      CSeq: 63104 OPTIONS
      Contact: <sip:alice@pc33.atlanta.com>
      Accept: application/sdp
      Content-Length: 0




Rosenberg, et. al.          Standards Track                    [Page 67]


RFC 3261            SIP: Session Initiation Protocol           June 2002


11.2 Processing of OPTIONS Request

   The response to an OPTIONS is constructed using the standard rules
   for a SIP response as discussed in Section 8.2.6.  The response code
   chosen MUST be the same that would have been chosen had the request
   been an INVITE.  That is, a 200 (OK) would be returned if the UAS is
   ready to accept a call, a 486 (Busy Here) would be returned if the
   UAS is busy, etc.  This allows an OPTIONS request to be used to
   determine the basic state of a UAS, which can be an indication of
   whether the UAS will accept an INVITE request.

   An OPTIONS request received within a dialog generates a 200 (OK)
   response that is identical to one constructed outside a dialog and
   does not have any impact on the dialog.

   This use of OPTIONS has limitations due to the differences in proxy
   handling of OPTIONS and INVITE requests.  While a forked INVITE can
   result in multiple 200 (OK) responses being returned, a forked
   OPTIONS will only result in a single 200 (OK) response, since it is
   treated by proxies using the non-INVITE handling.  See Section 16.7
   for the normative details.

   If the response to an OPTIONS is generated by a proxy server, the
   proxy returns a 200 (OK), listing the capabilities of the server.
   The response does not contain a message body.

   Allow, Accept, Accept-Encoding, Accept-Language, and Supported header
   fields SHOULD be present in a 200 (OK) response to an OPTIONS
   request.  If the response is generated by a proxy, the Allow header
   field SHOULD be omitted as it is ambiguous since a proxy is method
   agnostic.  Contact header fields MAY be present in a 200 (OK)
   response and have the same semantics as in a 3xx response.  That is,
   they may list a set of alternative names and methods of reaching the
   user.  A Warning header field MAY be present.

   A message body MAY be sent, the type of which is determined by the
   Accept header field in the OPTIONS request (application/sdp is the
   default if the Accept header field is not present).  If the types
   include one that can describe media capabilities, the UAS SHOULD
   include a body in the response for that purpose.  Details on the
   construction of such a body in the case of application/sdp are
   described in [13].









Rosenberg, et. al.          Standards Track                    [Page 68]


RFC 3261            SIP: Session Initiation Protocol           June 2002


   Example OPTIONS response generated by a UAS (corresponding to the
   request in Section 11.1):

      SIP/2.0 200 OK
      Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKhjhs8ass877
       ;received=192.0.2.4
      To: <sip:carol@chicago.com>;tag=93810874
      From: Alice <sip:alice@atlanta.com>;tag=1928301774
      Call-ID: a84b4c76e66710
      CSeq: 63104 OPTIONS
      Contact: <sip:carol@chicago.com>
      Contact: <mailto:carol@chicago.com>
      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
      Accept: application/sdp
      Accept-Encoding: gzip
      Accept-Language: en
      Supported: foo
      Content-Type: application/sdp
      Content-Length: 274

      (SDP not shown)

https://datatracker.ietf.org/doc/html/rfc3261#page-67

martes, 24 de agosto de 2021

FreePBX not sending email from GUI but command line works

 


/usr/sbin/sendmail -t


https://community.freepbx.org/t/updated-to-freepbx-13-sendmail-working-extension-emails-are-not/56731/9




viernes, 30 de julio de 2021

FreePBX changing Asterisk version

 


Saltar al final de los metadatos
Ir al inicio de los metadatos

The FreePBX Distro has some built in features to allow you to change the Major Asterisk version you are using.

For example the 6.12.65 release track supports Asterisk 1.8, 11, 12 and 13

To change which Major Asterisk release you are using type;

asterisk-version-switch

 

You will then be prompted to pick which Asterisk Version you would like to switch to

Once the switch has been completed you will be informed which Version you are running and that Asterisk is restarting.

FreePBX will then perform a reload and re-write all the configuration files based on the version of Asterisk you switch to.

You can verify the running version of Asterisk at the bash prompt with:

#  asterisk -x "core show version"
Asterisk 13.9.1 built by mockbuild @ jenkins2.schmoozecom.net on a x86_64 running Linux on 2016-05-13 20:33:39 UTC

If the old Asterisk version is still shown, you can restart with:

fwconsole restart

The final step is to reload the system dial plan:

fwconsole reload

viernes, 23 de julio de 2021

block calls based on a blacklist file

 exten => _X.,1,NoOp(${CALLERID(num)}-${EXTEN})

same=>n,Set(BAN=${SHELL(cat /home/centos/spam.conf  | grep -w -F ${CALLERID(num)} | wc -l)})

same=>n,ExecIf($[${BAN}>0]?hangup())

same=>n,Noop(***${BAN}***)




*content of  /home/centos/spam.conf **

188222
22222
33333

lunes, 28 de junio de 2021

FreePBX yumwrapper error

 I encountered the same thing after automatic module upgrades. I had two files located in: /dev/shm/yumwrapper/ I deleted those two files and things were happy again.

I don’t mean to offend, but I don’t know your level of Linux skill. Maybe this will help:
After logging into the server’s console (command line) enter the following two commands:

cd /dev/shm/yumwrapper/

(This will “change directory” into the directory noted in the error message.)

ls  

(That’s a lowercase letter L and this command will list any files in this directory.)

If there are any files listed, you need to delete them using the rm (remove) command. You could enter:

rm *

fwconsole restart

viernes, 18 de junio de 2021

fix asterisk libasteriskssl.so.1 error

locate files


ldd /usr/sbin/asterisk


then copy then 

 cp /usr/lib64/libasteriskpj.so.2  /lib/x86_64-linux-gnu/


cp /lib/x86_64-linux-gnu/libasteriskssl.so.1 /lib/x86_64-linux-gnu/


ldconfig


reboot

lunes, 19 de abril de 2021

Asterisk Privacy: id header

 


[from-internal-custom]

exten=>_+9./101,1,Noop(*******************************************)

same=>n,SIPAddHeader(Privacy: id)

same=>n,goto(from-internal,+${EXTEN:2},1)

same=>n,hangup()

CALLERID

jueves, 4 de marzo de 2021

asterisk incrementing

[audio-admin]

  exten=>_x.,1,Answer()

  same=>n,Noop( ******* ${DB(test/count)} ***)

  same=>n,GotoIf($[${DB(test/count)} >4]?del)

  same=>n,GotoIf($[${DB(test/count)} >0]?inc)

  same =>n,Set(DB(test/count)=1)

  same=>n,Set(COUNT=${DB(test/count)})

  same => n,SayNumber(${COUNT})

  same=>n,hangup()


 same => n(inc),Set(DB(test/count)=$[${DB(test/count)} + 1])

   same=>n,Set(COUNT=${DB(test/count)})

  same => n,SayNumber(${COUNT})

      same=>n,hangup()



same=>n(del),Set(del=${DB_DELETE(test/count)})

same=>n,playback(im-sorry)

same=>n,hangup()



lunes, 15 de febrero de 2021

Comedia - SIP:Connection-Oriented Media (Comedia)

 

In Asterisk:

Comedia mode means that Asterisk will ignore the IP and port in the received SDP from the peer and will wait for incoming RTP. This RTP should arrive to the port that Asterisk replied in the "200 OK" SDP. After that, Asterisk already knows where to send its RTP.
This makes communication possible with UA's behind NAT which don't solve NAT problem in client side (STUN, ICE, ALG enabled router, etc). This option works properly in conjunction with qualify=yes option in order to keep open the connection from Asterisk to the peer behind NAT.

Cisco Comedia Enhancements:

The Connection-Oriented Media (Comedia) Enhancements for SIP feature allows the gateway to check the media source of incoming Real-time Transport Protocol (RTP) packets and allows the endpoint to advertise its presence inside or outside. of Network Address Translation (NAT). Using this feature enables symmetric NAT traversal by supporting the capability. to modify and update an existing RTP session remote address and port.


https://www.comediacommunications.com/comedia.mhtml

miércoles, 27 de enero de 2021

select and update FreePBX extension sip password

 mysql  -e "select id,data from sip where keyword='secret' or keyword='callerid' group by data order by id;" asterisk 


mysql  -e "select id,data from sip where keyword='secret' and id=100  group by data order by id;" asterisk 



mysql  -e "update  sip set data='Ambiorix13' where id=100 and keyword='secret';" asterisk 


reload the  config after apply the change

fwconsole reload