[asterisk-users] Ready to throw up my hands in defeat

Steve Matzura sm at noisynotes.com
Mon May 22 17:40:10 CDT 2023


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:sm at noisynotes.com]
>
> Sent: Monday, May 22, 2023 12:15 PM
>
> To: TTT <lists at telium.io>
>
> 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 _NXXNXXXXXX
>
> handler will match the incoming call and create a loop
>
> include => voipms-inbound
>
> include => voipms-outbound
>
> [voipms-outbound]
>
> 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()
>
> ; 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:59 AM, TTT wrote:
>
> > 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.
>
> >
>
> > 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.
>
> >
>
> > 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.
>
> >
>
> > In general stay away from realtime (I assume that is the SQL reference)
>
> >
>
> >
>
> > -----Original Message-----
>
> > From: asterisk-users 
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve 
> Matzura
>
> > Sent: Monday, May 22, 2023 10:19 AM
>
> > To: Asterisk Users Mailing List - Non-Commercial Discussion 
> <asterisk-users at lists.digium.com>
>
> > Subject: [asterisk-users] Ready to throw up my hands in defeat
>
> >
>
> > 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.
>
> >
>
> >
>
> > 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.
>
> > I think I can manage that part. It's the initial SIP stuff that's 
> making me dizzy.
>
> >
>
> >
>
> > 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?
>
> >
>
> >
>
> > 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.
>
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20230522/1dfe7d26/attachment.html>


More information about the asterisk-users mailing list