Project

General

Profile

Problem with logging into dialer

Added by Pawel Duda over 4 years ago

Here is log from asterisk when I try to login into dialer:

    -- Called 99998585510911@default
    -- Executing [99998585510911@default:1] Dial("Local/99998585510911@default-00000000;2", "SIP/8585510911@kamailio,,tTo") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/8585510911@kamailio
[Nov  6 10:52:04] NOTICE[29358][C-00000000]: chan_sip.c:23990 handle_response_invite: Failed to authenticate on INVITE to '"S1911061052048600051" <sip:1464536321@My server IP:5070>;tag=as33e9f500'
    -- SIP/kamailio-00000000 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [99998585510911@default:2] Hangup("Local/99998585510911@default-00000000;2", "") in new stack
  == Spawn extension (default, 99998585510911, 2) exited non-zero on 'Local/99998585510911@default-00000000;2'
    -- Executing [h@default:1] AGI("Local/99998585510911@default-00000000;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----21-----CONGESTION---------------SIP 407 Proxy Authentication Required)") in new stack
  == Manager 'listencron' logged on from 127.0.0.1
    -- <Local/99998585510911@default-00000000;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----21-----CONGESTION---------------SIP 407 Proxy Authentication Required) completed, returning 0

sip show peers:

Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description
USERNAME               IP                              Yes        Yes         A  5060     OK (3 ms)
USERNAME             IP                              Yes        Yes            5060     OK (17 ms)
kamailio                  MY SERVER IP                               Yes        Yes            5060     OK (1 ms)

sip show registry:

Host                                    dnsmgr Username       Refresh State                Reg.Time
sip host:5060                        Y      my username        105 Registered           Wed, 06 Nov 2019 11:00:06


Replies (23)

RE: Problem with logging into dialer - Added by Levy Ryan Nolasco over 4 years ago

Hi,

Please post the output of the following.

1. /var/www/html/php/Config.php
2. /var/www/html/php/goCRMAPISettings.php
3. /etc/kamailio/kamailio.cfg

*You should see something like*
#!substdef "!MY_IP_ADDR!192.168.22.9!g" 
#!substdef "!MY_DOMAIN!vaglxc01.goautodial.com!g" 

/* add local domain aliases */
alias="192.168.22.9" 
alias="vaglxc01.goautodial.com" 

/* uncomment and configure the following line if you want Kamailio to
   bind on a specific interface/port/proto (default bind on all available) */
listen=udp:127.0.0.1:5060
listen=udp:192.168.22.9:5060

# ----- rtpengine params -----
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:5066")
modparam("rtpengine", "rtpengine_disable_tout", 20)
#modparam("rtpengine", "db_url", DBURL)

4. /etc/rtpengine/rtpengine.conf

5. /etc/asterisk/sip-goautodial.conf

RE: Problem with logging into dialer - Added by Jackie Alfonso over 4 years ago

Hi,

May we know if are you using SSL Certificate? or does the SSL Certificate is installed on your server?

if not please change the following below.

goCRMAPISettings.php

define ('gourl', 'https://my_server_ip/goAPIv2');

/etc/kamailio/kamailio.cfg

#!substdef "!MY_IP_ADDR!MY_SERVER_IP!g"
#!substdef "!MY_DOMAIN!vaglxc01.goautodial.com!g"

/ add local domain aliases /
alias="MY_SERVER_IP"
alias="vaglxc01.goautodial.com"

/* uncomment and configure the following line if you want Kamailio to
bind on a specific interface/port/proto (default bind on all available) */
listen=udp:127.0.0.1:5060
listen=udp:MY_SERVER_IP:5060

/etc/rtpengine/rtpengine.conf

a single interface:
interface = MY_SERVER_IP
separate multiple interfaces with semicolons:
interface = internal/12.23.34.45;external/23.34.45.54
for different advertised address:
interface = 12.23.34.45!23.34.45.56
/etc/asterisk/sip-goautodial.conf

[kamailio]
;encryption=yes ;uncomment for TLS encryption
disallow=all
allow=opus
allow=ulaw
type=friend
dtmfmode=rfc2833
context=default
qualify=yes
nat=force_rport,comedia
host=vaglxc01.goautodial.com ;change me to my FQDN
insecure=port,invite

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

