...
7) Voice can be audible clearly between two clients.
Asterisk Server setup in Banana PI R4
1) Added below changes for porting asterisk code for banana pi r4 board.
| Code Block |
|---|
https://github.com/rdkcentral/meta-cmf-bananapi/commit/eec660282dbeec132b90e3172f72f09ec951e2d7 |
2) Enable asterisk in board using systemctl
| Code Block |
|---|
systemctl enable asterisk |
3) Add configuration for two sip clients in the banana pi r4 board.
| Code Block |
|---|
root@Filogic-GW:/etc/asterisk# cat pjsip.conf
[udp-transport]
type=transport
protocol=udp
bind=0.0.0.0
external_media_address=192.168.1.12
external_signaling_address=192.168.1.12
[1001]
type=endpoint
transport=udp-transport
context=from-internal
disallow=all
allow=alaw
allow=ulaw
auth=1001
aors=1001
direct_media=no
[1001]
type=auth
auth_type=userpass
password=1001
username=1001
[1001]
type=aor
max_contacts=10
[1002]
type=endpoint
transport=udp-transport
context=from-internal
disallow=all
allow=alaw
allow=ulaw
auth=1002
aors=1002
direct_media=no
[1002]
type=auth
auth_type=userpass
password=1002
username=1002
[1002]
type=aor
max_contacts=10 |
4) Add dialplan for the two clients in the board
| Code Block |
|---|
root@Filogic-GW:/etc/asterisk# cat extensions.conf
[general]
static=yes
writeprotect=no
clearglobalvars=no
[from-internal]
exten => 1001,1,Dial(PJSIP/1001,20)
exten => 1002,1,Dial(PJSIP/1002,20)
[default]
exten => _X.,1,NoOp(Unhandled call to ${EXTEN})
exten => _X.,n,Playback(vm-nobodyavail)
exten => _X.,n,Hangup()
exten => 1001,1,Dial(PJSIP/1001,20)
exten => 1001,n,NoOp(Dial status for 1001: ${DIALSTATUS})
exten => 1001,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)
exten => 1001,n(busy),Playback(all-circuits-busy-now)
exten => 1001,n(busi),Hangup()
exten => 1001,n(unavail),Playback(vm-nobodyavail)
exten => 1001,n(unavail),Hangup()
exten => 1002,1,Dial(PJSIP/1002,20)
exten => 1002,n,NoOp(Dial status for 1002: ${DIALSTATUS})
exten => 1002,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)
exten => 1002,n(busy),Playback(all-circuits-busy-now)
exten => 1002,n(busy),Hangup()
exten => 1002,n(unavail),Playback(vm-nobodyavail)
exten => 1002,n(unavail),Hangup() |
5) Run the asterisk server in the board and reload both the configuration files in the asterisk CLI
| Code Block |
|---|
root@Filogic-GW:/etc/asterisk# asterisk -rvvv
Asterisk 18.15.1, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 18.15.1 currently running on Filogic-GW (pid = 4177657)
Filogic-GW*CLI>
|
5) Make sure that both clients and Banana PI R4 board are in the same network.