PJSIP - SIP problem

Hello ALL,

Could you help me, please, with problem I am not able to fix yet. I have Asterisk 13.6.0. and FreePBX 12.0. I tried to use chan_pjsip and decided to come back to chan_sip. After that when I try to call from one extension to other I have an error:

ERROR[6725][C-00000000]: pbx.c:4405 ast_func_read: Function PJSIP_DIAL_CONTACTS not registered

I found that my config file extension_additional.conf keeps next:
exten => dstring,n,GotoIf($["${THISDIAL:0:5}"!=“PJSIP”]?doset)
exten => dstring,n,Noop(Debug: Found PJSIP Destination ${THISDIAL}, updating with PJSIP_DIAL_CONTACTS)
exten => dstring,n,Set(THISDIAL=${PJSIP_DIAL_CONTACTS(${THISDIAL:6})})

But I have already turned all devices to sip back and more over in modules.conf put string noload => pjsip.so

Could you help me, please?

Thank you in advance,
Ivan

Hi Ivan!

if you look 2 lines before that you will see that this comes from the database…

Go into the Asterisk CLI

asterisk -rvvvvvvvvvvvvvvvv

and type

database show

Look at the entries on the left which start with “/DEVICE”…

Find the one(s) which destination on the right begin with “PJSIP”…

This/those entrie(s) are still in PJSIP and must be converted to SIP…

Good luck and have a nice day!

Nick

Thank you Nick!

Could you tell me, please, how can I convert them to SIP from PJSIP, please?

Thank you again!

Ne za chto…

(Please forgive me if I am wrong about this…)

I am not a 100% sure for FreePBX 12 since I have FreePBX 13 but if the devices which have a problem are extensions you are supposed to have a button in the extension page to convert from one protocol to the other…

I would send you a screen capture but something got hosed on my FreePBX box and i am currently unable to access those screens…

Good luck and have a nice day!

Nick

Delete and recreate the extensions is the other solution. Bulk Handler would work great for that if you have a lot of extensions.

Hi Nick,

Is it possible to change device from PJSIP to SIP using asterisk CLI? Also, It looks like my FreePBX is not proper connected to Asterisk anymore. When I do “CLI> database show” I see not all devices I have and can see via web interface. Do you know how can I check this connection and possibly fix the problem if I have it?

Thank you again!
Ivan

P.S. Thank you for Russian! Spot on!

Zdravstvuyte Ivan!

Izvinite Ivan, if there is a way to do it I don’t know it…

Personally I still use Chan_SIP and will only change to PJSIP when I either have a very good reason to or it has become a complete replacement for Chan_SIP (there are still things you can’t use PJSIP for…).