Yes I have SSL installed on my server

goCRMAPISettings.php

define ('gourl', 'https://I SET MY DOMAIN NAME HERE/goAPIv2');

/etc/kamailio/kamailio.cfg

#!substdef "!MY_IP_ADDR!I SET MY IP HERE!g"
#!substdef "!MY_DOMAIN!I SET MY DOMAIN NAME HERE!g"

/ add local domain aliases /
alias="I SET MY IP HERE"
alias="I SET MY DOMAIN NAME HERE"

/* uncomment and configure the following line if you want Kamailio to
bind on a specific interface/port/proto (default bind on all available) */
listen=udp:127.0.0.1:5060
listen=udp:I SET MY IP HERE:5060

/etc/rtpengine/rtpengine.conf

a single interface:
interface = I SET MY IP HERE
separate multiple interfaces with semicolons:
interface = internal/12.23.34.45;external/23.34.45.54
for different advertised address:
interface = 12.23.34.45!23.34.45.56
/etc/asterisk/sip-goautodial.conf

[kamailio]
;encryption=yes ;uncomment for TLS encryption
disallow=all
allow=opus
allow=ulaw
type=friend
dtmfmode=rfc2833
context=default
qualify=yes
nat=force_rport,comedia
host=I SET MY DOMAIN NAME HERE ;change me to my FQDN
insecure=port,invite

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

Hey, I still have this problem can someone help me?

RE: Problem with logging into dialer - Added by Levy Ryan Nolasco over 4 years ago

Hi,

Can you post your Administration > Settings > Base URL and Administration > GoWEBRTC settings.

RE: Problem with logging into dialer - Added by Wittie Manansala over 4 years ago

Hi,

Are you using Free SSL Cert like Let’s Encrypt?

Thanks

RE: Problem with logging into dialer - Added by Levy Ryan Nolasco over 4 years ago

Hi,

Can you post your /etc/httpd/conf.d/ssl.conf

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

#
# When we also provide SSL we have to listen to the 
# the HTTPS port in addition.
#
Listen 443 https

##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism 
#   to use and second the expiring timeout (in seconds).
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout  300

#   Pseudo Random Number Generator (PRNG):
#   Configure one or more sources to seed the PRNG of the 
#   SSL library. The seed data should be of good random quality.
#   WARNING! On some platforms /dev/random blocks if not enough entropy
#   is available. This means you then cannot use the /dev/random device
#   because it would lead to very long connection times (as long as
#   it requires to make more entropy available). But usually those
#   platforms additionally provide a /dev/urandom device which doesn't
#   block. So, if available, use this one instead. Read the mod_ssl User
#   Manual for more details.
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
#SSLRandomSeed startup file:/dev/random  512
#SSLRandomSeed connect file:/dev/random  512
#SSLRandomSeed connect file:/dev/urandom 512

#
# Use "SSLCryptoDevice" to enable any supported hardware
# accelerators. Use "openssl engine -v" to list supported
# engine names.  NOTE: If you enable an accelerator and the
# server does not start, consult the error logs and ensure
# your accelerator is functioning properly. 
#
SSLCryptoDevice builtin
#SSLCryptoDevice ubsec

##
## SSL Virtual Host Context
##

<VirtualHost MY SERVER IP:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot PATH TO SITE FILES
ServerName www.MY DOMAIN NAME.pl:443

# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

#   SSL Protocol support:
# List the enable protocol levels with which clients will be able to
# connect.  Disable SSLv2 access by default:
SSLProtocol all -SSLv2 -SSLv3

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA

#   Speed-optimized SSL Cipher configuration:
#   If speed is your main concern (on busy HTTPS servers e.g.),
#   you might want to force clients to specific, performance
#   optimized ciphers. In this case, prepend those ciphers
#   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
#   Caveat: by giving precedence to RC4-SHA and AES128-SHA
#   (as in the example below), most connections will no longer
#   have perfect forward secrecy - if the server's key is
#   compromised, captures of past or future traffic must be
#   considered compromised, too.
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
#SSLHonorCipherOrder on 

