Re: [asterisk-users] Expanding my answering-machine system
Sorry, Joshua, I don't understand. One's a filename, one's an extension number. How are they the same? In other words, why would 'enter-ext-of-person' be considered a filename? I would think 'enter-ext-of-person' would be an extension number. On 6/17/2023 7:27 PM, Joshua C. Colp wrote: On Sat, Jun 17, 2023 at 7:48 PM Steve Matzura wrote: OK, this is how I thought it's supposed to work. It just confounded me why the book would say the Playback() and Background() syntax were the same, then in the very next paragraph give an example that belied that claim. The syntax is the same. They both take a filename. The example gave a filename of "enter-ext-of-person". You could pass that to Playback, though you would be unable to enter an extension. -- Joshua C. Colp Asterisk Project Lead Sangoma Technologies Check us out at www.sangoma.com <http://www.sangoma.com> and www.asterisk.org <http://www.asterisk.org> -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Expanding my answering-machine system
OK, this is how I thought it's supposed to work. It just confounded me why the book would say the Playback() and Background() syntax were the same, then in the very next paragraph give an example that belied that claim. On 6/17/2023 1:46 PM, Doug Lytle wrote: On 6/17/23 08:47, Steve Matzura wrote: Both Background() and WaitExten() allow the caller to enter DTMF digits. Asterisk then attempts to find an extension in the current context that matches the digits that the caller entered. If Asterisk finds a match, it will send the call to that extension. My question then is, is "*" a valid exension, as in: I'd have to assume yes. I don't use WaitExten() and I set autofallthrough=no in the /etc/asterisk.conf, since that is the way I've always expected Asterisk to work; my dialplan examples are based on that. The below example shows a call coming into a DID, playing background prompts and excepting input during play. ; ;* Auto attendant ; exten => 5175551212,1,Gosub(check-blacklist,s,1) same => n,Gosub(check-hours,s,1) same => n,Gosub(holiday-check,s,1) same => n,Gosub(get-callerid,s,1) same => n,Goto(auto-attend,s,1) [auto-attend] include => dial-by-extension ;* ;* Set timeouts ;* exten => s,1,Set(TIMEOUT(response)=8) same => n,Set(TIMEOUT(digit)=2) same => n,Set(LOOPCOUNT=0) same => n,GotoIf($["${Holiday}" = "YES"]?HOLIDAY:BEGIN) same => n(BEGIN),Answer() same => n,Wait(1) ; ;* Play the 'Welcome message' and office hours message ; same => n,Background(${voice}/welcome) same => n,Background(${voice}/business_hours) same => n,Background(${voice}/8am_5pm) same => n(HOLIDAY),Background(${voice}/dial_anytime) same => n(DIRECTORY),Background(${voice}/directory_assist) same => n,Background(${voice}/press_1) same => n,Background(${voice}/to_ring_after_hours) same => n,Background(${voice}/press_2) same => n,Background(${voice}/absence_delay) same => n,Background(${voice}/press_3) ; ;* If 1 is pressed, go to Dial by name ; exten => 1,1,Goto(directory,s,1) ;*** ;* If 2 is pressed, dial the Foyer phone ;*** exten => 2,1,Goto(dial-by-extension,4255,1) ;*** ;* If 3 is pressed, dial absence/delay extension ;*** exten => 3,1,Gosub(cellphone-callerid,s,1) exten => 3,n,Voicemail(3888@sip,us) exten => 3,n,Hangup() ; ;* If 8# is pressed, go to Voicemail Main menu ; exten => 8#,1,VoiceMailMain(@sip) exten => 8#,2,Hangup() This is not the complete dialplan; I also have error checking and a loop counter. Doug -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Expanding my answering-machine system
Doug, This is where the weeds start growing. On 6/17/2023 4:55 AM, Doug Lytle wrote: For both capabilities, you can use Background() instead of Playback() for audio prompts. Background() allows for interrupting the prompts and continue on with your dialplan. Understood. From the book: The most common use of the Background() application is to create basic voice menus (often called auto attendants, IVRs , 9 or phone trees ). But now, the confusion: Background() has the same syntax as Playback() : [TestMenu] exten => start,1,Answer() same => n,Background(enter-ext-of-person) Stop right there. The syntax of Playback() is Playback(filename), there's no extension number. More book: Both Background() and WaitExten() allow the caller to enter DTMF digits. Asterisk then attempts to find an extension in the current context that matches the digits that the caller entered. If Asterisk finds a match, it will send the call to that extension. My question then is, is "*" a valid exension, as in: exten => *,VoicemailMain() -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Expanding my answering-machine system
You all know the story--give the customer/client what they ask for, and if they like it, they'll be back for more. Such is just so with my one-trick-pony answering-machine project. Now the other two musicians in my virtual band want the following capabilities: 1. The ability to dial the main number from outside our three-party network and hit a button, like 1, 2 or 3, while the outgoing message is playing which will ring one of the parties now in the system. Alternatively, press a button and have everybody's phone ring and someone will eventually pick up in their studio. 2. Check voicemail remotely when not on the local network with a phone connected to the system. This is emminently doable and well described on how to do it in my book, but I have a question about how to invoke the VoicemailMain() function while the outgoing message is playing. Is it as easy as creating an extension whose number is "#" and send that to VoicemailMain()? As always, thanks in advance for a kick in the right direction. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Adding Voicemail to My System
I'm setting up voicemail on my answering-machine project. Since the directory for voicemail messages for an extension doesn't exist until there's a message to be saved therein, how can I create a custom greeting since it goes in that directory? That's what it sounds like the book is telling me anyway. Also, how do I tell the Voicemail() application to play a custom greeting? I don't mean one I can create with VoicemailMain; I mean to play a prepared file, or possibly have no greeting at all, with the greeting message actually being contained in the message played in the Play() application. It doesn't matter which way I do it, I'm just trying to figure out how to do one or the other, whichever is the right way. And one more, if I don't want voicemail messages to be sent out by email, how do I suppress this? It seems that the default is to send the email, but there's no option I could found that lets me say no, don't send. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Question on ring count on incoming circuits
On 5/28/2023 2:27 PM, Naveen Albert wrote: However, you can also pass audio without supervising (early media). You typically need to Progress() first to allow this, e.g. for SIP, or audio won't pass at all. ... If you want it to ring once and do something else, you could simply do: exten => s,1,Wait(6) ; 1 ring cycle is 6 seconds same => n,Answer(); answer, and do something else Just as you said at the top of this reply, no audio of any kind gets passed, so all the Wait(6) did was provide six seconds of dead-air silence before the outgoing message played. Oh well. Customers can't have everything. ;-) -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Question on ring count on incoming circuits
Who controls how many times an incoming call from an external (DID) provider will ring before Asterisk picks up the call and handles it internally--the provider or Asterisk? If it's the DID provider, I'll work on that with them; if it's Asterisk, I didn't find anything anywhere that looks like it has anything to do with incoming ring count unless you set up a ring-no-answer system. For my purposes, that would mean defining a dummy extension that has no hardware attached to it that would fail over to my current call handling code after it rings once. Is this the proper method for handling this? You might wonder why I wouldn't want a call to a system that simply plays a message and then takes an optional voicemail message to pick up immediately. Short answer: Don't ask (groan). It's what the project supporter wants, presumably so that the person calling into the system will know their call went through and to be ready to hear the outgoing message, I don't know, it's a customer request so I feel duty-bound to figure it out and implement it. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] A stupid problem with Playback
On 5/28/2023 6:19 AM, aster...@phreaknet.org wrote: A great reason to avoid Asterisk packages and compile from source instead. You'll save yourself a lot of headaches. That's how I started, by trying to build version 18 from source. It failed. Colossally. The compile of sources would run for a while, then the machine would crash spectacularly--I mean, not just hang or reboot. It actually turned itself off. I tried it several times, and each time it failed in the same way, but at a different spot in the compile process. If ever I could figure out a way to trace that one down, I would. It was the strangest thing. This sounds like your machine is defective in some major way. Granted, compiling software is pretty intensive, but your machine shouldn't just crash. I would try to figure that out. Is this a VM / bare metal? Have you tried this on another machine? It's probably eight or nine years old now, an ASRock motherboard with I don't even know what on it in the way of processor speed or power. I should probably pick up another machine but I can't justify the expense because it's only for play, FTP, and running this Asterisk project, which is complete enough now that I don't have to mess with it any more. Who knows--it might even wind up on a spare Raspberry Pi 4, in which case this whole tower can just go away. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] A stupid problem with Playback
On 5/27/2023 11:40 AM, aster...@phreaknet.org wrote: Relative paths are relative to your language-specific directory. Ya know, that's the one thing I didn't do was test Playback before copying the sound files out of /usr/share/asterisk/sounds/en_us into /var/lib/asterisk/sounds--I don't even know for sure that hello-world was playing from the /var path and not the /usr path. Good idea to test that and see what's really going on. I think I set too much store by these books sometimes. But when that's all I have, I tend to go with what I know, and if the book is all I know ... well ... A great reason to avoid Asterisk packages and compile from source instead. You'll save yourself a lot of headaches. That's how I started, by trying to build version 18 from source. It failed. Colossally. The compile of sources would run for a while, then the machine would crash spectacularly--I mean, not just hang or reboot. It actually turned itself off. I tried it several times, and each time it failed in the same way, but at a different spot in the compile process. If ever I could figure out a way to trace that one down, I would. It was the strangest thing. So I gave up trying to build from source and went to the distro. Truth to tell, I'd rather have been able to build it from source because then I could follow my book more closely, and I enjoy and am familiar with working with SQL. I understood perfectly what the book was telling me to do and how it would all integrate with configuring Asterisk. Very strange indeed. Maybe I'll try a later version and see what happens. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] A stupid problem with Playback
Acording to the book, I'm supposed to put things into what Asterisk thinks is its default audio file location, /var/lib/asterisk/sounds, and I'm supposed to be able to create a custom directory off of that path and use it in a relative-syntax way in the Playback directive, like so: ... same => n,Playback(mysounds/mygreeting) I'm here to tell ya, it doesn't work on my system. However, if I write: same => n,Playback(/var/lib/asterisk/sounds/mydir/mygreeting) it works fine. Where is the default directory defined? I search every configuration file and found no such definition. And then there was this: When I finally got my system working after all the connectivity and extension-not-found and endpoint-not-found nonsense straightened out, I of course tried the hello-world standard startup test. It didn't work. Why? Because when you install Asterisk version 16 from the Debian distro site, you don't get the core sounds, and when you do install the core sounds package, they don't get put into /var/lib/asterisk/sounds. Oh no--they get put into /usr/share/asterisk/sounds. In there, I found several directories such as 'en' and 'en_us'. I copied the files from the en_us directory into /var/lib/asterisk/sounds and hello-world worked fine. So then I created a custom directory and put my own things in it, changing the Playback statement to the first one above, and it failed. I have to specify the full path instead of using the relative syntax version thereof. This is technically not a problem, more just a curiosity as to why it didn't work the way I thought it's supposed to. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Problems solved
I wouldn't mind using SIP with voip.ms if it worked right. I'll try it again changing what needs changing, but for now, I'm not conducting any secure communications, so I'll worry about it when things break. On 5/27/2023 11:20 AM, aster...@phreaknet.org wrote: IAX2 tends to work really well for trunking. Unlike SIP, it usually just works, although it tends to be more a niche use case. For this reason, IAX2 has long been a controversial technology; most people seem to either love it or hate it. Obviously, you can guess what my bias is. The only downside in your case is voip.ms's IAX2 stack (whether Asterisk or something else) does not support encryption, and it does not appear they have plans to support it. If you don't mind that, it shouldn't be an issue. voip.ms is also the only major VoIP provider that supports IAX2, so if you do anything else you'll probably have to use SIP. On 5/27/2023 10:23 AM, Steve Matzura wrote: Sean, I'll take that under advisement, but Doug swears by IAX, I tried it, it worked, so until things break and break bad, I'll stick with that and try the recommended remedy, now recommended by two people. On 5/26/2023 8:08 PM, Sean Bright wrote: On 5/26/2023 5:41 PM, Steve Matzura wrote: Doug from this list got me to change my connectivity to my DID provider from SIP to IAX, and bingo, it all just worked instantly. Looking over your previous messages and the error you were receiving (the one referring to extension 's') it looks like you had your VoIP.ms account setting incorrectly configured. There is a "Device type" dropdown that needs to be set to "IP PBX Server, Asterisk, or Softswitch." If instead it is set to "ATA device, IP Phone or Softphone" (the default) then it will be sent to the 's' extension instead of the DID one. I captured a screenshot¹ from my account. I created a VoIP.ms account, acquired a DID, copy/pasted the VoIP.ms configuration samples², substituted my SIP Account User ID and passwords, restarted Asterisk, and everything worked as expected. I would never recommend new installs use IAX2, so if you envision this moving beyond the toy/PoC stage I suggest you giving PJSIP another go. Kind regards, Sean 1. https://seanbright.com/voipms.png 2. https://wiki.voip.ms/article/Asterisk_PJSIP -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Problems Solved, two left
Thanks, Daryl. I fixed this before I saw this message by changing my connectivity from SIP to IVR/IAX on voip.ms's Manage DID Numbers page. I'll keep this one in my notes, though, should I ever do this again with SIP. On 5/26/2023 7:42 PM, Daryl Richards wrote: On 2023-05-23 7:22 p.m., Steve Matzura wrote: And I think they're both small. [May 23 18:34:12] NOTICE[46582]: res_pjsip_session.c:3968 new_invite: voipms: Call (UDP:208.100.60.12:5060) to extension 's' rejected because extension not found in context 'voipms-inbound'. Steve, In your voip.ms console, go to Account Settings -> Inbound Settings, and set Device Type to "IP PBX Server..." instead of "ATA device..." This will fix the 's' instead of the number. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Problems solved
Sean, I'll take that under advisement, but Doug swears by IAX, I tried it, it worked, so until things break and break bad, I'll stick with that and try the recommended remedy, now recommended by two people. On 5/26/2023 8:08 PM, Sean Bright wrote: On 5/26/2023 5:41 PM, Steve Matzura wrote: Doug from this list got me to change my connectivity to my DID provider from SIP to IAX, and bingo, it all just worked instantly. Looking over your previous messages and the error you were receiving (the one referring to extension 's') it looks like you had your VoIP.ms account setting incorrectly configured. There is a "Device type" dropdown that needs to be set to "IP PBX Server, Asterisk, or Softswitch." If instead it is set to "ATA device, IP Phone or Softphone" (the default) then it will be sent to the 's' extension instead of the DID one. I captured a screenshot¹ from my account. I created a VoIP.ms account, acquired a DID, copy/pasted the VoIP.ms configuration samples², substituted my SIP Account User ID and passwords, restarted Asterisk, and everything worked as expected. I would never recommend new installs use IAX2, so if you envision this moving beyond the toy/PoC stage I suggest you giving PJSIP another go. Kind regards, Sean 1. https://seanbright.com/voipms.png 2. https://wiki.voip.ms/article/Asterisk_PJSIP -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Problems solved
Doug from this list got me to change my connectivity to my DID provider from SIP to IAX, and bingo, it all just worked instantly. For my next trick: setting up voicemail. The book does it all with smoke and mirrors (SQL), but I'm fresh outa those, so I'll be doing it the old-fashioned way, by editing the voicemail.conf and users.conf files with some hopefully helpful hints from our friends at ChatGPT. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Problems Solved, Two Remaining
This was supposed to go to the list. I am now thoroughly confused. In the [voipms] stanza where endpoint is defined (type=endpoint), everything points to voipms. But in the [yealink] stanzas, I tried pointing everything to Steve, one item at a time, then both of them, and nothing changed. On 5/24/2023 10:00 AM, Stefan Tichy wrote: block quote Am Wed, May 24, 2023 at 09:40:18AM -0400 schrieb Steve Matzura: block quote On 5/24/2023 7:49 AM, Stefan Tichy wrote: block quote Am Tue, May 23, 2023 at 07:22:22PM -0400 schrieb Steve Matzura: block quote 1. Still can't register my phone The username and password are correct. I don't know what else to try. block quote end You can start a sip trace from the asterisk console. REGISTER sip:192.168.1.185:5060 SIP/2.0 block quote end block quote end block quote block quote Authorization: Digest username="Steve", realm="asterisk", [May 24 09:26:13] NOTICE[47903]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from .' - No matching endpoint found block quote end block quote end In the endpoint section there is a parameter identify_by (default: "username,ip"). "username" means, the the from-user is used. Use "yealink" or "Steve" for both user names. Using different names for a phone make it just more complicated. You might have to change the phone configuration. block quote [yealink] type = aor contact = sip:Steve@192.168.1.185 block quote end There should be no "contact" parameter for a phone. The phone sends the required information with the register request. block quote end -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Problems Solved, two left
And I think they're both small. Solved: tcpdump showed no packets coming in, so I went to my DID provider's Website to discover to my intense embarrassment that the DID number had been set up forwarded to their voicemail. I got egg on my face for this one. I changed that setting to SIP/IAX and packets now arrive and go where they should. Two problems remain. 1. Still can't register my phone The username and password are correct. I don't know what else to try. 2. Asterisk can't find the extension in my inbound context. [May 23 18:34:12] NOTICE[46582]: res_pjsip_session.c:3968 new_invite: voipms: Call (UDP:208.100.60.12:5060) to extension 's' rejected because extension not found in context 'voipms-inbound'. I changed the name of the context in pjsip's to 'voipms-inbound' and removed reference to '[mycontext]' from pjsip.conf and extensions.conf as they were superfluous. The endpoint section of pjsip.conf now reads: [voipms] type = endpoint transport = transport-udp context = voipms-inbound ... The bottom part of extensions.conf (with the phone number obfuscated) is now: [voipms-inbound] exten => 3115552368,1,Goto(hello,200,1) [phones] exten => 101,1,Dial(PJSIP/yealink) [hello] exten => 200,1,Answer() same => n,Playback(hello-world) same => n,Hangup() The idea was for any inbound call to the public network number to immediately go to extension 200, play the message and hang up, and you could still call extension 200 to here it from inside. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Problems with inbound connection and registering phone
I have two problems. The first is that when I dial my number from a phone on the Internet or any phone outside my LAN, Asterisk does not respond in any way, which means somehow my system is not picking up the fact that there's an incoming call to it. The second problem is that I thought I'd try an internal phone to see if I could get the hello-world stuff working at the least. I thought I'd try Zoiper, but none of the download buttons at https://www.zoiper.com/en/voip-softphone/download/current did anything when clicked, so I set up a spare line on a Yealink TA33 phone that is connected to another much much older Asterisk implementation running a piece of amateur radio gear called Allstar. The version of Asterisk used in the Allstar project is ancient--like 1.4 or 1.6--and the configuration syntax and options are quite different, so I didn't get lulled into thinking I'd just clone that configuration on my newer Asterisk implementation. The "Definitive Guide" shows everything about adding phones as SQL statements, so I made some educated guesses as to what to put into pjsip.conf. Something's obviously wrong because the phone won't authenticate (see below). Here's how I set it up in pjsip. [yealink] transport=udp type=auth auth_type=userpass username=Steve password=Steve [yealink] type = endpoint transport = transport-udp context = phones disallow = all allow = ulaw ; allow=g729 ; uncomment if you support g729 auth = yealink aors = yealink Here's how I set it up in extensions: [phones] exten => 101,1,Dial(PJSIP/yealink) Here's the error I get on the Asterisk console: [May 23 13:42:56] NOTICE[45189]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '"Steve" ' failed for '192.168.1.228:5060' (callid: 0_1554187534@192.168.1.228) - Failed to authenticate What did I omit? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Ready to throw up my hands in defeat
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:59 AM, TTT wrote: > There are lots of little tweaks/adjustments overlooked in most guides/books.
[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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] TLS and NAT
Thanks, Michael. A few questions: Is [transport_name] a reserved word, or am I supposed to replace it with a name of my own, like '[did-transport]'? Some of the keywords I haven't seen before. Is ca_list_file supposed to be an aggregate of the public and private key? And what are the 'method,' 'tos' and 'cos' keywords, which are commented out in your instructions? Otherwise, the rest is quite clear. On 4/8/2023 12:35 PM, Michael Maier wrote: Hello Steve, use the following configuration for the transport and bind this transport to the trunk: [transport_name] type=transport protocol=tls bind=192.168.13.24 ; your bind IP ca_list_file=/etc/pki/tls/certs/ca-bundle.crt ; method=tlsv1_2 verify_server=yes allow_reload=no ;tos=0xb8 ;cos=3 external_media_address=your.ext.host.name ; hostname pointing to your ext. IP external_signaling_address=your.ext.host.name ; hostname pointing to your ext. IP local_net=192.168.0.0/24 # your local net Regards Michael On 07.04.23 at 17:25 Steve Matzura wrote: I want to configure communication with my phone provider using TLS for all the obvious reasons. Since I'm behind a firewall, I'll be needing to do it with NAT. There are examples of UDP plus NAT in pjsip.conf, but none for TLS plus NAT. Would it be correct to set up the TLS transport stanza to look like the [transport-udp-nat] stanza example, replacing UDP with TLS in lines like 'transport=tls' and 'protocol=tls', and including the lines for local_net, external_media_address and external_signaling_address? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] TLS and NAT
I want to configure communication with my phone provider using TLS for all the obvious reasons. Since I'm behind a firewall, I'll be needing to do it with NAT. There are examples of UDP plus NAT in pjsip.conf, but none for TLS plus NAT. Would it be correct to set up the TLS transport stanza to look like the [transport-udp-nat] stanza example, replacing UDP with TLS in lines like 'transport=tls' and 'protocol=tls', and including the lines for local_net, external_media_address and external_signaling_address? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Intro and question
Sorry, meant version 16, like the book. Sure would prefer 20. On 4/6/2023 3:30 PM, Steve Matzura wrote: It appears I have bigger problems heretofore unknown. I've gone through this several times today since I last wrote, and the phreaknet-run build failed every time, but each time at a different point. The failure manifestation was always the same--during either a compile or link of some module, a different one each time, my entire system turned itself off, which to me means there is either a memory fault which is causing the whole thing to dump, or I have a hidden hardware problem I'll probably never find. I'm just going to have to go back to the original Debian-supplied version 18 installation and live with its limitations until such time as I can get another system to try building on, or something about the machine I have shows itself and can be fixed. On 4/6/2023 12:34 PM, Antony Stone wrote: On Thursday 06 April 2023 at 18:29:43, Jeff LaCoursiere wrote: If you just want something easy to use out of the box, install the FreePBX distro. Given that Steve originally said "I've been using Asterisk, including administering and maintaining it, in some aspect since 2003, but this is the first time I have attempted a from-scratch installation and setup on my own." I got the impression that he was not so much looking for something easy to use, but rather looking forward to learning about how to "do Asterisk" for himself. Antony. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Intro and question
It appears I have bigger problems heretofore unknown. I've gone through this several times today since I last wrote, and the phreaknet-run build failed every time, but each time at a different point. The failure manifestation was always the same--during either a compile or link of some module, a different one each time, my entire system turned itself off, which to me means there is either a memory fault which is causing the whole thing to dump, or I have a hidden hardware problem I'll probably never find. I'm just going to have to go back to the original Debian-supplied version 18 installation and live with its limitations until such time as I can get another system to try building on, or something about the machine I have shows itself and can be fixed. On 4/6/2023 12:34 PM, Antony Stone wrote: On Thursday 06 April 2023 at 18:29:43, Jeff LaCoursiere wrote: If you just want something easy to use out of the box, install the FreePBX distro. Given that Steve originally said "I've been using Asterisk, including administering and maintaining it, in some aspect since 2003, but this is the first time I have attempted a from-scratch installation and setup on my own." I got the impression that he was not so much looking for something easy to use, but rather looking forward to learning about how to "do Asterisk" for himself. Antony. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Intro and question
Anthony, No, I had no intention of doing any of those things, for I know not what they are or why I would need or want to be doing them. Maybe I should have just stuck with the original idea of installing from Debian distro. I'm exploring the phreaknet option now. If I come up with a running system, I'm just going to leave it that way and work with it as it is. On 4/6/2023 10:35 AM, Antony Stone wrote: On Thursday 06 April 2023 at 15:48:24, Steve Matzura wrote: this is the first time I have attempted a from-scratch installation and setup on my own. .. Then the weeds started to appear, and I was off into them. The first was the mention of Alembic. Reading on, I found this, regarding an SQL database: SQL? Database? Where ... what ... Thanks in advance for any assistance. Well, my first question would be "are you intending to use Asterisk Realtime features (ie: configurations in database tables instead of text files) in this installation?" If you are, then you do need to install a few more packages on your Debian system, but if not, then there is no reason to pay any attention at all to anything to do with Alembic, Realtime, SQL etc. Antony. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Intro and question
I've been using Asterisk, including administering and maintaining it, in some aspect since 2003, but this is the first time I have attempted a from-scratch installation and setup on my own. I'm following the instructions in the ePub edition of the book "Asterisk, the Definitive Guide, Fifth Edition," published by O’Reilly Media, Inc. in 2019, for Asterisk version 16 on a fresh install of Dedbian 11.6 (Bull's Eye). Backround: In Chapter 3, "Installing Asterisk," in the section "Asterisk Packages," the book says, and I quote from the ePub: There are Asterisk packages that can be installed using package management systems such as yum or apt-get . You are encouraged to use them once you are familiar with Asterisk. So, thinking I was familiar enough with the product, I indeed used aptp[get to install. # apt-get install asterisk I got lots of dependencies, plus the core, everything went swimmingly, no errors. In a minute or two, I had Asterisk 1:16.28.0~dfsg-0+deb11u2. Great. A little further along down the book, there's an "Initial Configuration" section detailing some changes to modules.conf and logger.conf, and a few ownership change commands to certain files and directories. All went exactly according to the documentation. Then the weeds started to appear, and I was off into them. The first was the mention of Alembic. This was not installed as part of the apt-get installation mentioned above, but I expected whatever Alembic could do, I could do manually, it'd just take longer and be more tedious. NO problem. I'd get through it. Reading on, I found this, regarding an SQL database: Log into the database now, and review all the tables that have been created: SQL? Database? Where ... what ... I got no SQL when I installed from the Debian package management system, nor was there any mention of it in the book with regard to complete package installation. Come to think of it, on some of the old implementations on which I'd worked in the past, I don't remember seeing SQL as a part thereof. Time to put the brakes on, find out what's going on, or what I did wrong. So, my question is, what is the correct approach to supplementing or correcting the standard Debian package installation, or if there isn't one, should I remove what I installed and stqart over, or even deeper, re-generate the Debian system (which I can do in less than fifteen minutes) and build from sources according to the book? Thanks in advance for any assistance. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users