I don’t know about FreePBX 12 but with FreePBX 13 you can switch from PJSIP to Chan_SIP (or vice versa) by ediiting the extension followed by: Advanced, Edit Extension, Change SIP Driver (followed by “Submit” and later "Apply “Config” I believe).

I don’t know if this was already present under FreePBX 12, my guess is that it probably was but I don’t remember…

Are you sure they have not just scrolled off the screen? There might be some things that don’t need to be there but I am pretty sure all your extensions need to be there…

I am pretty sure FreePBX would tell you if there was anything wrong in that regard…

I am not quite sure when the FreePBX database content gets transferred into the Asterisk database, my guess would be when we click “Apply Config” but I am not sure about this…

Maybe a dev could answer that one?

Ne za chto!

I thought so…

Do svidaniya!

(and good luck!)

Nick

Hi guys,

Now I see there is definitely problem with my FreePBX connection to Asterisk. I send you two my screens where you can see config web page of Free PBX with message “Unable to find Asterisk results” and list of my extensions in FreePBX. This list mismatches with output I have from Asterisk. I don’t have my test extensions 111 and 112

Could you tell me, please, how can I check connectivity between FreePBX and Asterisk and how can I fix the problem.

Thank you in advance,
Ivan

Connected to Asterisk 13.6.0 currently running on voipserv (pid = 14146)
voipservCLI> database get DEVICE
Usage: database get
Retrieves an entry in the Asterisk database for a given
family and key.
voipserv
CLI> database show
/DEVICE/100/default_user : 100
/DEVICE/100/dial : SIP/100
/DEVICE/100/type : fixed
/DEVICE/100/user : 100
/DEVICE/101/default_user : 101
/DEVICE/101/dial : SIP/101
/DEVICE/101/type : fixed
/DEVICE/101/user : 101
/DEVICE/103/default_user : 103
/DEVICE/103/dial : PJSIP/103
/DEVICE/103/type : fixed
/DEVICE/103/user : 103
/DEVICE/104/default_user : 104
/DEVICE/104/dial : PJSIP/104
/DEVICE/104/type : fixed
/DEVICE/104/user : 104
/DEVICE/105/default_user : 105
/DEVICE/105/dial : SIP/105
/DEVICE/105/type : fixed
/DEVICE/105/user : 105
/DEVICE/106/default_user : 106
/DEVICE/106/dial : SIP/106
/DEVICE/106/type : fixed
/DEVICE/106/user : 106
/DEVICE/107/default_user : 107
/DEVICE/107/dial : SIP/107
/DEVICE/107/type : fixed
/DEVICE/107/user : 107
/DEVICE/150/default_user : 150
/DEVICE/150/dial : SIP/150
/DEVICE/150/type : fixed
/DEVICE/150/user : 150
/DEVICE/151/default_user : 151
/DEVICE/151/dial : PJSIP/151
/DEVICE/151/type : fixed
/DEVICE/151/user : 151
/DEVICE/155/default_user : 155
/DEVICE/155/dial : PJSIP/155
/DEVICE/155/type : fixed
/DEVICE/155/user : 155
/SIP/Registry/105 : 192.168.0.4:62742:3600:105:sip:[email protected]:62742;rinstance=2376262d1ed426cb
/SIP/Registry/151 : 192.168.0.14:5060:3600:151:sip:[email protected]:5060;transport=udp
/SIP/Registry/155 : 192.168.0.19:5060:3600:155:sip:[email protected]:5060;transport=udp
/dundi/secret : sNz+XsGPHSt69gpqzUhgPw==;VPoEfBvqhlQiSshzCsqYEg==
/dundi/secretexpiry : 1485818831
244 results found.
voipserv*CLI>

Zdravstvuyte Ivan!

Yikes, is Asterisk even running?

Can you try this?

This is what Lorne suggested I do when my PBX stopped working recently…

Please let us know what comes out of this…

You have quite a few problems but let’s start by figuring out if Asterisk is actually working on that box…

By the way, which files are reported as tampered???

Do svidaniya!

(and good luck!)

Nick

Thanks Nick for support!

Yes Asterisk is up and running. I see the processes into the system via “systemctl status asterisk” and “ps -ef | grep asterisk” commands. Moreover, “netstat -tnupl” shows asterisk port is in “listener” status.
I found how I can change my device using Asterisk CLI. To do this I implemented next command:

database put DEVICE/151 type SIP

Now this device has proper type, but I’m not sure it will work. I’m going to check it today evening.
Thank you again for link. Will read it.

Spasibo! Horoshego dnya!
Ivan

Will proceed with this.

Now checked my phones/extensions. After implementation of:

database put DEVICE/155 type SIP/155

The extension 155 is able to make and receive calls. The problem only why FreePBX is not connected to Asterisk. I see the FreePBX changes config files into /etc/asterisk directories. I see FreePBX changes MySQL DB (MarinaDB) but I see no changes into Asterisk itself. Very strange.

Ivan

Asterisk is not running as the ‘asterisk’ user, it is running as ‘root’.

Reboot the machine, and make sure the ‘asterisk’ process is running as asterisk. You should also run ‘fwconsole chown’ too, just to make sure.

Thank you xrobau!

You are probably right.
[[email protected] Tue Jan 31 17:24:26 asterisk]# ps -ef | grep asterisk
asterisk 6956 1124 0 10:04 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 7048 1124 0 10:06 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 24467 1 0 17:17 pts/1 00:00:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 24470 24467 0 17:17 pts/1 00:00:02 /usr/sbin/asterisk -f -U asterisk -G asterisk -U asterisk -vvvg -c
root 24542 23591 0 17:17 pts/0 00:00:00 rasterisk rvvvvvv
asterisk 24630 1124 0 17:19 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 24952 24207 0 17:25 pts/1 00:00:00 grep --color=auto asterisk
asterisk 29585 1124 0 06:05 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 29587 1124 0 06:05 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 30074 1124 0 Jan30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 30075 1124 0 Jan30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 30076 1124 0 Jan30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 30077 1124 0 Jan30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
asterisk 30078 1124 0 Jan30 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND

Is this a problem? (Bold string) Because the next string after bold shows the asterisk running under ‘asterisk’ user.

Also, when I try to do your command I got this:
[[email protected] Tue Jan 31 17:25:35 asterisk]# fwconsole chown
-bash: fwconsole: command not found
[[email protected] Tue Jan 31 17:26:34 asterisk]#

What did I do wrong?

Thank you again!

Oh, nope, that’s fine, the actual asterisk process is running as asterisk.

Looking at your screenshots, you’re running an old version of freepbx, so the command is ‘amportal chown’, instead.

Thank you for help.

Tried your command - still have the same problem. FreePBX cannot see Asterisk. Actually, where can I read about this connection? How do they connect each other? I presume via MySQL. If so, there is something wrong with MySQL connection of Asterisk <—> MySQL or/and FreePBX <—>MySQL

Thank you again!

Zdravstvuyte Ivan!

Ne za chto…

I believe this is done through the AMI (Asterisk Manager Interface)…

Did you do anything which could have resulted in the content of /etc/amportal.conf, /etc/asterisk/manager.conf and

Settings > Advanced Settings > Asterisk Manager

not matching?

Did you add any weird firewall rules?

Since this usually use localhost they would have to block localhost which I am not fully sure you can do… A bad ACL in /etc/asterisk/manager.conf would be more probable…

Did you try the

asterisk -cvvv

I suggested earlier to see if any weird errors pop up?

Ne za chto…

Tebe togo zhe…

(I have to confess this I had to google as my Russian is quite limited…)

Do svidaniya!

(and good luck!)

Nick

Hi Nick,

I found when did asterisk -cvvvvvv next:

2017-02-06 09:56:12] WARNING[9024]: res_odbc.c:1560 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
[2017-02-06 09:56:12] WARNING[9024]: res_odbc.c:1370 _ast_odbc_request_obj2: Failed to connect to asteriskcdrdb
[2017-02-06 09:56:12] NOTICE[9024]: res_odbc.c:923 load_odbc_config: Registered ODBC class ‘asteriskcdrdb’ dsn->[MySQL-asteriskcdrdb]

