Asterisk debugging
This page has tips on what to do when debugging Asterisk problems
One way audio
Typically happens when remote phone and server are NATTED (one end or both)
Make sure remote phone is set to nat=? (where ? != no) so that Asterisk ignores the non-routable address in the SIP header and uses the packet source instead.
There has to be a clear path both directions for the RTP stream, which is where the media (audio) is transported. That means the SIP session can run just fine but if the RTP stream is blocked in one direction, the recipient of that stream will get no audio channel.
Since RTP flows over a UDP port there is no built in error correction, the sender just blindly spits out UDP packets without knowing if they are getting through or not. This makes it a little more mysterious.
Asterisk Variable
http://www.voip-info.org/wiki/view/Asterisk+Detailed+Variable+List
MySQL
When using MySQL you can turn on MySQL logging and watch the queries
SIP
When debugging calls you can turn on SIP debugging like this
sip set debug on
CDS Mikrotik router
Rules to enable Vastra (NUC)
add action=dst-nat chain=dstnat comment="Vastra" dst-address=107.135.132.129 dst-port=5060 protocol=udp to-addresses=192.168.2.234 to-ports=5060 add action=dst-nat chain=dstnat comment="Vastra RTP audio stream" dst-address=107.135.132.129 dst-port=10000-19999 protocol=udp to-addresses=192.168.2.234 to-ports=10000-19999
Rules to enable Vastra2
add action=dst-nat chain=dstnat comment="Vastra2 PBX" dst-address=107.135.132.129 dst-port=5060 protocol=udp to-addresses=192.168.2.235 to-ports=5060
add action=dst-nat chain=dstnat comment="Vastra2 RTP audio stream" dst-address=107.135.132.129 dst-port=10000-19999protocol=udp to-addresses=192.168.2.235 to-ports=10000-19999
Rules to MODIFY
set 0 to-addresses=192.168.2.235