Hello Asterisk community,
I am new to Asterisk and I am having trouble making calls using a softphone on my computer with my remote Asterisk server. I have successfully set up a standard Asterisk server and can make calls from the CLI on the server itself.
To configure a standard Asterisk server setup, I used the configuration details provided to me by my third-party VoIP provider.
Below is my configurations for sip.conf, extensions.conf and the Asterisk CLI output for `sip show peers`, as well as commands and output when making a call using Asterisk CLI and my computer softphone.
sip.conf:
[373046-100]
host=pbx.zadarma.com
insecure=invite,port
type=peer
fromdomain=pbx.zadarma.com
disallow=all
allow=alaw
allow=ulaw
dtmfmode=auto
secret=***
defaultuser=373046-100
trunkname=373046-100
fromuser=373046-100
callbackextension=373046-100
context=zadarma-in
qualify=400
directmedia=no
nat=force_rport,comedia
[101] ;the Asterisk extension number
secret=***
host=dynamic
type=peer
context=zadarma-out
;my own configuraiton added to connect softphone to this asterisk server
[andy]
type=friend
username=andy
host=dynamic
context=zadarma-in
extensions.conf:
[zadarma-in]
exten => 373046-100,1, Dial(SIP/101) ; all incoming calls from trunk 373046-100 are routed to extension number 101
[zadarma-out]
exten => _XXX,1,Dial(SIP/${EXTEN}) ; calls to 3-digit extension numbers of Asterisk
exten => _XXX.,1,Dial(SIP/${EXTEN}@373046-100) ; calls to numbers with 4 digits or more using the trunk 373046-100
Output from `sip show peers` command:
ubuntu-hel1-ast*CLI> sip show users
Username Secret Accountcode Def.Context ACL Forcerport
andy zadarma-in No Yes
ubuntu-hel1-ast*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
101 (Unspecified) D Auto (No) No 0 Unmonitored
373046-100/373046-100 xxx.xx.xxx.xxx Yes Yes 5060 OK (21 ms)
andy/andy yyy.yyy.yy.yy D Auto (Yes) No 20000 Unmonitored
3 sip peers [Monitored: 1 online, 0 offline Unmonitored: 1 online, 1 offline]
ubuntu-hel1-ast*CLI>
With this configuration I am able to establish a call to any mobile/handset device using Asterisk server’s CLI:
Connected to Asterisk 18.10.0~dfsg+~cs6.10.40431411-2 currently running on ubuntu-hel1-ast (pid = 10537)
ubuntu-hel1-ast*CLI> channel originate SIP/373046-100/+447XXXXXXXXX extension 101
== Using SIP RTP CoS mark 5
-- Called 373046-100/+447XXXXXXXXX
-- SIP/373046-100-00000000 is making progress
ubuntu-hel1-ast*CLI> channel request hangup all
Requested Hangup on channel 'SIP/373046-100-00000000'
ubuntu-hel1-ast*CLI>
However, when I try to establish a call from the softphone on my computer it fails to make a call. Here is the output from Asterisk’s CLI when I attempt this:
Connected to Asterisk 18.10.0~dfsg+~cs6.10.40431411-2 currently running on ubuntu-hel1-ast (pid = 11137)
== Using SIP RTP CoS mark 5
[Mar 14 14:25:45] NOTICE[11185][C-00000003]: chan_sip.c:26824 handle_request_invite: Call from 'andy' (yyy.yyy.yy.yy:20000) to extension '+447XXXXXXXXX' rejected because extension not found in context 'zadarma-in'.
[Mar 14 14:26:00] WARNING[11185]: chan_sip.c:4151 retrans_pkt: Retransmission timeout reached on transmission K~iuVezjBJ for seqno 20 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
ubuntu-hel1-ast*CLI>
I would appreciate any help or guidance on how to troubleshoot this issue and successfully make calls using my computer’s voip softphone.
Thank you!