Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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>

...

Filogic-GW*CLI> module reload res_pjsip.so
Module 'res_pjsip.so' reloaded successfully.
    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
Filogic-GW*CLI> dialplan reload
Dialplan reloaded.
[Apr 28 17:43:14] WARNING[3460]: pbx.c:7126 add_priority: Extension '1001' priority 7 in 'default', label 'unavail' already in use at priority 6
[Apr 28 17:43:14] WARNING[3460]: pbx.c:7126 add_priority: Extension '1002' priority 5 in 'default', label 'busy' already in use at priority 4
[Apr 28 17:43:14] WARNING[3460]: pbx.c:7126 add_priority: Extension '1002' priority 7 in 'default', label 'unavail' already in use at priority 6
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000048 sec
    -- Time to restore hints and swap in new dialplan: 0.000012 sec
    -- Time to delete the old dialplan: 0.000034 sec
    -- Total time merge_contexts_delete: 0.000094 sec
    -- pbx_config successfully loaded 6 contexts (enable debug for details).
Filogic-GW*CLI>

6) Verify the clients are successfully registered with the asterisk server

Code Block
Filogic-GW*CLI> pjsip show endpoints

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  1001                                                 Unavailable   0 of inf
     InAuth:  1001/1001
        Aor:  1001                                              10
  Transport:  udp-transport             udp      0      0  0.0.0.0:5060

 Endpoint:  1002                                                 Unavailable   0 of inf
     InAuth:  1002/1002
        Aor:  1002                                              10
  Transport:  udp-transport             udp      0      0  0.0.0.0:5060


Objects found: 2

7) Make sure that both clients and Banana PI R4 board are in the same network.

8) Add firewall rules to allow sip and rtp ports to make communication between two clients using asterisk server. Flush any rules which are blocking the clients traffic.

Code Block
root@Filogic-GW:~# iptables -F
root@Filogic-GW:~# iptables -A INPUT -p udp --dport 5060 -j ACCEPT
root@Filogic-GW:~# iptables -A INPUT -p udp --dport 10000:20000 -j ACCEPT
root@Filogic-GW:~# iptables -nL
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:5060
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpts:10000:20000

9) For any debug regarding the logs please set pjsip logger to on.

Code Block
pjsip set logger on