<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
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;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><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">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 [mailto:sm@noisynotes.com] <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 <lists@telium.io><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 = sip:******@newyork6.voip.ms:5060<o:p></o:p></p><p class=MsoPlainText>server_uri = sip:newyork6.voip.ms:5060<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 = sip:******@newyork6.voip.ms<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 [mailto:asterisk-users-bounces@lists.digium.com] 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 <asterisk-users@lists.digium.com><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> </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>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Check out the new Asterisk community forum at: https://community.asterisk.org/<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> New to Asterisk? Start here:<o:p></o:p></p><p class=MsoPlainText>>        https://wiki.asterisk.org/wiki/display/AST/Getting+Started<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> asterisk-users mailing list<o:p></o:p></p><p class=MsoPlainText>> To UNSUBSCRIBE or update options visit:<o:p></o:p></p><p class=MsoPlainText>>     http://lists.digium.com/mailman/listinfo/asterisk-users<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>><o:p> </o:p></p></div></body></html>