I haven't tried starting the daemon yet only because I wanted to verify
my pjsip and extensions stuff first before I started trying to debug
what I might not understand. I have a better handle on it all now. Will
post the results when I try it in just a few minutes.
Thankfully, the book does say SIP is deprecated in favor of PJSIP, so
I'm on board with understanding all that. Thanks for reminding me that
Google is my friend in this project, too.
handle
On 5/22/2023 12:50 PM, TTT wrote:
You don't say what happens when you start Asterisk, but I'll assume
your registration with your provider is failing. If you turn on SIP
debug from CLI you can watch your registration attempts, and see the
exact reason for failure. (eg: unreachable vs credentials). Post
that output into the list email if you aren’t sure what to make of it.
The numerous similar stanzas have to do with pjsip. Many of the older
examples/guides reference a simpler (deprecated) SIP stack, with
slightly different syntax. If you google PJSIP + Asterisk config
you'll send the purpose of all of those stanza's. PJSIP adds a lot of
complexity for the outlier use cases (99% of people don't need all of
PJSIP's capabilities) - but you have to fill it all in. There are
some nice diagrams here
(https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships)
which explains it fairly well.
Please reply to the list only (so anyone can jump in and benefit from
the discussion too)
-Original Message-
From: Steve Matzura [mailto:s...@noisynotes.com]
Sent: Monday, May 22, 2023 12:15 PM
To: TTT
Subject: Re: [asterisk-users] Ready to throw up my hands in defeat
Thanks. Further reading and digging did in fact prove out that the RTP
is a lot of what's been throwing me. I won't bother with that any longer.
I did make the "hello world" example from the Asterisk wiki work. It was
simple enough--lift the example right out of the book, paste it into the
appropriate files, install and configure Zoipr, restart Asterisk, and
it just worked. Good.
So now I'm branching out, ready to add my DID provider info and actually
be able to call in from outside.
The following file contents come from my DID provider, voip.ms. The only
thing I added was my specific DID registration info, which has been
redacted here:
pjsip.conf:
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
[voipms]
type = registration
transport = transport-udp
outbound_auth = voipms
client_uri = sip:**@newyork6.voip.ms:5060
server_uri = sip:newyork6.voip.ms:5060
[voipms]
type = auth
auth_type = userpass
username = **
password = **
[voipms]
type = aor
contact = sip:**@newyork6.voip.ms
[voipms]
type = endpoint
transport = transport-udp
context = mycontext
disallow = all
allow = ulaw
; allow=g729 ; uncomment if you support g729
from_user = **
auth = voipms
outbound_auth = voipms
aors = voipms
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes
*** NOTE: I left those lines in because I am after all behind a home
router so I thought I'd need it. ***
[voipms]
type = identify
endpoint = voipms
match = newyork6.voip.ms
Why so many stanzas all called 'voipms'? I see that they all have
different types, so why not have everything in the same stanza?
Here's extensions.conf:
[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXX
handler will match the incoming call and create a loop
include => voipms-inbound
include => voipms-outbound
[voipms-outbound]
exten => _1NXXNXX,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _1NXXNXX,n,Hangup()
exten => _NXXNXX,1,Dial(PJSIP/1${EXTEN}@voipms)
exten => _NXXNXX,n,Hangup()
exten => _011.,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(PJSIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1
in front
[voipms-inbound]
exten => 3115552368,1,Answer() ; fake DID number
Now, I have the block of text from the hello-world wiki:
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
That's certainly clear enough.
My question is, how do I connect the two extensions.conf fragments?
i.e., where's the routing from the system answering the inbound connect
request to the actions in the extension 100 statements?
The book talks a lot about registering phones through SQL. Looking at
pjsip.conf is a little bewildering--all those '[6001]' examples. Which
ones do I absolutely need? I have two kinds of phones to register--one
on my own LAN and one remote, presumably coming in with NAT'ing and
definitely behind its own firewall on its own LAN.
On 5/22/2023 10:5