Solving the error in Asterisk “File vm-newn does not exist in any format”

When I called a voicemail number, I noticed the following errors in the Asterisk console:

[Apr 10 17:08:01] WARNING[19135][C-00001cf4]: file.c:701 ast_openstream_full: File digits/1n does not exist in any format
[Apr 10 17:08:01] WARNING[19135][C-00001cf4]: file.c:1017 ast_streamfile: Unable to open digits/1n (format (ulaw)): No such file or directory
[Apr 10 17:08:01] WARNING[19135][C-00001cf4]: file.c:701 ast_openstream_full: File vm-newn does not exist in any format
[Apr 10 17:08:01] WARNING[19135][C-00001cf4]: file.c:1017 ast_streamfile: Unable to open vm-newn (format (ulaw)): No such file or directory

Errors are caused by the lack of sound files, for example, in my case in the voice mail one message and when I try to say “you have one (1n.ulaw) new (vm-newn) message, an error occurs and the handset lies down.

Archive with a set of necessary files is enough to simply download from the official site http://downloads.asterisk.org/pub/telephony/sounds/releases/ and unpack to the directory /usr/share/asterisk/sounds
After this, the error should not be.

How to view the configuration of MikroTik

Recently I configured the next MikroTik and I had to share the configuration, so, to see it in the terminal, execute the command:

/export compact

To save the configuration to a file, execute the command:

/export compact file=config

After saving the file will be in the device’s memory, you can see it and download it from the Files menu via the web interface or winbox, ftp, smb, sftp.

Backup configuration of MikroTik

You can make a backup copy of the configuration of MikroTik devices in several ways:

1) Via the web interface or WinBox on the left in the menu select Files and press the Backup key and once again Backup, after which a file with a backup copy of the settings will be created in the device memory. For example, after resetting the device’s settings, you can restore them from this file, open Files there, select the desired file and click the Restore button, the device will reboot.
From the terminal, look at the list of files in memory, make a backup and recover from it like this:

file print
system backup save name=file
system backup load name=file

From this file, you can restore only on the device where it was made, because the mac addresses of the interfaces are also restored.

2) The next option is to export the configuration (the list of commands) to a file, which you can then execute on other devices, thereby transferring the configuration.
I wrote about this in the next article How to view the configuration of MikroTik

Why Zabbix does not always draw graphics

There are times when some of the information on the graphs in Zabbix is missing, so to say it is displayed partially and with interruptions.

I will describe possible reasons for interruptions and their solution:

1) There may be a bad connection to the network node, you need to check the ping from the Zabbix server to the network node.
For example, the first PING command with large packages from Windows, and the second from Linux:

ping -t -l 1024 192.168.5.1
ping -i 0.2 -s 1024 192.168.5.1

2) The device is slow to work and stops responding when there are a large number of requests, in order to solve this problem it is necessary to uncheck “Use mass requests” in the settings of the Zabbix network node.

3) 32-bit counters are used to obtain data from the network node, and when loading device interfaces, for example, above 400 megabits, the data on the graph may not be displayed; in order to solve this problem, in the data elements, they must be replaced with 64-bit ones and the node’s network history is cleared in order there were no leaps.
For example, if traffic is received from the first network interface via the ifInOctets.1 MIB (32-bit), then it must be replaced with ifHCInOctets.1 (64-bit).

How to enable Ping in Windows Server

For Windows Server to respond to PING requests, you must enable them in the firewall.

To do this, open the rule in the firewall “File and Printer Sharing (Echo Request — ICMPv4-In)” and tick the “Enabled(Enabled)“, similarly for the sixth version “File and Printer Sharing (Echo Request — ICMPv6-In)“.

In order for the system to respond to PING requests only for specific IP, there is also a rule in the tab in the settings “Scope“, where “Remote IP Address” pushing “Add” specify the desired IP-addresses.

From the command line, you can configure this rule like this:

netsh advfirewall firewall set rule name= "File and Printer Sharing (Echo Request — ICMPv4-In)" new enable=yes action=allow profile=any remoteip=192.168.5.0/24

Either (on / off):

netsh firewall set icmpsetting 8
netsh firewall set icmpsetting 8 disable