#   Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate.  If
# the certificate is encrypted, then you will be prompted for a
# pass phrase.  Note that a kill -HUP will prompt again.  A new
# certificate can be generated using the genkey(1) command.
SSLCertificateFile PATH TO MY CRT

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile PATH TO MY KEY

#   Server Certificate Chain:
#   Point SSLCertificateChainFile at a file containing the
#   concatenation of PEM encoded CA certificates which form the
#   certificate chain for the server certificate. Alternatively
#   the referenced file can be the same as SSLCertificateFile
#   when the CA certificates are directly appended to the server
#   certificate for convinience.
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt

#   Client Authentication (Type):
#   Client certificate verification type and depth.  Types are
#   none, optional, require and optional_no_ca.  Depth is a
#   number which specifies how deeply to verify the certificate
#   issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth  10

#   Access Control:
#   With SSLRequire you can do per-directory access control based
#   on arbitrary complex boolean expressions containing server
#   variable checks and other lookup directives.  The syntax is a
#   mixture between C and Perl.  See the mod_ssl documentation
#   for more details.
#<Location />
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>

#   SSL Engine Options:
#   Set various options for the SSL engine.
#   o FakeBasicAuth:
#     Translate the client X.509 into a Basic Authorisation.  This means that
#     the standard Auth/DBMAuth methods can be used for access control.  The
#     user name is the `one line' version of the client's X.509 certificate.
#     Note that no password is obtained from the user. Every entry in the user
#     file needs this password: `--'.
#   o ExportCertData:
#     This exports two additional environment variables: SSL_CLIENT_CERT and
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
#     server (always existing) and the client (only existing when client
#     authentication is used). This can be used to import the certificates
#     into CGI scripts.
#   o StdEnvVars:
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
#     Per default this exportation is switched off for performance reasons,
#     because the extraction step is an expensive operation and is usually
#     useless for serving static content. So one usually enables the
#     exportation for CGI and SSI requests only.
#   o StrictRequire:
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
#     under a "Satisfy any" situation, i.e. when it applies access is denied
#     and no other module can change it.
#   o OptRenegotiate:
#     This enables optimized SSL connection renegotiation handling when SSL
#     directives are used in per-directory context. 
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

#   SSL Protocol Adjustments:
#   The safe and default but still SSL/TLS standard compliant shutdown
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
#   the close notify alert from client. When you need a different shutdown
#   approach you can use one of the following variables:
#   o ssl-unclean-shutdown:
#     This forces an unclean shutdown when the connection is closed, i.e. no
#     SSL close notify alert is send or allowed to received.  This violates
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
#     this when you receive I/O errors because of the standard approach where
#     mod_ssl sends the close notify alert.
#   o ssl-accurate-shutdown:
#     This forces an accurate shutdown when the connection is closed, i.e. a
#     SSL close notify alert is send and mod_ssl waits for the close notify
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
#     practice often causes hanging connections with brain-dead browsers. Use
#     this only for browsers where you know that their SSL implementation
#     works correctly. 
#   Notice: Most problems of broken clients are also related to the HTTP
#   keep-alive facility, so you usually additionally want to disable
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
#   "force-response-1.0" for this.
BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" 

</VirtualHost>                                  

RE: Problem with logging into dialer - Added by Levy Ryan Nolasco over 4 years ago

Hi,

Comment the following and set your SSL

SLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

I cant use my paid ssl? I did what you asked for and now I cant even login to dialer because I get this error in console "Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID". I dont think its a problem with certificate because I could login to dialer before but I couldnt make any calls and I didnt hear voiceprompt "You are the only person in this conference"

RE: Problem with logging into dialer - Added by Levy Ryan Nolasco over 4 years ago

Hi,

It is because your SSL cert and files doesn't exist on your server. You need to ask your Domain name or SSL provider on how to install it on a CentOS 7. This link might help you as well https://goautodial.org/boards/3/topics/16487 and https://goautodial.org/boards/3/topics/14192?r=17201#message-17201

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

