<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>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.</p>
<p><br>
</p>
<p>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.</p>
<p>handle<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 5/22/2023 12:50 PM, TTT wrote:<br>
</div>
<blockquote type="cite"
cite="mid:01000188445ee1af-49b5c291-3f1d-41cd-836f-c8f8365726a0-000000@email.amazonses.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}.MsoChpDefault
{mso-style-type:export-only;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoPlainText">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.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">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 (<a
href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships"
moz-do-not-send="true" class="moz-txt-link-freetext">https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships</a>)
which explains it fairly well.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Please reply to the list only (so anyone
can jump in and benefit from the discussion too)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">From: Steve Matzura
[<a class="moz-txt-link-freetext" href="mailto:sm@noisynotes.com">mailto:sm@noisynotes.com</a>] <o:p></o:p></p>
<p class="MsoPlainText">Sent: Monday, May 22, 2023 12:15 PM<o:p></o:p></p>
<p class="MsoPlainText">To: TTT <a class="moz-txt-link-rfc2396E" href="mailto:lists@telium.io"><lists@telium.io></a><o:p></o:p></p>
<p class="MsoPlainText">Subject: Re: [asterisk-users] Ready to
throw up my hands in defeat<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">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.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I did make the "hello world" example
from the Asterisk wiki work. It was <o:p></o:p></p>
<p class="MsoPlainText">simple enough--lift the example right
out of the book, paste it into the <o:p></o:p></p>
<p class="MsoPlainText">appropriate files, install and configure
Zoipr, restart Asterisk, and <o:p></o:p></p>
<p class="MsoPlainText">it just worked. Good.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">So now I'm branching out, ready to add
my DID provider info and actually <o:p></o:p></p>
<p class="MsoPlainText">be able to call in from outside.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The following file contents come from my
DID provider, voip.ms. The only <o:p></o:p></p>
<p class="MsoPlainText">thing I added was my specific DID
registration info, which has been <o:p></o:p></p>
<p class="MsoPlainText">redacted here:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">pjsip.conf:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[transport-udp]<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">type = transport<o:p></o:p></p>
<p class="MsoPlainText">protocol = udp<o:p></o:p></p>
<p class="MsoPlainText">bind = 0.0.0.0<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms]<o:p></o:p></p>
<p class="MsoPlainText">type = registration<o:p></o:p></p>
<p class="MsoPlainText">transport = transport-udp<o:p></o:p></p>
<p class="MsoPlainText">outbound_auth = voipms<o:p></o:p></p>
<p class="MsoPlainText">client_uri =
<a class="moz-txt-link-freetext" href="sip:******@newyork6.voip.ms:5060">sip:******@newyork6.voip.ms:5060</a><o:p></o:p></p>
<p class="MsoPlainText">server_uri = <a class="moz-txt-link-freetext" href="sip:newyork6.voip.ms:5060">sip:newyork6.voip.ms:5060</a><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms]<o:p></o:p></p>
<p class="MsoPlainText">type = auth<o:p></o:p></p>
<p class="MsoPlainText">auth_type = userpass<o:p></o:p></p>
<p class="MsoPlainText">username = ******<o:p></o:p></p>
<p class="MsoPlainText">password = ******<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms]<o:p></o:p></p>
<p class="MsoPlainText">type = aor<o:p></o:p></p>
<p class="MsoPlainText">contact = <a class="moz-txt-link-freetext" href="sip:******@newyork6.voip.ms">sip:******@newyork6.voip.ms</a><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms]<o:p></o:p></p>
<p class="MsoPlainText">type = endpoint<o:p></o:p></p>
<p class="MsoPlainText">transport = transport-udp<o:p></o:p></p>
<p class="MsoPlainText">context = mycontext<o:p></o:p></p>
<p class="MsoPlainText">disallow = all<o:p></o:p></p>
<p class="MsoPlainText">allow = ulaw<o:p></o:p></p>
<p class="MsoPlainText">; allow=g729 ; uncomment
if you support g729<o:p></o:p></p>
<p class="MsoPlainText">from_user = ******<o:p></o:p></p>
<p class="MsoPlainText">auth = voipms<o:p></o:p></p>
<p class="MsoPlainText">outbound_auth = voipms<o:p></o:p></p>
<p class="MsoPlainText">aors = voipms<o:p></o:p></p>
<p class="MsoPlainText">; NAT parameters:<o:p></o:p></p>
<p class="MsoPlainText">rtp_symmetric = yes<o:p></o:p></p>
<p class="MsoPlainText">rewrite_contact = yes<o:p></o:p></p>
<p class="MsoPlainText">send_rpid = yes<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">*** NOTE: I left those lines in because
I am after all behind a home <o:p></o:p></p>
<p class="MsoPlainText">router so I thought I'd need it. ***<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms]<o:p></o:p></p>
<p class="MsoPlainText">type = identify<o:p></o:p></p>
<p class="MsoPlainText">endpoint = voipms<o:p></o:p></p>
<p class="MsoPlainText">match = newyork6.voip.ms<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Why so many stanzas all called 'voipms'?
I see that they all have <o:p></o:p></p>
<p class="MsoPlainText">different types, so why not have
everything in the same stanza?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Here's extensions.conf:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[mycontext]<o:p></o:p></p>
<p class="MsoPlainText">; Make sure to include inbound prior to
outbound because the _NXXNXXXXXX <o:p></o:p></p>
<p class="MsoPlainText">handler will match the incoming call and
create a loop<o:p></o:p></p>
<p class="MsoPlainText">include => voipms-inbound<o:p></o:p></p>
<p class="MsoPlainText">include => voipms-outbound<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms-outbound]<o:p></o:p></p>
<p class="MsoPlainText">exten =>
_1NXXNXXXXXX,1,Dial(PJSIP/${EXTEN}@voipms)<o:p></o:p></p>
<p class="MsoPlainText">exten => _1NXXNXXXXXX,n,Hangup()<o:p></o:p></p>
<p class="MsoPlainText">exten =>
_NXXNXXXXXX,1,Dial(PJSIP/1${EXTEN}@voipms)<o:p></o:p></p>
<p class="MsoPlainText">exten => _NXXNXXXXXX,n,Hangup()<o:p></o:p></p>
<p class="MsoPlainText">exten =>
_011.,1,Dial(PJSIP/${EXTEN}@voipms)<o:p></o:p></p>
<p class="MsoPlainText">exten => _011.,n,Hangup()<o:p></o:p></p>
<p class="MsoPlainText">exten =>
_00.,1,Dial(PJSIP/${EXTEN}@voipms)<o:p></o:p></p>
<p class="MsoPlainText">exten => _00.,n,Hangup()<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">; inbound context example for your DID
numbers, do not add the number 1 <o:p></o:p></p>
<p class="MsoPlainText">in front<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[voipms-inbound]<o:p></o:p></p>
<p class="MsoPlainText">exten => 3115552368,1,Answer() ; fake
DID number<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Now, I have the block of text from the
hello-world wiki:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[from-internal]<o:p></o:p></p>
<p class="MsoPlainText">exten = 100,1,Answer()<o:p></o:p></p>
<p class="MsoPlainText">same = n,Wait(1)<o:p></o:p></p>
<p class="MsoPlainText">same = n,Playback(hello-world)<o:p></o:p></p>
<p class="MsoPlainText">same = n,Hangup()<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">That's certainly clear enough.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">My question is, how do I connect the two
extensions.conf fragments? <o:p></o:p></p>
<p class="MsoPlainText">i.e., where's the routing from the
system answering the inbound connect <o:p></o:p></p>
<p class="MsoPlainText">request to the actions in the extension
100 statements?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The book talks a lot about registering
phones through SQL. Looking at <o:p></o:p></p>
<p class="MsoPlainText">pjsip.conf is a little bewildering--all
those '[6001]' examples. Which <o:p></o:p></p>
<p class="MsoPlainText">ones do I absolutely need? I have two
kinds of phones to register--one <o:p></o:p></p>
<p class="MsoPlainText">on my own LAN and one remote, presumably
coming in with NAT'ing and <o:p></o:p></p>
<p class="MsoPlainText">definitely behind its own firewall on
its own LAN.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 5/22/2023 10:59 AM, TTT wrote:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> There are lots of little
tweaks/adjustments overlooked in most guides/books. The
examples work most of the time, but even a small difference in
your environment might break them.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> I'm pretty sure the list will be
able to answer questions to help you figure it out. If you
break down your current problem into the basic step/task and
explain what's not working then you'll likely get a good
explanation.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> If you're not sure where to start,
just add one physical phone and a screaming monkeys entry in
the dialplan (lots of examples out there). If that' doesn't
work, post the CLI output with verbose turned up.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> In general stay away from realtime
(I assume that is the SQL reference)<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> -----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">> From: asterisk-users
[<a class="moz-txt-link-freetext" href="mailto:asterisk-users-bounces@lists.digium.com">mailto:asterisk-users-bounces@lists.digium.com</a>] On Behalf Of
Steve Matzura<o:p></o:p></p>
<p class="MsoPlainText">> Sent: Monday, May 22, 2023 10:19 AM<o:p></o:p></p>
<p class="MsoPlainText">> To: Asterisk Users Mailing List -
Non-Commercial Discussion
<a class="moz-txt-link-rfc2396E" href="mailto:asterisk-users@lists.digium.com"><asterisk-users@lists.digium.com></a><o:p></o:p></p>
<p class="MsoPlainText">> Subject: [asterisk-users] Ready to
throw up my hands in defeat<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> I am not comfortable with admitting
this on a public userlist [;-)] but after over forty years in
software development and manual-reading and -interpretation,
I've finally hit one that I can't get past.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> I've mention previously that I
worked with Asterisk in older days--like in around 2003--and
never had any trouble understanding what to do and how to do
it in order to make it work. I am attempting to build what's
probably the world's most basic system--one incoming trunk
from a DID provider going to one internal extension that
answers, plays a couple things, and possibly takes a message.
I'd also like to add two extensions with real physical
endpoints--phones--one local, one remote.<o:p></o:p></p>
<p class="MsoPlainText">> I think I can manage that part.
It's the initial SIP stuff that's making me dizzy.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> The book I am now
reading--"Asterisk, the Definitive Guide" by Madsen, Bryant
and Meggelin for Asterisk version 16-- assumes I have built an
implementation from source, and that includes SQL. There are
tons of references to SQL databases in the book which I
understand, but having installed Asterisk from a distribution
package, that component is not part of the installation, so I
am presumably expected to supply the information by manually
entering it into configuration files. I'm OK with doing that,
too. The part I'm having trouble with is that the samples in
the configuration files, particularly pjsip.conf, offer
several choices for some of the stanzas, like all the things
defining trunks and endpoints, and that's where I'm losing it.
The book makes it sound and look so easy--add a couple records
to a couple SQL tables according to your instruments and DID
providers, and it probably works just that smoothly and
easily. But how does one make these choices when one has to
manually edit these configurations and choose the one that at
least halfway looks like the SQL stuff in the book?<o:p></o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">><o:p> </o:p></p>
<p class="MsoPlainText">> I think I need a little
hand-holding and am willing to buy some from someone who has
the time and inclination to provide it. I'm a fast learner, I
record all such sessions, and I'm sure I can get what I need
in a couple hours, most likely less. if you're interested, or
know someone who is, please contact me off-list, with my
eternal thanks in advance.<o:p></o:p></p>
<p class="MsoPlainText">><o:p> <br>
</o:p></p>
</div>
<br>
</blockquote>
</body>
</html>