From PowerShell like this:

Set-NetFirewallRule -Name FPS-ICMP-ERQ-In -Enabled True -Profile Any -Action Allow

How to remove “New User” in Asterisk CallerID

I noticed once that when incoming calls from the Goip4 gateway on SIP phones, not only the caller’s number is displayed, but the name “New User” flashes alternately with the phone number, which is obviously superfluous and hinders.

After viewing the Asterisk configuration files, I noticed some standard values in the /etc/asterisk/users.conf file in the general section, namely:

[general]
fullname = New User

Which need to comment out:

;fullname = New User

And restart Asterisk to apply the changes:

sudo service asterisk restart

Done, now with incoming calls only the phone number will be displayed.

Configuring the VPN IPSec / L2TP server on Mikrotik

Here is an example of setting up a VPN IPSec / L2TP server on Mikrotik so that you can connect to it from Windows, MacBook, iPhone, etc.

1) Add a range of IP addresses for DHCP by opening “IP” – “Pool” and indicating:
Name: vpn_pool
Addresses: 192.168.5.1-192.168.5.15
Next pool: none
From the terminal like this:

ip pool add name=vpn_pool ranges=192.168.5.1-192.168.5.15

2) Add a profile to “PPP” – “Profiles
Name: l2tp_profile
Local address: vpn_pool (you can specify default 192.168.88.1)
Remote address: vpn_pool
Change TCP MSS: yes
The rest is not touched and left in default
From the terminal like this:

ppp profile add change-tcp-mss=yes local-address=vpn_pool name=l2tp_profile remote-address=vpn_pool

3) Add a user to “PPP” – “Secrets
Name: LOGIN
Password: PASSWORD
Service: l2tp
Profile: l2tp_profile
From the terminal like this:

ppp secret add name=LOGIN password=PASSWORD profile=l2tp_profile service=l2tp

4) Enable the server in “PPP” – “Interface” – “L2TP Server
Enabled: yes
MTU/MRU: 1450
Keepalive Timeout: 30
Default profile: l2tp_profile
Authentication: mschap2
Use IPSec: yes
IPSec Secret: ENCRYPTION_KEY (also indicated in the clients)
From the terminal like this:

interface l2tp-server server set authentication=mschap2 default-profile=l2tp_profile enabled=yes ipsec-secret=KEY use-ipsec=yes

5)IP” – “IPSec” – “Peers
Address: 0.0.0.0/0
Port: 500
Auth method: pre shared key
Exchange mode: main l2tp
Passive: yes (set)
Secret: ENCRYPTION_KEY (also indicated in the clients)
Policy template group: default
Send Initial Contact: yes
NAT Traversal: yes
My ID Type: auto
Generate policy: port override
Lifitime: 1d 00:00:00
DPD Interval: 120
DPD Maximum failures: 5
Proposal check: obey
Hash algorithm: sha1
Encryption Algorithm: 3des aes-128 aes-256
DH Group: modp 1024
From the terminal like this:

ip ipsec peer add address=0.0.0.0/0 enc-algorithm=aes-256,aes-128,3des exchange-mode=main-l2tp generate-policy=port-override passive=yes secret=KEY

6)IP” – “IPSec” – “Proposals”
Name: default
Auth algorithms: sha1
Enrc. algorithms: 3des, aes-256 cbc, aes-256 ctr
Life time: 00:30:00
PFS Group: mod 1024
From the terminal like this:

ip ipsec proposal set [ find default=yes ] enc-algorithms=aes-256-cbc,aes-256-ctr,3des

7)Firewall” – “Add New
Let’s add the first rule allowing incoming VPN connections:
Chain: Input
Protocol: udp
Any. Port: 1701,500,4500
Action: Accept
And the second:
Chain: Input
Protocol: ipsec-esp
Action: Accept
From the terminal like this:

ip firewall filter add chain=input action=accept protocol=udp port=1701,500,4500
ip firewall filter add chain=input action=accept protocol=ipsec-esp

The rules should be at the top of the list.

This completes the configuration, you can connect.

See also:
Configuring Remote Access in Mikrotik Router