Hey,
My English is not perfect thats why I will try to explain you what is the issue using screenshoots.

https://imgur.com/a/bRBVype

As you can see my ssl working fine on site I dont have problem with login to dialer.

When im logging to dialer I get this message in console:

https://imgur.com/a/DemVHSu

Im using Zadarma Voip btw

sip show peers:

https://imgur.com/a/LfcrKiA

RE: Problem with logging into dialer - Added by Levy Ryan Nolasco over 4 years ago

Hi,

Can you post your /etc/kamailio/tls.cfg settings

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

#
# $Id$
#
# Example Kamailio TLS Configuration File
#

# This is the default server domain, settings
# in this domain will be used for all incoming
# connections that do not match any other server
# domain in this configuration file.
#
# We do not enable anything else than TLSv1
# over the public internet. Clients do not have
# to present client certificates by default.
#
[server:default]
method = TLSv1 
verify_certificate = no  
require_certificate = no
private_key = MY PATH TO SSL KEY
certificate = MY PATH TO SSL CERTIFICATE

#ca_list = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
#ca_list = /etc/ssl/certs/ca-bundle.crt
#crl = ./modules/tls/crl.pem

# This is the default client domain, settings
# in this domain will be used for all outgoing
# TLS connections that do not match any other
# client domain in this configuration file.
# We require that servers present valid certificate.
#
[client:default]
verify_certificate = no 
require_certificate = no 

# This is an example server domain for TLS connections
# received from the loopback interface. We allow
# the use of SSLv2 and SSLv3 protocols here, we do
# not require that clients present client certificates
# but if they present it it must be valid. We also use
# a special certificate and CA list for loopback
# interface.
#
#[server:127.0.0.1:5061]
#method = SSLv23
#verify_certificate = yes
#require_certificate = no
#private_key = ./modules/tls/local_key.pem
#certificate = ./modules/tls/local_cert.pem
#verify_depth = 3
#ca_list = local_ca.pem
#crl = local_crl.pem

# Special settings for the iptel.org public SIP
# server. We do not verify the certificate of the
# server because it can be expired. The server
# implements authentication using SSL client
# certificates so configure the client certificate
# that was given to use by iptel.org staff here.
#
#[client:195.37.77.101:5061]
#verify_certificate = no
#certificate = ./modules/tls/iptel_client.pem
#private_key = ./modules/tls/iptel_key.pem
#ca_list = ./modules/tls/iptel_ca.pem
#crl = ./modules/tls/iptel_crl.pem

RE: Problem with logging into dialer - Added by Demian Biscocho over 4 years ago

In your "sip show peers" results "kamailio" should have a different IP address than your public IP address. This should either be the loopback (127.0.0.1) or private IP if Kamailio and Asterisk are on the same server.

Edit your /etc/hosts and put in your domain or FQDN and restart your server.

nano /etc/hosts
# Auto-generated hostname. Please do not remove this comment.
127.0.0.1 localhost localhost4.localdomain4  localhost.localdomain FQDN

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

My etc/hosts looks like this

127.0.0.1 localhost 
MY IP FQDN

and Kamailio ip in sip show peers shows my ip
When I change etc hosts to this Kamailio IP in sip show peers is 127.0.0.1 but I can't login to CRM (unable to login to the database)
127.0.0.1 localhost MY IP FQDN

RE: Problem with logging into dialer - Added by Demian Biscocho over 4 years ago

Should just be:

127.0.0.1 localhost FQDN

RE: Problem with logging into dialer - Added by Pawel Duda over 4 years ago

Yes I tried that too and when I set it like this :

127.0.0.1 localhost FQDN

I can't login to CRM (unable to login to the database).

RE: Problem with logging into dialer - Added by Wittie Manansala over 4 years ago

Hi,

Please re-check the following settings:

nano /var/www/html/php/Config.php
nano /var/www/html/php/goCRMAPISettings.php
Should be:

<?php
define ('gourl', 'https://FQDN/goAPIv2');
define ('goUser', 'goAPI');
define ('responsetype', 'json');
?>

Thanks

    (1-23/23)
    Go to top