| ������� ��������� ���� Asterisk |
[���������] |
������ ������������� ��� ��������� � �������������, ����������� �����
�� ����� ������� ������������ Asterisk � �������� ������� ��������
����������� � ������� ���� � ����������� ������������ ������� ������ ���.
� �������� ���������������� ���� ����� ����������� ���ף�������� �������������
�������� ����� ���������� VirtualBox ��� ����������� �������������� �������
�������, � ����� ������������� ��������� GDB � ������ � ���������� Visual
Studio Code ��� ���������� ���������� ����, ������������ �������� ������ �
������������ ������� ������ ����������� ������� � ��������.
������������, ��� �������� ����� ���� ��������� �� Linux � ����������� ����� �
������ � ������� ��������� �����, ���������� � ������ ����������������. ������
��������� ������� ����� ��������� �������� ��� �������� ������� � ��ߣ�� ������.
������������ �����������:
VirtualBox >7.0
������������ ����� �� Linux (����������� �� �����, �� ����� ���������������
Ubuntu Server 24.04)
Visual Studio Code � ���������: Remote Explorer
����������:
���������� ���������� �� � ����������� ����� � ������������ ������� � ��������
� �������� ��-��� � ����� ������. ��� ����� � ���������� ��, �� ��������� ��:
���� - ������� 1 - ��� ����������� Nat
���� - ������� 1 - ������������� - ������� ������ - �������� �������
��������: TCP - ���� �����: 2022 - ���� �����: 22
��� ����������� �� ���������� ������ SSH. ��������� ��� ��������� �� Linux ��.
� ������������ � ������ ������������.
��������� �� �� �� ����� �������� � ����������� ������ �� SSH:
ssh user@localhost -p 2022
� ������ ������ ����������� ������ Remote Explorer. ��������� ����������� ��
SSH � ����������� ���� ������������ ��� ����������� � �� (c�. ��������):
Host localhost
HostName 127.0.0.1
User username
Port 2022
� ���� ���������� ������� Remote Explorer �� ������ ���������� �������� Connect
in current Window. ������ ������ � ���� ������, ����� ������� ��� ��������. �
������ ������ ��������� ����� ���� VS Code � ����������� ����������� � ������
������ ���� (>{SSH: localhost). ���� ������ � ��������� ������� �� �������
�������� Ctrl+J � ����� ����������� �������.
��������� Asterisk � ���������� ������ � ����������� �������������.
� ������� ����� ��������, ��� �������� �������� �� ��:
ping 1.1.1.1
������ ������ ������ ��������� ���� Asterisk � ����� ��������.
wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22-current.tar.gz
tar -x -zf asterisk-22-current.tar.gz
cd asterisk-22
������������� ����������� ��� ���������� ������� �� ��������� ���� � ��������:
sudo ./contrib/scripts/install_prereq install
sudo apt install gdb
��������� ������� ���������������� ������� � ���������� ������. ��������� ��� ������.
./configure --enable-dev-mode
make menuselect.makeopts
menuselect/menuselect --disable-all --enable pbx_config menuselect.makedeps
��������� ������� ���������� � ����������� ���������.
make
sudo make install
����� ���������� �������� ������� Asterisk � ������� ��� �������� ������������ �������
echo -e "[modules]\\nautoload = yes" | sudo tee -a /etc/asterisk/modules.conf
sudo cp configs/basic-pbx/extensions.conf /etc/asterisk/
asterisk -f
����� ������� ����� �������������� � ���, ��� �� ������� ���������������� �����
� ������� Asterisk Ready. ����� ���������� � �������.
������� Asterisk:
� ���� VS Code, ������ޣ����� � ��, ������������� ������ C/C++ � C/C++ Extension Pack.
��������� VS Code Explorer (Ctrl+Shift+E) � ���� Open Folder. � ���� ������
�������� ������� � Asterisk � �������� Ok. ����������� ����� ���� � �������
��������� ���� Asterisk.
� ���� VS Code �������� ����� Run - Add Configuration - CMake Debug � �
����������� ����� .vscode/launch.json ������� ��� � ��������� 2 ����� ������������:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Asterisk (Local Launch)",
"type": "cppdbg",
"request": "launch",
"program": "/usr/sbin/asterisk",
"args": ["-f", "-vvvgc"], // ���������� ����� � ������������ �������������
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Debug Asterisk (Local Attach)",
"type": "cppdbg",
"request": "attach",
"program": "/usr/sbin/asterisk",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"miDebuggerArgs": "--interpreter=mi",
"setupCommands": [
{
"description": "Enable pretty-printing",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set debug mode",
"text": "handle SIG33 pass nostop noprint"
}
],
}
]
}
��� ������������ � ��������� �������� � � �������������� � ��� ����������� ��������.
��������� .vscode/launch.json (Ctrl+s).
� ���� ������ ��������� Asterisk � VS Code Explorer (Ctrl+Shift+E) ��������� ����
main/asterisk.c
������ �� ������� 3613 � ����� ��� ������� int main(int argc, char *argv[]).
������������� ����� ���������, ����� �� ������� ������ ����� �� ������ ������
(�������� ��� ��������� ��������� ����).
��������� ������� ������� ����� �� ���������� F5 ��� ����� ���� Run - Debug.
������� ������ ������������ �� ����� ����� � ����� ������������ ����������
��������� ������ ��� ������ ������ ������� F10
��������� ������ � ������� ������ ������� F11
� ���� ����� �������� ���� Run and Debug (Ctrl+Shift+D), ����� ���������
����������, ������� ������ � ����� ��������.
������� ������ ����� ������������ PBX extensions.conf:
����� �� �������������� ����������� ������ pbx_config.so � �� ������ ���� � /usr/lib/asterisk/modules/
ls /usr/lib/asterisk/modules/
��� �� � /etc/asterisk/modules.conf ������ ��������� ��������� ������������:
[modules]
autoload = yes
��������� ���� pbx/pbx_config.c �� ������ 2151 � ������ breakpoint �� �������
static int load_module(void)
��������� �������. ���� ������������ �� ������ ������������� ����� � main() ��
������ �������� F5 � �ģ� �������� � pbx/pbx_config.c:2151
�����, ��������� ��������� ��������� � ������� F10 - F11 � �������, ���
���������� � ���������� ���������� ��������.
����������.
�����, ����� ��������������� ������������ ������ �� ���� �� ������ ��������� �����:
make menuselect
make
sudo make install
������ ��������� � ������� ������� asterisk/testsuite � �������� ������ ���
������� Asterisk � ������ ���������
��������� � ������
������ ��� ��������� ������������ ��������� �� root
launch.json
|
| |
|
|
|
| ������: ������ / �������������� Cisco, VoIP / ����������� � ���� ������� �� Cisco |
| 1.1, KoD_ (?), 09:43, 06/09/2025 [��������]
| +/– |
��������� ������� opennet �� ���������� ���������!
| | |
| |
| 2.4, 0xdeadbee (-), 18:02, 07/09/2025 [^] [^^] [^^^] [��������]
| +/– | |
> ��������� ������� opennet �� ���������� ���������!
� ���� ��� �� ������������. ������ ����� ����������.
� ���� ���� ���������� : ��� �������� ������ ��������� � ���������� ����������.
| | |
| |
| 3.5, Maxim Chirkov (ok), 23:45, 07/09/2025 [^] [^^] [^^^] [��������]
| +/– |
� ����� ������ ���� ����� � ������������� �����������, ��� ���������� � ��������. � ����� �� ���������� ������, � ���� ������� ���������.
���� ������ ����� ����� ������:
"��� ���������� �� ������ ������������� ����� � ��������� X (�� �� 100%) ?
��� ����� ������. ���� ������� ������ � ������ �������������� ���������� �� ������,
� ������ 1 ����� = 1 ������, ��� ���� ����� ���������� �������� � ���������� ������� �� 1-10 ��. ������������ ���� ���������� ������������ ������, ������ � ���������� - ������� � ����������.
��� X ����� ��������, �������� �������� ������ ������������-����������� �� Windows, �� Wayland � ����������� ���� ���������, � ���� ��� ����� ������ � ����."
| | |
| |
| 4.6, 0xdeadbee (-), 07:25, 08/09/2025 [^] [^^] [^^^] [��������]
| +/– |
������ �����������. � ���� ���������� ������ ���:
1) ��, � ����� ������������ ��� �������� ��������, ������������ �������� �� ������.
2) ��� �� �����, ���������� ����� ��������� ��������� ������ ���.
�������� ����������� ����� ����� �������� � selection ��������� �� ����������� ������.
��� ? ��� ������ ����������, � � � ���� ��������� ���������� !
| | |
| |
| 5.8, morphe (?), 21:31, 13/09/2025 [^] [^^] [^^^] [��������]
| +/– | |
> 1) ��, � ����� ������������ ��� �������� ��������, ������������ �������� �� ������.
Bait used to be believable
| | |
|
| 4.7, KoD_ (?), 08:19, 08/09/2025 [^] [^^] [^^^] [��������]
| +2 +/– |
������ �������, � ����� ����� ��������� � �������� ���� ������������ ��� ������� opennet. ������ ������ � ��������, �� �����������, ���������� �� ������ https://www.opennet.ru/donate.shtml , ��������� ����� ���������� ������� ����� � ����������� ��� ������ � ������ ����.
���� �� ������������, ���������� opennet - ��� ������ �������!
| | |
|
|
|
| 1.2, ������ (?), 13:53, 06/09/2025 [��������]
| +/– |
�� ����������� ����� ������ ���� ���������� ��� ����������� � �����, � � ������ ��� ����� ������ ��������� (�����������) ������� ��������� (�������1 - ���, �������2 - ����������� ������� �����)
| | |
| |
| 2.3, ������ (??), 06:23, 07/09/2025 [^] [^^] [^^^] [��������]
| +1 +/– |
� ����� ��������� ������ ����� ������� � ������ �������� IP �� ������ �������...
| | |
| |
| 3.9, ������ (?), 11:24, 01/10/2025 [^] [^^] [^^^] [��������]
| +/– |
�������, ��� ����� ������� � ������������ �� ������ ���������� �����, ��� ���� ����� ����� ��������� �� ������� � ����� ����, � ����� ��� ������������� �� ����������
| | |
|
|
|