Calling my pbx gives a busy tone

PBX registered with voip.ms. Cant figure out why but cant reach outside world and outside world can reach us. endpoint can reach each other.

[demo]
exten => 6001,1,Dial(PJSIP/6001,20)
exten => 6001,n,Hangup

exten => 7001,1,Dial(PJSIP/7001,20)
exten => 7001,n,Hangup

exten => 8001,1,Dial(PJSIP/8001,20)
exten => 8001,n,Hangup

exten => 4001,1,Dial(PJSIP/4001,20)
exten => 4001,n,Hangup

[in-out]
include => incoming
include => outcoming

[incoming]
exten => 5794800174,1,Answer()

[outcoming]
exten => _1NXXNXXXXXX,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(PJSIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()

thanks

witch context are the inside/outside accounts configured to use

[voipms]
type = endpoint
transport = transport-udp-nat
context = in-out
disallow = all
allow = ulaw
from_user = 338929_test
auth = voipms
outbound_auth = voipms

your voipms account can only call out
that should only point to a context that can reach you internal phones

That is dangerously insecure! Incoming external calls, which aren’t authenticated (if you are trying to authenticate voip.ms, that will be enough to break incoming calls - please stop feeding us your configuration in dribs and drabs; we need it all) - are an invitation to toll fraud. demo is unreachable for incoming calls. There is no information to say whether anything is reachable from local devices.

You will need a type=identify, or is that another drib or drab.

As you have no aors, you won’t be able to make outgoing calls.

You incoming context will answer and then immediately hang up as a result of falling off the end of the dialplan.

Please don’t start multiple threads for what is basically the same problem (initial configuration).

thanks. I follow the documentation provided by voip.ms. https://wiki.voip.ms/article/Asterisk_PJSIP

Do you have something better to suggest ?

I guess they assume you know how to use contexts. The inbound one is incomplete. I guess they assume that that is obvious, and all they are really doing is showing you how to match the “DID”. The outbound being included in the context for voip.ms is still dangerous. Unfortunately ITSP’s really don’t put much thought into these sample configurations; most of the chan_sip ones are poorly done.

You don’t need the 10000@ in the contact URI.