Re: [asterisk-users] Alternative to Local channel
On Wed, 16 Aug 2023, Federico wrote: But now I upgraded to Asterisk18 and there is no longer a local channels Are app_originate.so and res_clioriginate.so loaded? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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 Sun, 28 May 2023, Steve Matzura wrote: 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. A '4 is probably way more than you need. A Pi Zero W or a Pi Zero 2 W would probably do. ($15 plus case and spare USB wall wart.) You may be able to justify the expense just on power savings. (Electricity in San Diego is $0.51/kWh.) -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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 with inbound connection and registering phone
On Tue, 23 May 2023, Steve Matzura wrote: The "Definitive Guide" shows everything about adding phones as SQL statements... I'd look for another guide. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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 with inbound connection and registering phone
On Tue, 23 May 2023, Steve Matzura wrote: ...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. Or that you are not receiving any packets. Enabling SIP debugging in Asterisk can yield clues. `sudo tcpdump -i any -s 0 -v port 5060` can yield more clues. Note that tcpdump sees packets before iptables and Asterisk sees packets after iptables. If you're getting packets, sngrep and wireshark can yield even more clues. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] 401 error
On Thu, 9 Mar 2023, Jerry Geis wrote: Trying to setup an incoming call with a DNIS When I dial the number - I see nothing on the CLI. Have you enabled [PJ]SIP debugging? Bumping up console debug and verbose levels may also yield clues. tcpdump+sngrep are my 'gotos' for packet analysis, but this may not need too much depth. The person says the server is returning 401 How do I debug that. Using asterisk 18.8.0 https://en.wikipedia.org/wiki/List_of_SIP_response_codes#:~:text=401%20Unauthorized,1%5D%3A%E2%80%8A%C2%A721.4.2 "401 Unauthorized The request requires user authentication. This response is issued by UASs and registrars.[1]: §21.4.2" My guess would be a user or password mismatch. Are you using SIP or PJSIP? -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] cdr_sqlite3
On Sat, 4 Mar 2023, Sean Bright wrote: On Sat, Mar 4, 2023 at 1:29 PM, Fourhundred Thecat <400the...@gmx.ch> wrote: /var/log/asterisk/master.db how can I change the location ? If this is not possible to change in the config file, where in the source code would I change that? cdr/cdr_sqlite3_custom.c line 311 Or... In the [directories] section of asterisk.conf, you can set astlogdir which is usually set to /var/log/asterisk/. If you want to change the actual file name, may the source be with you. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Run asterisk -rx "command" and get plain text output
On Wed, 3 Aug 2022, Carlos Chavez wrote: ...running "asterisk -rx"... The '-r' is implied: -x command Connect to a running Asterisk process and execute a command on a command line, passing any output through to standard out and then terminating when the com‐ mand execution completes. Implies -r when -R is not explicitly supplied. Also, as already suggested, please try adding: [options] nocolor = yes in your asterisk.conf file. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] GET DATA on AGI
On Sun, 27 Feb 2022, Dovid Bender wrote: When using GET DATA in an AGI it seems that the # key ends the input. So if say I want the user to input 123#456 the system will return 123. I did not see this in the documentation. Is this a bug, lack of documentation or do I have a bug in my AGI? AFAIK, # is it. I use 'wait for digit' in a loop to accumulate digits so I can terminate entry based on the number of digits or a specific key. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] asterisk and maybe a freepbx question
On Sat, 8 Jan 2022, John Covici wrote: How can both sip and pjsip be listening at port 5060 at the same time... They can't. One application per address/port pair. You can configure pjsip to bind to another address and/or port while you figure it out the configuration. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Get context with hangup handler
On Wed, 5 Jan 2022, Dovid Bender wrote: I thought of this but that would mean I would need to add this to the beginning of every context which I can do, but I was trying to avoid. Every extension in every context. Or maybe get funky with a wildcard extension with priority = 1 and starting all of your real extensions with priority = 3. Something like this (which uses gosub() just for ease of testing): ; test wildcard extension same = n, gosub(wildcard-extension,1234,1) same = n, gosub(wildcard-extension,s,1) same = n, gosub(wildcard-extension,testing,1) same = n, hangup() [wildcard-extension] ; save the current context so it can be used in the hangup handler exten = _!.,1, verbose(1,[${EXTEN}@${CONTEXT}]) same = n, set(LAST-CONTEXT=${CONTEXT}) same = 4, return ; note all the 'real' extensions start with priority = 3 exten = 1234,3, verbose(1,[${EXTEN}@${CONTEXT}!${PRIORITY}]) exten = s,3, verbose(1,[${EXTEN}@${CONTEXT}!${PRIORITY}]) exten = testing,3, verbose(1,[${EXTEN}@${CONTEXT}!${PRIORITY}]) ; be explicit with 'h' so it doesn't get handled by the wildcard extension exten = h,1,verbose(1,[${EXTEN}@${CONTEXT}]) same = n, hangup() Hopefully somebody else has a more elegant solution. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Get context with hangup handler
On Wed, 5 Jan 2022, Steve Edwards wrote: same = n, set(LAST-CONTEXT=${context} Double damn. I munged the case on ${CONTEXT}. I give up for today :) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Get context with hangup handler
On Wed, 5 Jan 2022, Steve Edwards wrote: same = n, set(LAST-CONTEXT=${context} Damn. forgot the closing parentheses :) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Get context with hangup handler
On Wed, 5 Jan 2022, Dovid Bender wrote: I have a hangup handler that's added at the beginning of a call. It logs all the call details. Using the CONTEXT variable I am always going to get the context where the code is being ran and not the last context that the caller is in. Is there any creative way to get the last context at the call was in? At the start of each context/priority... exten = ,1, verbose(1,[${EXTEN}@${CONTEXT}]) same = n, set(LAST-CONTEXT=${context} -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Exec two commands with ExecIf
On Thu, 23 Dec 2021, Dovid Bender wrote: Is there any way of using ExecIf to run two commands instead of 1? e.g. instead of Exten 123,1,ExecIf($["FOO" == "BAR"]?BackGround(you-owe)) Exten 123,1,ExecIf($["FOO" == "BAR"]?SayNUmber(100")) I would ideally like to do it in one line. 1) gotoif() 2) gosub() 3) AEL gosub() is probably 'cleaner' and more maintainable than gotoif(). AEL is good but sometimes fragile. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Arrays in Asterisk
On Wed, 22 Dec 2021, Steve Edwards wrote: same = n, set(ARRAY(foo1,foo2,foo3,foo4)=1,2,3,4) Just to be clear... The use of sequential ascending numbers in all of the examples should not be construed as having any meaning. You could just as easily have: same = n, set(ARRAY(foo,bar,baz,boo)=do,wop,be,bop) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Arrays in Asterisk
On Wed, 22 Dec 2021, Dovid Bender wrote: I am experimenting with arrays in Asterisk. I am looking at https://wiki.asterisk.org/wiki/display/AST/Function_SHIFT and https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_ARRAY. So for example I Do Set(FOO(1,2,3,4)=10,20,30,40) What would be the correct way to get both the key and value into an array? I want to say for instance OPT=1 and then OPT_VAL=10. Then on the next interaction for OPT=2 and OPT_VAL=20 etc. Is this possible or am I looking at this wrong? In my mind, Asterisk does not really have arrays. You can set channel variables and pretend they are an array, but they are not an array like in real programming languages -- like 'how many elements are in this array' or 'throw an exception if I try to access an invalid subscript' or 'iterate over every element in this array.' For example, you can set channel variables like: same = n, set(foo1=1) same = n, set(foo2=2) same = n, set(foo3=3) same = n, set(foo4=4) or same = n, set(ARRAY(foo1,foo2,foo3,foo4)=1,2,3,4) or same = n, mset(foo1=1,foo2=2,foo3=3,foo4=4) and 'dumpchan()' will show 4 discrete variables that have the same 3 letters and no other relationship. (You could also 'set(ARRAY(foo1,bar2,baz3,boo4)=1,2,3,4)' to see that there is no difference from setting channel variables as discrete 'set()' statements or using the 'ARRAY()' function or using the 'mset()' application) You can 'pretend' a variable is an array by concatenating a 'subscript' like: same = n, set(foo${key}=value) or same = n, set(foo-${key}=value) ; a little bit more readable but 'dumpchan()' will show each 'element' as a discrete channel variable. Note that 'key' does not need to be numeric. It is just text that is concatenated to form the channel variable name. This may be used to pretend that Asterisk has associative arrays. The 'SHIFT()' function just removes and returns the leading substring of a variable up to a delimiter. It has even less to do with arrays than 'ARRAY()' :) -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Python AGI's and hangups
On Wed, 8 Dec 2021, Dovid Bender wrote: Could some change had been made to Asterisk that would alter how the Python script dies when there is a hangup? The setting of the '${AGISIGHUP}' channel variable should be checked. The output of 'agi set debug on' may yield clues. Do AGIs in other languages exhibit similar behavior? I have no specific knowledge of Python/AGI. Sorry. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Dial() after the h extension has been invoked?
On Fri, 12 Nov 2021, Steve Edwards wrote: I prefer to do database work in an AGI. I find quoting within the database to be obtuse and fragile. s/database/dialplan/g -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Dial() after the h extension has been invoked?
On Fri, 12 Nov 2021, Antony Stone wrote: I've never used AGI, so what would your suggested solution involve? If all you need is to update/insert/delete some rows in a database, ODBC could be a solution. I prefer to do database work in an AGI. I find quoting within the database to be obtuse and fragile. Also, I find error handling better in an AGI with a real programming language. Also, also, things start with 'I just need to do x' and frequently grow to 2SLGBTQQIA+x and you will wish you started with a real programming language. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Dial() after the h extension has been invoked?
On Fri, 12 Nov 2021, Antony Stone wrote: Can anyone suggest how I might be able to do this? I need to perform a Dial() command after an inbound channel has hung up. I do not expect the Dial() to bridge to anything (the context being dialled simply does some database manipulation and then hangs up without even bothering to answer). Any suggestions welcome :) How about creating a call file in the h extension? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] [FreePBX 15 and Asterisk 16] Changing/Migrating SIP Trunk Provider from DIDLogic to Hoiio in Singapore
On Thu, 11 Nov 2021, Turritopsis Dohrnii Teo En Ming wrote: Subject: [FreePBX 15 and Asterisk 16] Changing/Migrating SIP Trunk Provider from DIDLogic to Hoiio in Singapore This may be more useful if sent to a FreePBX mailing list. Redundant links: Agreed. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Delay when dialing...
On Fri, 23 Jul 2021, Jeff LaCoursiere wrote: Are you sure the call has been sent? Some phones have odd dialplans installed, and may not send the call to the SIP relay until you meet the dialplan reqs, press #, or otherwise wait the inter-digit timeout before the call is actually placed. If you enable SIP debugging (and bump up debug and verbose), is the delay between when you dial and the INVITE is displayed or is the delay between the INVITE and subsequent steps in your dialplan. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Patch to remove numbers from the logs
Please don't top-post. On Thu, 22 Jul 2021, Patrick Wakano wrote: If you need something quick you could create a batch script with sed or awk to remove the log lines you want and attach it to the prerotate script of logrotate (in case you use any of these in your env). Certainly this is not a final solution but it is already something that doesn't depend on an asterisk patch. On Thu, Jul 8, 2021 at 3:58 PM Dovid Bender wrote: We have a project where people will be making payments over the phone. I would like block Asterisk from logging any time the system is processing a card. So be it SayDigits(123456789), when the user enters DTMF or when I pass a card number as a variable to an AGI etc. I assume this affects others and I would like to have the patch created in a way that a. will be accepted by Sangoma and b. will work for anyone else that has this issue. I suspect the concern is having credit card numbers anywhere on disk, anytime. Your post suggests an alternative method that may be workable... rsyslog has a module, 'omprog' -- "This module permits to integrate arbitrary external programs into rsyslog's logging" I've never used it, but the description implies you could configure Asterisk to log to syslog, and then use rsyslog+omprog to pipe the messages through a script to filter out '16 digit numbers starting with 456' or '15 digit numbers starting with 3.' Way back in the day (before PCI), we used to keep the first 6 digits (the BIN) and the last 4 digits and replace the rest with x. We used to call the result a 'span.' I have no idea if this is current practice. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] HELP! AGI AUTOHANGUP does not seem to hangup the channel.
On Wed, 26 May 2021, Jonathan H wrote: AGI Rx << SET AUTOHANGUP 5 AGI Tx >> 200 result=0 AGI Tx >> HANGUP << This does raise a question in my mind... The AGI protocol is: your AGI sends a request (the Rx line) and receives a response (the Tx line). 1 line out, 1 line in. If the 'HANGUP' text can arrive asynchronously, how are you supposed to know it has arrived? Poll (or select) on the file pointer? I cannot use other methods like setting the absolute channel timeout variable I don't understand why you can't use the absolute channel timeout. Wherever you 'set autohangup x' just set 'TIMEOUT(absolute)=${EPOCH}+x.' -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] HELP! AGI AUTOHANGUP does not seem to hangup the channel.
On Wed, 26 May 2021, Jonathan H wrote: It just causes AGI to send "HANGUP" and any audio to stop playing. It does NOT hangup the channel, or even send any SIP event. The line just goes silent. I wouldn't expect the AGI() application to send a SIP event. The AGI() application does not care what technology you use. Receiving 'HANGUP' as text from Asterisk appears to be a FastAGI thing which kind of makes sense -- if your FastAGI server is not localhost, how could Asterisk send it a signal? Are you supposed to close your TCP connection and exit your AGI when you receive the HANGUP text? When I set autohangup in a 'normal' AGI, it looks like this: AGI Tx >> agi_request: null-agi.php AGI Tx >> agi_channel: SIP/poly-77a1-02a2 AGI Tx >> agi_language: en AGI Tx >> agi_type: SIP AGI Tx >> agi_uniqueid: 1622093977.1168 AGI Tx >> agi_version: 13.14.1~dfsg-2+deb9u4 AGI Tx >> agi_callerid: 55 AGI Tx >> agi_calleridname: Steve Edwards AGI Tx >> agi_callingpres: 0 AGI Tx >> agi_callingani2: 0 AGI Tx >> agi_callington: 0 AGI Tx >> agi_callingtns: 0 AGI Tx >> agi_dnid: * AGI Tx >> agi_rdnis: unknown AGI Tx >> agi_context: newline AGI Tx >> agi_extension: * AGI Tx >> agi_priority: 6 AGI Tx >> agi_enhanced: 0.0 AGI Tx >> agi_accountcode: AGI Tx >> agi_threadid: 1945654064 AGI Tx >> AGI Rx << set autohangup 5 AGI Tx >> 200 result=0 > 0x73c3dba0 -- Strict RTP learning complete - Locking on source address 192.168.0.139:2254 (and then after 5 seconds) -- AGI Script null-agi.php completed, returning 4 -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] AGI: Why is stream file and wait for digit result ASCII, but get data is "normal"?
On Mon, 24 May 2021, Jonathan H wrote: any idea why it was done like this, and why someone would ever need the ascii result Maybe because ABCD are valid DTMF events? Maybe because 0 means playback completed, not a 0 was pressed? IIRC there are some inconsistencies in the AGI API that I stumbled across when I wrote my library back in '04. If you're not using a library, you may want to consider it. AGI Rx << STREAM FILE "hello-world" "1,2,3,4,5,6,7,8,9,*,0,#" 'Comma' is not a valid 'digit' so this the same as '#*0123456789' -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] S3 Bucket support for playing sound files
On Thu, 6 May 2021, Jonathan H wrote: "bumps up the outgoing volume to +7" I use 'normalize --amplitude=-22dB" to adjust volume levels to consistent levels. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Loading Json values into asterisk as variable values
On Fri, 26 Feb 2021, Dovid Bender wrote: Steve, What language are your AGI's written in? I have been using PHP for a long time and every time it's launched there seems to be a run on the CPU. I wonder if I would be better off using Python or something other than PHP. C. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Loading Json values into asterisk as variable values
On Thu, 25 Feb 2021, Dovid Bender wrote: Other than creating an AGI that opens a file to get a json object to set as variables is there any other easy way to set variables for a call when it starts? Regardless of if there is a way in dialplan, I'd vote for an AGI to avoid what I suspect will be a bunch of fragile, difficult to maintain dialplan with quoting issues. But, I am an AGI kind of guy :) Some may argue that dialplan MAY be more performant, but I have an AGI that sets over 2,000 channel variables from MySQL tables and nobody has ever complained about call startup time. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] AGI Script Returning 4
On 1/30/21 1:18 PM, Alexander Perkins wrote: the PHP-AGI script fails after it is executed and simply returns 'returning 4'. On Sat, 30 Jan 2021, Michal Rybarik wrote: I think this can happen by hanging up the call by one party, when SIGHUP is sent to AGI script. PHP will exit on SIGHUP. It can be resolved by initializing signal handler in PHP script (pcntl_signal) for SIGHUP and doing nothing in it (return). From res_agi.c: enum agi_result { AGI_RESULT_FAILURE = -1, AGI_RESULT_SUCCESS, AGI_RESULT_SUCCESS_FAST, AGI_RESULT_SUCCESS_ASYNC, AGI_RESULT_NOTFOUND, AGI_RESULT_HANGUP, }; so, AGI_RESULT_HANGUP == 4. When Asterisk detects the hangup on the channel, it sends a SIGHUP to your AGI. I always set a signal handler on SIGHUP and do what makes sense to my application: maybe some cleanup or syslog() before return() or exit(). Almost always exit(). -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Get a SHAKEN Identity Token (Alexander Perkins)
On Mon, 25 Jan 2021, Jeff LaCoursiere wrote: So how does this guy get around it? It sounds to me like he is offering to sign calls for whoever, which IMO totally defeats the purpose. IIRC, back when he first started hawking his solution, he accepted everything. Numbers from Vitelity, my old out of service copper number, 555-555-. I'm all for the discussion, but can you start a new thread so we don't keep associating the innocent party (the OP) with this spammer. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Get a SHAKEN Identity Token (Alexander Perkins)
On Sun, 24 Jan 2021, Saint Michael wrote: Please look at this https://issues.asterisk.org/jira/browse/ASTERISK-28924 I have a solution that works for any version of Asterisk, if interested contact me at venefax at the Google mail service. "I have a commercial solution that works for any version of Asterisk, if interested contact me at venefax at the Google mail service." Fixed. If you're going to post a commercial solution on a non-commercial forum, at least be up front about it. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] DAHDI timing
On Wed, 6 Jan 2021, Dovid Bender wrote: The question is if it's using the card or the card or dahdi dummy (or whatever it's called) or if the card itself is being used. Does this yield a clue? pbx10:newline:13:47:53> module show like tim Module Description Use Count Status Support Level res_timing_pthread.so pthread Timing Interface 0 Running extended res_timing_timerfd.so Timerfd Timing Interface 1 Running core (I don't have any boxes using cards so I can't test.) -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] DAHDI timing
On Wed, 6 Jan 2021, Dovid Bender wrote: I have a box that I suspect had timing issues. I added a TE131 to see if that would help. Is there any way for me to verify that Dahdi is using the card for timing and not the kernel? Does this yield a clue: pbx10:newline:13:25:02> timing test Attempting to test a timer with 50 ticks per second. Using the 'timerfd' timing module for this test. It has been 1000 milliseconds, and we got 50 timer ticks -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Detect if people is talking
On Wed, 30 Dec 2020, Valter Nogueira wrote: We have some agents that pick calls but say nothing, letting customers "alone". Is there any way to detect if an agent is speaking? I'm not sure I understand the situation. Are you saying agents are failing to do their job and just let the customer wait until they hang up in frustration? If you record the calls, could you analyze them after the call? I don't use agents or queues so I don't know if it is possible, but the 'monitor()' application records each leg in a separate file. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] faxdetect timeout configuration
On Wed, 30 Dec 2020, David Cunningham wrote: Would anyone be able to tell us how to configure this option for calls arriving via chan_sip? A 30,000 ft peek suggests you're out of luck unless you switch to pjsip: -ws10::sedwards:~$ rgrep -l faxdetect_timeout /usr/src/asterisk-17.4.0/ /usr/src/asterisk-17.4.0/CHANGES /usr/src/asterisk-17.4.0/ChangeLog /usr/src/asterisk-17.4.0/channels/chan_dahdi.c /usr/src/asterisk-17.4.0/channels/chan_dahdi.h /usr/src/asterisk-17.4.0/channels/chan_misdn.c /usr/src/asterisk-17.4.0/channels/chan_pjsip.c /usr/src/asterisk-17.4.0/channels/misdn/chan_misdn_config.h /usr/src/asterisk-17.4.0/channels/misdn_config.c /usr/src/asterisk-17.4.0/configs/samples/chan_dahdi.conf.sample /usr/src/asterisk-17.4.0/include/asterisk/res_fax.h /usr/src/asterisk-17.4.0/include/asterisk/res_pjsip.h /usr/src/asterisk-17.4.0/res/res_fax.c /usr/src/asterisk-17.4.0/res/res_pjsip/pjsip_configuration.c -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] HELP! I can't get my Cisco CP-7960G IP hardphone to register on my Asterisk VoIP IP PBX SIP Server with FreePBX GUI
On Thu, 24 Dec 2020, Turritopsis Dohrnii Teo En Ming wrote: 3. secret is 8 char only, must be numeric My my SIP.cnf file from 2007 contains: image_version: P0S3-8-12-00 line1_password: 346cc89a2526255839534c22ad7790c and my notes say my 9760 only allowed up to 31 character passwords. You may find it useful to use tcpdump with '-w' to write the packets to a file and then analyze with sngrep. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] how do I run a command on "Failed to authenticate" ?
On Fri, 11 Sep 2020, sean darcy wrote: I'd like to get an alert if a call fails to authenticate: if "Failed to authenticate" then mail someone the source ip endif How about fail2ban? -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Stir Shaken is upon us
On Sun, 12 Jul 2020, Steve Edwards wrote: So this is a provider issue, not an end user issue and 'June 30, 2021' doesn't sound like 'soon.' If this is legit, why haven't my providers said squat? Seems one of my providers, Vitelity (iax.cc to us old timers), when asked, is not panicking about the imminent end of the world: "Thank you for reaching out. We will not be doing any stir shaken changes until the end of the year. If changes are necessary client side, we will let you know." -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Stir Shaken
On Mon, 13 Jul 2020, Jeff LaCoursiere wrote: Some of us may actually be interested in what you have to offer if you changed the way you were presenting it. Who is going to base their business on some list guy with a gmail address? And can't follow directions and honor the mailing list rules. He got spanked for this back in May. I don't claim to understand much about this other than it is supposed to help reduce spam by making providers accountable for sending calls with CIDs that are not 'theirs.' I also don't understand how the OP can sprinkle magic fairy dust on a call and issue a token to any anonymous user for calls to and from CID/DIDs they don't control as shown below: mysql\ --batch\ --database=strshk\ --disable-column-names\ --disable-table\ --execute="call strshk.stir_shaken_signature('7602588003','7602588003');"\ --host=208.73.232.47\ --password=\ --user=anonymous\ | cut --characters=1-30 eyJhbGciOiJFUzI1NiIsInR5cCI6In I have no business relationship with the OP or 7602588003 so how does this 'token' add any value? What am I missing? -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Stir Shaken is upon us
On Sun, 12 Jul 2020, Saint Michael wrote: WORLDWIDE EMERGENCY Again? The code below needs to be executed before any SIP or PJSIP call destined to the US network, or soon no call will terminate. This is called Stir-Shaken, a new law from the FCC. If this is not working the whole Asterisk industry will crash, vanish, be gone. Seen any little chickens lately? According to 'https://www.fcc.gov/call-authentication': "In March 2020, the Commission adopted new rules requiring all originating and terminating voice service providers to implement caller ID authentication using STIR/SHAKEN technological standards in the Internet Protocol (IP) portions of their networks by June 30, 2021." So this is a provider issue, not an end user issue and 'June 30, 2021' doesn't sound like 'soon.' If this is legit, why haven't my providers said squat? Server = 208.73.232.47 So why do you want everybody to send you their call metadata? What's your endgame? Generate leads to call to pitch your service? Poach clients? Sorry if I sound cynical. It's 2020 and I'm fresh out of "F's." -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Redis in place of astdb
On Wed, 8 Jul 2020, Dovid Bender wrote: we need to use an AGI to connect to redis... I can execute about 400 AGIs (written in C, only parsing the AGI environment) per second on a Linode Nanode: verbose(1,${EPOCH}); agi(null-agi); ... agi(null-agi); verbose(1,${EPOCH}); Is the Redis startup (or script startup if you're using a scripting language) that expensive or are you running very high calls per second? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Redis in place of astdb
On Wed, 8 Jul 2020, Dovid Bender wrote: Does anyone know of any projects that would allow you to use Redis in place of AstDB? https://langiac.blogspot.com/2018/04/asterisk-dialplan-and-redis-integration.html covers func_redis and Perl Redis. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Forbidden call
On Fri, 12 Jun 2020, Jerry Geis wrote: Any chance you can configure the speaker to syslog to your host so you may get a clue why the speaker is rejecting? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Any api (agi/ari/ami) equivalent of "core show calls"?
= @VAR_METRIC -- , var_name = 'mode' -- , var_val = 'files' -- ; create table if not exists musiconhold ( name varchar(80) not null , mode varchar(80) not null default '' , directory varchar(255) not null default '' , application varchar(255) not null default '' , digit char(1) not null default '' , sort varchar(16) not null default '' , formatvarchar(16) not null default '' , stamp timestamp ) ; insert into musiconhold set name = 'default' , directory = '/var/lib/asterisk/moh' , application = '' , mode = 'files' , digit = '' , sort = 'random' , format= '' ; insert into musiconhold set application = '/usr/bin/mpg123 --mono -b 0 -f 8192 -q -r 8000 -s -@ http://streaming.radionomy.com/80sFunkDanceMusic' , mode = 'custom' , name = 'foobar' ; Hope this helps rather than hinders :) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Any api (agi/ari/ami) equivalent of "core show calls"?
On Sat, 13 Jun 2020, Jonathan H wrote: I need to ensure that a MusicOnHold stream is only running when there's a caller on hold and listening.To do that, I need to rewrite and reload the moh.conf file when the caller hangs up IF there are no other callers (ie there's just 1 active call as the caller hangs up), and then rewrite and reload again when there's a new caller. How about ARA to configure MOH and then just update the database. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Forbidden call
On Thu, 11 Jun 2020, Jerry Geis wrote: I have a call from a call file: This looks a lot more like an AMI event than a call file. In any case, it doesn't matter. Action: Originate Async: yes Channel: SIP/2012 Codecs: ulaw,alaw,gsm Context: dialout Exten: callprogress Priority: 1 Timeout: 2 Variable: SIPADDHEADER="Alert-Info: Ring Answer" ActionID: 100014 CallerID: Axis < 525 > The SIP/2012 is a IP Speaker on the computer. The error is: [Jun 11 15:44:45] WARNING[8132]: chan_sip.c:24191 handle_response_invite: Received response: "Forbidden" Why am I getting "Forbidden" ? Its a call file on my server It's not a call file permissions thing. That would be a different error and reported by something before chan_sip. the speaker is directly connected to my server. How is an IP speaker 'directly connected?' Do you mean directly from the Ethernet on the speaker to a NIC on the computer? It doesn't matter, just curious :) The only thing that will tell you what is going on is the packets. Crank up 'sip set debug on' and see if that yields a clue. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] problem with logger: syslog vs. file
On Wed, 3 Jun 2020, Fourhundred Thecat wrote: On 2020-06-03 17:21, Steve Edwards wrote: How about: syslog.local0 = error,verbose,warning no debugging detail. syslog.local0 = debug,error,verbose,warning include debugging detail. currently, the above has no effect on logging. Sorry. I guess I wasn't clear. I wasn't implying that the feature had already been implemented. I was replying to Tony's question 'should it be a configuration option in logger.conf whether they include or omit? if so, what should the default be, if not specified in logger.conf?' I'm suggesting that if the 'debug' log level is specified, the debug detail (function name and line) should be included. Otherwise, not. The 'debug' log level is 'already there' and it seems reasonable to me that if I'm deep enough into logging that I want debug level log messages that I'm probably also interested in logging debug details. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] problem with logger: syslog vs. file
On Wed, 3 Jun 2020, Fourhundred Thecat wrote: On 2020-06-03 12:18, Tony Mountifield wrote: In article <88f96e46-e6bb-a7ef-bebb-5588ef6cd...@gmx.ch>, However, the conversation would then be: should both logging types include line number and function? should both logging types omit them? should it be a configuration option in logger.conf whether they include or omit? if so, what should the default be, if not specified in logger.conf? that's easy! log level should be configurable in config file, not hardcoded. Logging debugging info in production environment is madness. How about: syslog.local0 = error,verbose,warning no debugging detail. syslog.local0 = debug,error,verbose,warning include debugging detail. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] STIR-Shaken
On Thu, 28 May 2020, Saint Michael wrote: My company is one if the six service providers approved. Which part of 'Non-Commercial' do you not understand? The topic may be of general interest. Hawking your wares is not. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Stir-Shaken for asterisk
On Wed, 27 May 2020, Saint Michael wrote: We are in the business of... Then this probably should have been posted on -biz. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] rotatestrategy = none not working
On Wed, 20 May 2020, David Cunningham wrote: Thanks for the answer. Since that's what we already have configured, any idea why it wouldn't work? As I said, when "asterisk -rx 'logger reload'" is run it still rotates the log file. Sorry. No clues. Here's a clue from asterisk-11.3.0-rc1/main/logger.c: (line 94) static enum rotatestrategy { SEQUENTIAL = 1 << 0, /* Original method - create a new file, in order */ ROTATE = 1 << 1, /* Rotate all files, such that the oldest file has the highest suffix */ TIMESTAMP = 1 << 2, /* Append the epoch timestamp onto the end of the archived file */ } rotatestrategy = SEQUENTIAL; So the default strategy is SEQUENTIAL. (line 423) if ((s = ast_variable_retrieve(cfg, "general", "rotatestrategy"))) { if (strcasecmp(s, "timestamp") == 0) { rotatestrategy = TIMESTAMP; } else if (strcasecmp(s, "rotate") == 0) { rotatestrategy = ROTATE; } else if (strcasecmp(s, "sequential") == 0) { rotatestrategy = SEQUENTIAL; } else { fprintf(stderr, "Unknown rotatestrategy: %s\n", s); } So, since 'none' is not a valid option, the default remains set. Since the code casually appears the same in 11.17.1, I'll have to backtrack on my assessment that 11.17.1 doesn't rotate without a more in depth analysis. I don't know when 'none' became a valid option, but 17.4.0 has these as the respective snippets: static enum rotatestrategy { NONE = 0,/* Do not rotate log files at all, instead rely on external mechanisms */ SEQUENTIAL = 1 << 0, /* Original method - create a new file, in order */ ROTATE = 1 << 1, /* Rotate all files, such that the oldest file has the highest suffix */ TIMESTAMP = 1 << 2, /* Append the epoch timestamp onto the end of the archived file */ } rotatestrategy = SEQUENTIAL; if ((s = ast_variable_retrieve(cfg, "general", "rotatestrategy"))) { if (strcasecmp(s, "timestamp") == 0) { rotatestrategy = TIMESTAMP; } else if (strcasecmp(s, "rotate") == 0) { rotatestrategy = ROTATE; } else if (strcasecmp(s, "sequential") == 0) { rotatestrategy = SEQUENTIAL; } else if (strcasecmp(s, "none") == 0) { rotatestrategy = NONE; } else { fprintf(stderr, "Unknown rotatestrategy: %s\n", s); } So, backport or upgrade? Also, inquiring minds want to know why the enum is in powers of 2? It's not like we can set sequential AND timestamp. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] rotatestrategy = none not working
On Wed, 20 May 2020, David Cunningham wrote: Thanks for the answer. Since that's what we already have configured, any idea why it wouldn't work? As I said, when "asterisk -rx 'logger reload'" is run it still rotates the log file. Sorry. No clues. I always use 'syslog' for logging everything. I just did a quickie test to see if I could replicate the behavior. There's about 600 lines of 'diff' between asterisk-11.3.0-rc1/main/logger.c and asterisk-11.17.1/main/logger.c. Maybe 'upgrading' to 11.17 wouldn't be too painful if it would resolve your issue? -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] rotatestrategy = none not working
On Wed, 20 May 2020, David Cunningham wrote: We have an Asterisk 11.3 server where we want log rotation handled purely by Linux's logrotate, and not by Asterisk. To this end we've configured the [general] action of /etc/asterisk/logger.conf with: rotatestrategy = none However, an "asterisk -rx 'logger reload'" still rotates the log files. Does anyone know why? I had to hunt, but I found an 11.17.1 system :) 'none' does not rotate a log file on this host. Here's my logger.conf: ; Created by makefile on 2020-05-19 at 23:05:08 ; from /source/src/obl-server/logger.conf.pre [general] rotatestrategy = none [logfiles] /tmp/ast-log-test = debug,dtmf,error,event,notice,verbose,warning ; (end of /etc/asterisk/obl/logger.conf) -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Perl AGI: read variable with quotes
On Fri, 24 Jan 2020, Steve Edwards wrote: 2) How about doing 'GET FULL VARIABLE' in your Perl script? Sorry. After a couple more cups of tea I think this was a bit vague. Try whatever call/method in your library that does 'GET FULL VARIABLE' on '${PJSIP_HEADER(read,P-Asserted-Identity)}' in your AGI. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Perl AGI: read variable with quotes
On Fri, 24 Jan 2020, Benoit Panizzon wrote: I have stumbled of this problem. I need the P-Asserted-Identity header in an AGI scrip. In the Dial-Plan I do: same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)}) In the AGI I do: my $pai = $AGI->get_variable(PAI); This works fine, unless the PAI contains quotes: P-Asserted-Identity: I get "" in the variable $pai. P-Asserted-Identity: "John Doe" Is getting me $pai containing just "John". Anyone a clue how I could get the whole header? 1) Does the PAI channel variable contain the full header? Try 'verbose(PAI = ${PAI})' or something similar. 2) How about doing 'GET FULL VARIABLE' in your Perl script? You can set the channel variable PAI in the AGI if needed back in the dialplan. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] USB dahdi fxo ?
On Fri, 13 Dec 2019, sean darcy wrote: I'm moving asterisk to a laptop, so can't use the dahdi board. Is there any supported USB dahdi device ? I see the Sangoma USBfxo device, but the dahdi driver no longer supports it. Anything else ? How about something like the ancient Ethernet based Sipura 3000? -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Two sip extensions
On Fri, 19 Jul 2019, Jerry Geis wrote: I was not aware of the (+) format... basically "add" to the general section. How far back does that go? T o 1.4.X ? I don't know, but I checked a sip.conf from 1.2 (2012ish?) and I was using it then. Is there a documentation piece on that ? I'm sure there is, I just don't know where :) Another cool configuration file feature is templates (an exclamation mark instead of a plus sign). It lets you define common 'snippets' once and include them in each context as needed. Here's an example from that same (1.2 based) project: ; templates [digit-timeout](!) exten = t,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = t,n,goto(${CONTEXT},s,1) [h](!) exten = h,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = h,n,goto(settle-card,s,1) [i](!) exten = i,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = i,n,goto(${CONTEXT},s,1) [s](!) exten = s,1,verbose(1,[${EXTEN}@${CONTEXT}]) [max-timeout](!) exten = T,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = T,n,goto(max-time,s,1) [x](!) exten = _x.,1, verbose(1,[${EXTEN}@${CONTEXT}]) ; authorized the card [auth-card](h,i,s,max-timeout,digit-timeout) exten = s,2,agi(write-cdr) exten = s,n,set(PRODUCT=${CONTEXT}) exten = s,n,set(PER-MINUTE=0) exten = s,n,set(PREAMBLE=${CUSTOMER}/menu/m1101) exten = s,n, agi(auth-card,${AUTH-FLAGS},${DEBUG-MODE},${VERBOSE-MODE}) exten = s,n,goto(theme,s,1) The templates are inserted into the auth-card context when the file is parsed. I don't have a 1.2 host running anymore, but a 'show dialplan auth-card' (1.2) would look something like: [auth-card](h,i,s,max-timeout,digit-timeout) exten = T,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = T,n,goto(max-time,s,1) exten = h,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = h,n,goto(settle-card,s,1) exten = i,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = i,n,goto(${CONTEXT},s,1) exten = s,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = s,2,agi(write-cdr) exten = s,n,set(PRODUCT=${CONTEXT}) exten = s,n,set(PER-MINUTE=0) exten = s,n,set(PREAMBLE=${CUSTOMER}/menu/m1101) exten = s,n, agi(auth-card,${AUTH-FLAGS},${DEBUG-MODE},${VERBOSE-MODE}) exten = s,n,goto(theme,s,1) exten = t,1,verbose(1,[${EXTEN}@${CONTEXT}]) exten = t,n,goto(${CONTEXT},s,1) Templates are also useful in other configuration files like sip.conf to define 'classes' of parameters like 'dial-in-agent' or 'supervisor' that can be included in endpoint definitions to reduce clutter, increase consistency, and reduce maintenance. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Two sip extensions
On Thu, 18 Jul 2019, Joshua C. Colp wrote: On Thu, Jul 18, 2019, at 10:10 AM, Jerry Geis wrote: I have two SIP extensions defined in sip.conf register => 4450@10.20.1.1/4450 [4450] type=friend username=4450 host=10.20.1.1 allow=all dtmfmode=inband context=incoming register => 4451@10.20.1.1/4451 [4451] type=friend username=4451 host=10.20.1.1 allow=all dtmfmode=inband context=incoming "register" lines have to be under the general section. They can't be within a friend/peer/user. I format my entries in sip.conf like below to keep everything related to the endpoint together. ; 4450 [general](+) register= 4450@10.20.1.1/4450 [4450] allow = all context = incoming dtmfmode= inband host= 10.20.1.1 type= friend username= 4450 ; 4451 [general](+) register= 4451@10.20.1.1/4451 [4451] allow = all context = incoming dtmfmode= inband host= 10.20.1.1 type= friend username= 4451 I like to keep the parameters in each stanza sorted and 'tabbed out' to make it easier to compare stanzas and because I'm just that kind of guy :) -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Find out which key ended recording?
On Fri, 7 Jun 2019, David Cunningham wrote: We're using Perl and so far I haven't found an equivalent there. On Thu, 6 Jun 2019, Steve Edwards wrote: I'm not much of a Perl programmer... But you should never turn down an opportunity to develop your skills :) Try something like: my $result = $AGI->record_file( '/tmp/foo'# filename , 'wav' # format , '#*0123456789'# escape digits , '5000'# timeout ); $AGI->verbose('result = ' . $result, 0); Which results in: AGI Rx << RECORD FILE /tmp/foo wav #*0123456789 5000 AGI Tx >> 200 result=50 (dtmf) endpos=0 AGI Rx << VERBOSE "result = 50" when '2' is pressed. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Find out which key ended recording?
On Fri, 7 Jun 2019, David Cunningham wrote: What language is that please? C. We're using Perl and so far I haven't found an equivalent there. I'm not much of a Perl programmer, but I'd guess something like: $AGI->result or $AGI->lastresult might yield clues. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Find out which key ended recording?
On Fri, 7 Jun 2019, David Cunningham wrote: We're using Perl and so far I haven't found an equivalent there. On Thu, 6 Jun 2019, Steve Edwards wrote: I'm not much of a Perl programmer... But you should never turn down an opportunity to develop your skills :) Try something like: my $result = $AGI->record_file( '/tmp/foo'# filename , 'wav' # format , '#*0123456789'# escape digits , '5000'# timeout ); $AGI->verbose('result = ' . $result, 0); Which results in: AGI Rx << RECORD FILE /tmp/foo wav #*0123456789 5000 AGI Tx >> 200 result=50 (dtmf) endpos=0 AGI Rx << VERBOSE "result = 50" when '2' is pressed. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Find out which key ended recording?
On Fri, 7 Jun 2019, David Cunningham wrote: We have a need to record audio and allow the user to press any DTMF key to end the recording. Currently we're using the AGI command "record file" which does allow us to specify which DTMF keys can end the recording. However we also need to know which key actually ended the recording. Note that only allowing # or * to end the recording won't work for us. Does anyone know how we can tell which key ended the recording? Thanks in advance for any help. Here's a snippet from one of my AGIs: // record the voice exec_agi("RECORD FILE" " %s" // filename " wav"// format " #*1234567890" // escape digits " %d000" // timeout in ms " BEEP" // BEEP , recorded_path , recording_limit ); // should we abort? if ('*' == agi_environment.result) { agi_set_variable("STATUS", "*"); exit(EXIT_SUCCESS); } // are we finished? if ('#' == agi_environment.result) { break; } Looks like agi_environment.result is your Huckleberry. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Play Music While Processing AGI Script
On Tue, 14 May 2019, Alexander Perkins wrote: Hi All. I have a question - I have an AGI script that may run for 10 seconds, or it may run for 60 seconds while an agent becomes available (agents are geographically dispersed). Is there a way to have the music play in the background while the AGI scripts executes? When the AGI script finishes, then the music should also finish. I tried this, but the music needs to finish before moving on to step 4 and execute the script. exten => _NXZNXX,1,Answer() exten => _NXZNXX,2,MusicOnHold() exten => _NXZNXX,3,AGI(SetRecordingID.php,${UNIQUEID}) Create a separate thread in your AGI to play a small segment (5 to 10 seconds) of music in a loop. At the end of each 'play' check to see if the AGI is ready to exit. Off topic, but you can make maintenance of your dialplan easier if you write it like: exten = _nxznxx,1, answer() same = n, musiconhold() same = n, agi(SetRecordingID.php,${UNIQUEID}) The 'whitespace' and 'lowcasing' is just my personal preference. I would also use 'getopt/longopts' to parse the command line so you can have meaningful (long) options and are not dependent upon passing arguments in a particular order. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Sending SMS and SIM card
On Tue, 23 Apr 2019, bilal ghayyad wrote: Is it possible to send SMS from asterisk? Using DAHDI or using what is possible? You can use an SMS provider like Twillio. And, is there a card that can be fixed in the machine and insert the SIM card in this card to be used for GSM calls and sending SMS through asterisk? Through which channel? Is it DAHDI or something else? I've never used an internal card, but what you're looking for is a GSM gateway. I used a Goip32 (32 SIMs, 32 channels) a couple of years ago. It is an external box you hang on your network via Ethernet. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Forking AGI or GoSub
On Wed, 10 Apr 2019, Dovid Bender wrote: I have an AGI that can sometimes take time complete. I don't want the dialplan to be held up by the agi. Is there any way to call it and have Asterisk continue with the dialplan? On Wed, 10 Apr 2019, Dovid Bender wrote: I have an AGI that can sometimes take time complete. I don't want the dialplan to be held up by the agi. Is there any way to call it and have Asterisk continue with the dialplan? I had a situation that required this functionality -- processing a credit card could take a second or two and we didn't want 'dead air' for our user experience. I created a pthread to play 'Please hold on while we process your card and get ready for a good time...' while the main program continued with the card authorization. Most of the time the auth completed before the audio finished so it appeared to be instantaneous to the caller. The only caveat is to not interact (stdin/stdout) with Asterisk until 'stream file' in the thread completed. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] AMI mulitple calls quickly
On Mon, 11 Mar 2019, Jerry Geis wrote: If I use the AMI interface to originate a call, close the connection, open another connection etc...This works. but is slow... Would opening multiple AMI connections be an option? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Outbound caller ID ignored
On Sun, 13 Jan 2019, Mitch Claborn wrote: Setting the outbound caller ID works fine on our PRI (T1) lines, but does not work on our local POTS lines. No errors in the logs, the new caller ID just seems to be ignored. Should I expect it to work on the analog lines? Nope. Setting caller ID is not a POTS feature. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Custom langagues
On Tue, 1 Jan 2019, Dovid Bender wrote: Hi, I am working on writing my own custom language (Yiddish) which resembles de. I found de to be mainly in main/say.c. I am a novice when it comes to c. Would changing: } else if (!strncasecmp(lang, "de", 2)) { to: } else if (!strncasecmp(lang, "de", 2) ||!strncasecmp(lang, "yiddish", 2)) { do the trick or am I better of adding where ever I see: } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */ return ast_say_date_de(chan, t, ints, lang); to add: } else if (!strncasecmp(lang, "yiddish", 2)) { /* Yiddish syntax (like German) */ return ast_say_date_de(chan, t, ints, lang); (The 3rd parameter of strncasecmp is the number of bytes to compare. Thus, 'yippie ki-yay' will match 'yiddish.') As I interpret your question, is it better to 'piggy-back' on 'de' or replicate code for 'yi[ddish]?' I have no experience with this code and I don't know the magnitude of the changes, but if the changes don't involve large blocks of code, my personal preference would be to replicate. It will establish a precedence for future additions. Trying to accommodate a multitude of languages with 'if a or b but not c or d...' can lead to difficult to comprehend and maintain code. If you do find some subtle differences, it will be easier to handle. While 'piggy-backing' may be slightly more efficient (in run time and memory), ease of comprehension and maintenance are more important. As an aside, why is strncasecmp() being used instead of strncmp()? Wouldn't it be better to 'down-case' lang once instead of every time it is used? (Or is this the only time it is used?) -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Capture SIP all the time
On Wed, 5 Dec 2018, Saint Michael wrote: Is there a way to configure the old SIP channel to stay in sip set debug all the time, without human intervention and also at boot time, by default? If your goal is capture all SIP traffic, there may be other tools better suited. For example, tcpdump, dumpcap, or pcapsipdump can capture SIP packets. pcapsipdump can even capture the RTP along with the SIP so you can listen to the call if that doesn't make your bosses and coworkers freak out. I like to capture all of the SIP traffic in a pool of files that expire after 30 days. Then, when somebody says 'hey, my call didn't connect yesterday' I have something to work with. sngrep is a great tool for searching for calls and displaying decoded dialogs. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Best way to update ever changing dialplans
On Mon, 25 Jun 2018, Dovid Bender wrote: I am working on a system where I connect to an external API and based on what it gives me I generate the Asterisk dial plan accordingly. I am thinking about my different options and wanted feedback from others on how to best do it.1) Generate conf files for Asterisk - This seems the easiest but then I will be doing a dial plan reload on all of my dial plan for handful of lines of code. The plus side is once reload is don the dial plan is in memory. 2) Using real time + mysql - Seems like an overkill to have mysql running taking resources for a few lines. 3) Using real time + sqlite3 - This seems like the best option but then we go to disk every time there is a call. Any other options that I am not thinking of? I think that you have enumerated the reasonable options. I'd vote for #1. 1) Easier to implement and debug. 2) Easier to 'snapshot' for backup and restore. Other factors that may bias my choice would be the size of the dialplan and the frequency of the updates. Maybe another option would be to use the CLI 'dialplan add' and 'dialplan remove' commands. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Decoding SIP register hack
On Thu, 17 May 2018, Daniel Tryba wrote: You can do nothing to stop this kind of traffic. The only thing you can do is block it, either using only a whitelist (cumbersome) or generate a blacklist with for example fail2ban or a more elaborate honeypot setup. Or setup a proxy that will filter patterns you discover from Keep in mind that since this is UDP, source addresses can be spoofed so any automated solution will need a whitelist so you don't get tricked into blocking legitimate traffic. And since you 'need a whitelist' why not just use that and block everything else? A clever solution to a mobile user base is to use knockd to allow remote access. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] SIP Codec negotiation
On Fri, May 11, 2018, at 10:36 AM, Steve Edwards wrote: So, Asterisk will defer it's choice of codec to match the codec it detects in the incoming stream? On Fri, 11 May 2018, Joshua Colp wrote: It depends on the channel driver and configuration. The chan_sip module always matching outgoing codec to the incoming codec. The chan_pjsip module has an option to do that (which is on by default). Is this why I see occasional notices in my log file like: Dropping incompatible voice frame on SIP/xxx of format ulaw since our native format has changed to (gsm) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] SIP Codec negotiation
On Fri, 11 May 2018, Joshua Colp wrote: In the above example, even though the INVITE/SDP says they prefer gsm over ulaw and the OK/SDP says I prefer ulaw over gsm, they can choose to use gsm or ulaw? Yes. Can it be asymmetrical? They send gsm and I send ulaw? Technically, yes. In practice it's a bit iffy - specifically because some DSPs in devices won't allow it - they require a single codec be in use for each direction. So, Asterisk will defer it's choice of codec to match the codec it detects in the incoming stream? -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] SIP Codec negotiation
On Thu, May 10, 2018 at 11:44:14AM -0700, Steve Edwards wrote: I receive an INVITE/SDP containing: m=audio 11310 RTP/AVP 3 0 101 which I interpret as gsm, ulaw, rfc2833. and I reply with an OK/SDP containing: m=audio 15884 RTP/AVP 0 3 101 which I interpret as ulaw, gsm, rfc2833. How can I tell which codec was actually used for the call? On Fri, 11 May 2018, Daniel Tryba wrote: AFAIK this is undetermined. The callee can send either ulaw or gsm, unless the caller wants to narrow it down to 1 codec, see https://tools.ietf.org/html/rfc4317#section-2.2 Most of the time the callee will pick the first (so in this case ulaw). But there are media gateways out there that choose g711[au] above "more complex" codecs regardless order in SDP. My prefer PSTN provider will always prefer alaw if offered since that will prevent transcoding on their side if the call goes to ISDN/POTS, but AMR if the call goes to VoLTE. So, without examining the RTP, you cannot tell which codec was actually used? In the above example, even though the INVITE/SDP says they prefer gsm over ulaw and the OK/SDP says I prefer ulaw over gsm, they can choose to use gsm or ulaw? Can it be asymmetrical? They send gsm and I send ulaw? -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] SIP Codec negotiation
I receive an INVITE/SDP containing: m=audio 11310 RTP/AVP 3 0 101 which I interpret as gsm, ulaw, rfc2833. and I reply with an OK/SDP containing: m=audio 15884 RTP/AVP 0 3 101 which I interpret as ulaw, gsm, rfc2833. How can I tell which codec was actually used for the call? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] AGI fails bad permission
On Fri, 23 Feb 2018, Saint Michael wrote: Launched AGI Script /var/lib/asterisk/agi-bin/adddnc.php adddnc.php: Failed to execute '/var/lib/asterisk/agi-bin/adddnc.php': Permission denied The file is of course chmod +x /var/lib/asterisk/agi-bin/*.php This is how a sysadmin opened up a web server to compromise a decade or 2 ago. The CGI directory contained some flawed SGI CGIs that had been disabled by fiddling with the permissions. More information may yield a clue. 1) ps -aef | grep asterisk | grep --invert-match grep 2) sudo grep 'astagidir' /etc/asterisk/asterisk.conf 3) grep adddnc /etc/asterisk/extensions.{ael,conf} 4) head --lines=1 /var/lib/asterisk/agi-bin/adddnc.php 5) ls -l $(head --lines=1 /var/lib/asterisk/agi-bin/adddnc.php\ | awk '{print substr($1, 3, 255)}') 6) sudo /usr/bin/php (or wherever you keep php) \ /var/lib/asterisk/agi-bin/adddnc.php 7) Check the 'r' and 'x' bits on /var/, /var/lib/, /var/lib/asterisk/, /var/lib/asterisk/agi-bin/. 8) cat /var/lib/asterisk/agi-bin/adddnc.php -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] [OT] How to use audio files with SIPp
On Fri, 9 Feb 2018, Olivier wrote: 3. How do you capture an RTP flux with thark or tcpdump ? Take a look at 'pcapsipdump.' -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Answered time on channel
On Tue, 26 Dec 2017, Eric Wieling wrote: Don't use an 'h' extension, use a hangup handler. On 12/26/2017 04:43 PM, Steve Edwards wrote: Why? On Tue, 2 Jan 2018, Eric Wieling wrote: From the hangup handler specification: Hangup handlers are an alternative to the h extension. They can be used in addition to the h extension. The idea is to attach a Gosub routine to a channel that will execute when the call hangs up. Whereas which h extension gets executed depends on the location of dialplan execution when the call hangs up, hangup handlers are attached to the call channel. You can attach multiple handlers that will execute in the order of most recently added first. Cool. So in my case where every context has: exten = h,1,goto(finish-call,h,1) a hangup handler established at the start of the call makes perfect sense and prevents stupid errors like forgetting to list the template in the context declaration. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Answered time on channel
On Tue, 26 Dec 2017, Eric Wieling wrote: Don't use an 'h' extension, use a hangup handler. Why? -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Chan Local, Originate and slin
On Wed, 22 Nov 2017, Kseniya Blashchuk wrote: Hmm thanks, I guess I should try the latest version just to check. Unfortunately Ubuntu asterisk is not so frequently updated, just backports on security updates Lubuntu 17.10 installed Asterisk 13.17.2. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Chan Local, Originate and slin
On Wed, 22 Nov 2017, Dmitriy Serov wrote: same => n,System(printf "Action: Originate\nActionID: 1\nChannel: Local/${number}@mycontext\nApplication: Confbridge\nData: ${confnum}\n" > /var/spool/asterisk/outgoing/${number}-${confnum}) I get: Unknown keyword 'Action' at line 1 of /var/spool/asterisk/outgoing/... Unknown keyword 'ActionID' at line 2 of /var/spool/asterisk/outgoing/... These are 'AMI' commands, not call file commands. Also, just in case you're not aware, 'best practice' is to create the call file in a 'temp' directory on the same partition as ${astspooldir}/outgoing/ and then 'mv' the file to that directory. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] Call preemption
Please don't top-post. On Wed, 8 Nov 2017, Markus wrote: The task itself sounds like a job for an AGI script to me... check for amount of calls, if 10, hangup one. But how do you determine the priority of a call? Am 07.11.2017 um 12:21 schrieb Jean Aunis: Hello, Has anyone already implemented some sort of call preemption in Asterisk ? I am trying to achieve something like this : [...] Does anyone have an idea ? An AGI using AMI to do 'core show channels concise', parse the output, pick your victim, AMI to do 'channel request hangup x' Note that there are 'race condition' opportunities. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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 bit OT - Configure GoIP for Asterisk
On Mon, 2 Oct 2017, Antony Stone wrote: On Monday 02 October 2017 at 20:58:33, Steve Edwards wrote: I recently received a GoIP-32 for a client project -- primarily outbound calling. How should a GoIP be configured for Asterisk? Have you tried http://www.hybertone.com/en/solutionsClass.asp?Id=78 Thanks, but no joy. When I first power up the box, 'sip show peers' shows: Name/username Host Dyn Forcerport Comedia ACL Port Status Description goip/goip (Unspecified) D YesYes 0OK (5 ms) But then a few seconds later it shows: Name/username Host Dyn Forcerport Comedia ACL Port Status Description goip/goip (Unspecified) D YesYes 0UNKNOWN Every few seconds I get 'empty' SIP debug messages on the console like: <--- SIP read from UDP:192.168.0.51:5087 ---> <-> Wireshark says they're only 3 bytes long and contain 'SIP'. When I dial, I get: -- Executing [*@newline:6] Dial("SIP/poly-e637-00cb", "sip/goip/xx") in new stack == Everyone is busy/congested at this time (1:0/0/1) No SIP messages are displayed -- I'm guessing that's a result of the 'status UNKNOWN'. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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 bit OT - Configure GoIP for Asterisk
I recently received a GoIP-32 for a client project -- primarily outbound calling. How should a GoIP be configured for Asterisk? No fancy shmancy Elastix or FPBX GUI -- just using the configuration files. Single Server Mode, Config By Line, and Trunk Gateway Mode all seem likely suspects. How did you configure your GoIP and why? What do your relevant sip.conf section(s) look like? What does your dial command look like? So far, all I've got out of it is a 503 Declined. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Looking for Kristian Kielhofner document
I'm looking for a document Kristian Kielhofner wrote a couple of years ago walking you through his experiences with the SIP protocol. Kind of a "here's the answers to the questions you were afraid to ask." If you have a link, please share. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] ERROR during high volume MoH dialplan
On Thu, 31 Aug 2017, Joseph Smith wrote: So I am looking for a better way to allow several thousand callers to listen to this IVR menu at the same time. I'm thinking multiple hosts. I'm not a fan of 4,000 eggs in one basket. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] What version of Linux?
On Mon, 28 Aug 2017, Ira wrote: The machine is an Intel Atom board... I believe the board is limited to a 32 bit OS. My Intel(R) Atom(TM) CPU D525 seems to be quite happy running CentOS release 6.9 (Final) in 64 bit mode: sedwards:~$ uname --hardware-platform --machine --processor x86_64 x86_64 x86_64 sedwards:~$ getconf LONG_BIT 64 -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] AMI column widths
On Fri, 7 Jul 2017, Antony Stone wrote: I'm trying to get a list of the channels currently in use on an Asterisk server (1.8.32.1 if it matters) over AMI. Would the AMI 'CoreShowChannel' or the CLI 'core show channels concise' commands help? -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] Extensions of sip trunk
On Tue, 6 Jun 2017, Hans-Peter Jansen wrote: I wonder, if I really need to grab the extension with Set(DN=${SIP_HEADER(TO):5}) or something similar? Yes, something like if they can't fix the R-URI: exten => X_.,n,Set(TO=${CUT(SIP_HEADER(To),@,1)}) exten => X_.,n,Set(TO=${CUT(TO,:,2)}) exten => X_.,n,Goto(somewhereelsetopreventloops${TO},1) Sorry for the silly question, but how do I feed the TO variable back to the usual pattern matching? Assign to $EXTEN? same = n, goto(${CONTEXT},${TO},1) -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Want to capture all SIP messages
On Thu, 1 Jun 2017, Pete Mundy wrote: Heya Steve I use the same Jeff recommended. Eg this command would capture SIP traffic in capture files up to 100Mbytes each, with a maximum of 10 files in play and overwriting the oldest automatically: tcpdump -i eth0 -w rollingSIPtrace. -C 100 -W 10 port 5060 Eventually you'd end up with files called 'rollingSIPtrace.00' through to 'rollingSIPtrace.09', and when rollingSIPtrace.09 reaches 100MB, overwriting of rollingSIPtrace.00 (then rollingSIPtrace.01 etc) would commence. Does that achieve your goal? Or was the problem that if your server restarts and the command auto-executes at boot time then the first file overwritten will be rollingSIPtrace.00, not necessarily whichever file was the last modified? I'd like it to only overwrite the oldest, but server restarts are rare enough that I think this will be acceptable. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Want to capture all SIP messages
On Wed, 31 May 2017, Matt Riddell wrote: Easier just to use logrotate no? Neither dumpcap or tcpdump know what to do with a HUP (I suspect I could configure logrotate to kill dumpcap and then start another instance) but I'm still in a position to have to enable/disable the logrotate script as I change which hosts need monitoring. I know... First world problems :) -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Want to capture all SIP messages
On Wed, 31 May 2017, Barry Flanagan wrote: sngrep Isn't sngrep a great tool? Since discovering it my use of tcpdump/wireshark has cratered. Being able to compare an INVITE that worked with one that didn't (with color highlighting) rocks. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- 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] OT: Want to capture all SIP messages
On Wed, 31 May 2017, Daniel Tryba wrote: On Wed, May 31, 2017 at 01:39:25PM -0700, Steve Edwards wrote: What bugs you about the output format? It's been a while, but as I recollect, it included the date/timestamp in the file name of the 'ring buffer' which meant that each time the host was rebooted, dumpcap didn't know the files from the previous run should be deleted when they 'aged out.' Solvable by by writing a cleanup script that deletes files over a specific age, just a basic find in the daily crontab: find /path/to/captures -type f -name 'pattern*' -mtime +X -exec rm {} \; Been there, done that. Just 1 more thing for me to maintain :) -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Want to capture all SIP messages
On Wed, 31 May 2017, Steve Edwards wrote: I want to capture all SIP messages. I have about 30 hosts in about 6 colos. My first thought was dumpcap, but the output file name format bugs me. What do you use for long term SIP capture? A little more specificity... I'd like the capture to be in a series of files that can be 'rotated' or 'aged out' so that I can always have x days of traffic on hand but not have to prune the files to keep the storage requirements reasonable. -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Want to capture all SIP messages
On Wed, May 31, 2017 at 12:36:47PM -0700, Steve Edwards wrote: I want to capture all SIP messages. I have about 30 hosts in about 6 colos. My first thought was dumpcap, but the output file name format bugs me. What do you use for long term SIP capture? On Wed, 31 May 2017, Daniel Tryba wrote: What bugs you about the output format? It's been a while, but as I recollect, it included the date/timestamp in the file name of the 'ring buffer' which meant that each time the host was rebooted, dumpcap didn't know the files from the previous run should be deleted when they 'aged out.' -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] OT: Want to capture all SIP messages
I want to capture all SIP messages. I have about 30 hosts in about 6 colos. My first thought was dumpcap, but the output file name format bugs me. What do you use for long term SIP capture? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] cmd AGI(), maximum script time.
On Fri, 26 May 2017, Dmitry Melekhov wrote: It there way to limit script execution time ? Set a handler and an alarm: // trap SIGALRM -- the process is taking too long signal(SIGALRM, (void (*)(int))(int)hung_process); // set an alarm alarm(900); -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] How to detect fake CallerID? (8xx?)
On Wed, 10 May 2017, J Montoya or A J Stiles wrote: Presumably your staff carry mobile phones. What about an app that gets the ID of the cell tower to which it is connected, and passes it and the SIM number in a HTTP request to a server you control? The problem is that they are supposed to use the 'site landline' to confirm presence -- not their cell phone with the spoofed CID. -- Thanks in advance, ----- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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] How to detect fake CallerID? (8xx?)
I have a 'time and attendance' application. Think janitorial or security kind of thing where an employee goes from location to location. They're supposed to 'clock in' when they get to a site using a phone at that site to prove they're there. Some employees have discovered 'fake caller ID' services can be used to say they're on site when they are not. How can I detect a fake CallerID? The INVITE looks the same to me. If I have the employees call an 8xx number, can I ask my SIP provider to include more headers to show the real ANI? What would that service be called? -- Thanks in advance, --------- Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _ -- 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