Also I found massive warning messages.

[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘100’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘101’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘105’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘106’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘107’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘111’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘112’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘151’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘155’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘100’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘101’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘105’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘106’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘107’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘111’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘112’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tcp’ is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:30551 build_peer: ‘tls’ is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘151’ global force_rport=‘Yes’ peer/user force_rport=‘No’)
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31197 display_nat_warning: !!! PLEASE NOTE: Setting ‘nat’ for a peer/user that differs from the global setting can make
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31198 display_nat_warning: !!! the name of that peer/user discoverable by an attacker. Replies for non-existent peers/users
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31199 display_nat_warning: !!! will be sent to a different port than replies for an existing peer/user. If at all possible,
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31200 display_nat_warning: !!! use the global ‘nat’ setting and do not set ‘nat’ per peer/user.
[2017-02-06 09:56:12] WARNING[9024]: chan_sip.c:31201 display_nat_warning: !!! (config category=‘155’ global force_rport=‘Yes’ peer/user force_rport=‘No’)

Also

[2017-02-06 09:56:12] NOTICE[9024]: res_odbc.c:1528 odbc_obj_connect: Connecting asteriskcdrdb
[2017-02-06 09:56:12] WARNING[9024]: res_odbc.c:1560 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
[2017-02-06 09:56:12] WARNING[9024]: res_odbc.c:1370 _ast_odbc_request_obj2: Failed to connect to asteriskcdrdb
[2017-02-06 09:56:12] WARNING[9024]: cel_odbc.c:142 load_config: No such connection ‘asteriskcdrdb’ in the ‘cel’ section of cel_odbc.conf. Check res_odbc.conf.

I believe the massive warning block is avout pjsip which is I’m not going to load but only the real problem I could found is the problem with connection to asteriskcdrdb DB. I think, may be I’m wrong it should not be impact on connection between FreePBX and Asterisk.

Also I found the port number for Asterisk manager in Asterisk side was 5038 and for FreePBX was 8088. I’ve change it to 5038, but it didn’t help.

Still have the same picture “Unable to find Asterisk result”

That’s not an error I’m aware of. Can you please post a screenshot of exactly the problem?

Zdravstvuyte Ivan!

I am no Asterisk programming guru but I am pretty sure it is not…

(I am a programmer but I have never “played” with Asterisk’s source code…)

Those warning messages are preceded with “chan_sip.c”, I am pretty sure if it was PJSIP you would see something like “chan_pjsip.c”…

(Essentially it’s the name of the source code file… PJSIP has its own which is different from Chan_SIP…)

So those are actually for Chan_SIP…

and

Any idea why you have so many mismatches and warnings? Did you partially restore from a backup or something?

Also, are you running the FreePBX distro or something else?

What do you have in /etc/odbc.ini?

My working setup (using the FreePBX distro) has the following:

[MySQL-asteriskcdrdb]
Description=MySQL connection to ‘asteriskcdrdb’ database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/lib/mysql/mysql.sock
option=3
Charset=utf8

Do svidaniya!

(and good luck!)

Nick

Honestly, I had a good server with Asterisk 13.0.6 and FreePBX 12 but I wanted to install fax module and after recompilation I have this problem.

I found /etc/odbc.ini but it is empty file for me. I checked /etc/asterisk/res_odbc.conf which keeps res_odbc_additional.conf and that file keeps correct settings. Should I nested /etc/odbc.ini by this info as well?
Yes. I’m running FreePBX 12.0.76.2 and I installed it from source code files