bipin singh
2017-Apr-24 05:47 UTC
[asterisk-users] asterisk-users Digest, Vol 153, Issue 28
Install app_mysql.so after then check your dialplan . On Sun, Apr 23, 2017 at 10:30 PM, <asterisk-users-request at lists.digium.com> wrote:> Send asterisk-users mailing list submissions to > asterisk-users at lists.digium.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.digium.com/mailman/listinfo/asterisk-users > or, via email, send a message with subject or body 'help' to > asterisk-users-request at lists.digium.com > > You can reach the person managing the list at > asterisk-users-owner at lists.digium.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of asterisk-users digest..." > > > Today's Topics: > > 1. Re: asterisk name in mysql (Atux Atux) > 2. Re: asterisk name in mysql (Antony Stone) > 3. Re: Hack attempt sequential config file read looking for > valid files. (Tim S) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 22 Apr 2017 23:25:52 +0300 > From: Atux Atux <atuxnull at gmail.com> > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users at lists.digium.com> > Subject: Re: [asterisk-users] asterisk name in mysql > Message-ID: > <CACoLBwUid-NOos3Qp9x3CP+fFmrKzk+QJuYXTQnnOw4BS2thaw@ > mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Thanks a lot for the reply. > I did follow that already, but i do have a problem. Here is my > extensions.conf part for that particular number > exten => 6912345678,1,Answer() > exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd > asterisk) > exten => 6912345678,n,MYSQL(Query resultid ${connid} SET NAMES utf8) > exten => 6912345678,n,GotoIf($["${connid}" = ""]?nodb) > exten => 6912345678,n,MYSQL(Query resultid ${connid} SELECT displayname > FROM root WHERE phonenumber="${CALLERID(num)}" LIMIT 1) > exten => 6912345678,n,MYSQL(Fetch fetchid ${resultid} displayname) > exten => 6912345678,n,MYSQL(Clear ${resultid}) > exten => 6912345678,n,Set(CALLERID(name)=${displayname}) > exten => 6912345678,n,MYSQL(Disconnect ${connid}) > exten => 6912345678,n(nodb),NoOp(DoneDB) > exten => 6912345678,n,Dial(SIP/450&SIP/451,20) > exten => 6912345678,n,VoiceMail(450 at Office,su) > exten => 6912345678,n,Busy(3) > > 6912345678 is my DID > > > > and here is the error i am getting > [Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 > pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, > 6951921078, 2) > == Spawn extension (DialIn, 6912345678, 2) exited non-zero on > 'Dongle/dongle0-0100000002' > > > Any ideas please? > > > On Fri, Apr 21, 2017 at 10:22 PM, John Kiniston <johnkiniston at gmail.com> > wrote: > > > You can use func_odbc to do this. > > > > https://wiki.asterisk.org/wiki/display/AST/Getting+ > > Asterisk+Connected+to+MySQL+via+ODBC2 > > > > There is a good chapter in the Asterisk book about using ODBC for > > hotdesking that may help you understand ODBC as well. > > > > http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book- > > html-chunk/getting_funky.html > > > > On Fri, Apr 21, 2017 at 12:12 PM, Atux Atux <atuxnull at gmail.com> wrote: > > > >> hi. currently i am running the phonebook in astdb with > >> > >> > >> *database put cidname 0123456789 "name_surname"* > >> and i retrive it with > >> > >> > >> *exten =>9876543210,1,Set(CALLERID(name)=${DB(cidname/${CALLERID( > num)})})* > >> Now, my system has mysql and i got all my contacts in there in a > database > >> is called *asterisk *and a table called *addressbook**. *password of the > >> mysql is > >> > >> *whateverpasswd* > >> how do i alter the above section of the extensions.conf code to query > >> mysql everytime there is a call, please? > >> > >> > >> > >> -- > >> _____________________________________________________________________ > >> -- 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 > >> > > > > > > > > -- > > A human being should be able to change a diaper, plan an invasion, > butcher > > a hog, conn a ship, design a building, write a sonnet, balance accounts, > > build a wall, set a bone, comfort the dying, take orders, give orders, > > cooperate, act alone, solve equations, analyze a new problem, pitch > manure, > > program a computer, cook a tasty meal, fight efficiently, die gallantly. > > Specialization is for insects. > > ---Heinlein > > > > -- > > _____________________________________________________________________ > > -- 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 > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://lists.digium.com/pipermail/asterisk-users/ > attachments/20170422/9a783769/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Sat, 22 Apr 2017 22:34:50 +0200 > From: Antony Stone <Antony.Stone at asterisk.open.source.it> > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > <asterisk-users at lists.digium.com> > Subject: Re: [asterisk-users] asterisk name in mysql > Message-ID: <201704222234.50994.Antony.Stone at asterisk.open.source.it> > Content-Type: Text/Plain; charset="iso-8859-15" > > On Saturday 22 April 2017 at 22:25:52, Atux Atux wrote: > > > Thanks a lot for the reply. > > I did follow that already, but i do have a problem. Here is my > > extensions.conf part for that particular number > > exten => 6912345678,1,Answer() > > exten => 6912345678,n,MYSQL(Connect connid 127.0.0.1 root mypasswd > > asterisk) > > ...snip... > > > and here is the error i am getting > > [Apr 22 23:20:29] WARNING[9725][C-00000002]: pbx.c:4991 > > pbx_extension_helper: No application 'MYSQL' for extension (IncomingDial, > > 6951921078, 2) > > == Spawn extension (DialIn, 6912345678, 2) exited non-zero on > > 'Dongle/dongle0-0100000002' > > > > > > Any ideas please? > > What have you put into func_odbc.conf? > > ie: what's the definition of MYSQL? > > > Antony. > > -- > Software development can be quick, high quality, or low cost. > > The customer gets to pick any two out of three. > > Please reply to the > list; > please *don't* CC > me. > > > > ------------------------------ > > Message: 3 > Date: Sat, 22 Apr 2017 13:42:01 -0700 > From: Tim S <tim.strommen at gmail.com> > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users at lists.digium.com> > Subject: Re: [asterisk-users] Hack attempt sequential config file read > looking for valid files. > Message-ID: > <CAJv9tkzrw33JQ82VJEnp7g6X4QMv7u8mST3ytHNAp_V=pxfDvw at mail. > gmail.com> > Content-Type: text/plain; charset="utf-8" > > Exactly. > > If one's external access control is set correctly, you should basically > never see any outside attack traffic at your Asterisk box (you've see it in > the firewall logs instead). > > Following the concept of "least privileges" is where you should start if > you have Asterisk attached to a SIP service you pay for. If you have one > SIP provider, the only IP address (or IP pool/range) that should talk to > your Asterisk box from outside your firewall is exclusively the servers of > your SIP provider. Everything else should be "dropped" (no response at > all). > > Google "GRC Shields Up" and run that free port scanner to see what you have > open, closed or what they call "stealth" (dropped). If a firewall is setup > correctly, port 5060 should appear "stealth" from any IP address other than > your service provider. > > You can also Shodan yourself: "https://www.shodan.io/host{yourPublicIP}" - > but Shodan doesn't tell you whether the packets are dropped or rejected. > In general you want your public IP to only show services on Shodan that you > intend every random request to get access to - for example a public web > server on port 80 and 443. > > It's a good idea to review these resources often (once a quarter, once a > month, once a week - your choice), especially after any software or > hardware changes on your network. You may find something has been > misconfigured at installation, that you would need to address. > > Best > > -Tim > > On Fri, Apr 21, 2017 at 9:53 AM, Victor Villarreal <mefhigoseth at gmail.com> > wrote: > > > Hi David, Tim, > > > > Try to use Bail2Ban at last resort. Fail2Ban is a ractive approach, that > > permit the traffinc AND ONLY BLOCK them after certain level triggered. > > > > > > Use iptables to block the unused services faced to public networks like > > Internet. And configure these services properly, so they listen only > > selected interfaces and IPs, and not from 0.0.0.0 > > > > 2017-04-21 13:47 GMT-03:00 Tim S <tim.strommen at gmail.com>: > > > >> Is that IP in your network or outside (I can ping it so I'm guessing > it's > >> outside your network)? Do you have a firewall between your asterisk box > >> and the internet? Is there a WHITELIST of IP addresses that only allow > >> your provider's limited IP pool to connect to your asterisk box from > >> outside? > >> > >> If you are getting TFTP requests hitting your Asterisk box, they are not > >> properly being filtered at your firewall - ftp and tftp are considered > >> insecure communication methods, that port (69 I think) should be closed > on > >> your firewall unless you have a really good reason to have it opened > (and > >> unless you run a public FTP site, THERE IS NO GOOD REASON). > >> > >> Fail2Ban is a BLACKLIST method, blacklists are most effective after good > >> network hygiene is implemented, as you drastically limit the pool of > >> potential bad actors with a whitelist. > >> > >> Best, > >> > >> -Tim > >> > >> On Fri, Apr 21, 2017 at 9:38 AM, Dovid Bender <dovid at telecurve.com> > >> wrote: > >> > >>> This is old news. They use Shodan and then try to connect. Set up > >>> Fail2Ban that say after 10 404's to ban the IP. > >>> > >>> > >>> On Fri, Apr 21, 2017 at 12:27 PM, Jerry Geis <jerry.geis at gmail.com> > >>> wrote: > >>> > >>>> I "justed" happened to look at /var/log/messages... > >>>> > >>>> I saw: > >>>> Apr 21 12:18:40 in.tftpd[22719]: RRQ from 69.64.57.18 filename > >>>> 0004f2034f6b.cfg > >>>> Apr 21 12:18:40 in.tftpd[22719]: Client 69.64.57.18 File not found > >>>> 0004f2034f6b.cfg > >>>> Apr 21 12:18:40 in.tftpd[22720]: RRQ from 69.64.57.18 filename > >>>> 0004f2034f6c.cfg > >>>> Apr 21 12:18:40 in.tftpd[22720]: Client 69.64.57.18 File not found > >>>> 0004f2034f6c.cfg > >>>> Apr 21 12:18:40 in.tftpd[22721]: RRQ from 69.64.57.18 filename > >>>> 0004f2034f6d.cfg > >>>> Apr 21 12:18:40 in.tftpd[22721]: Client 69.64.57.18 File not found > >>>> 0004f2034f6d.cfg > >>>> Apr 21 12:18:40 in.tftpd[22722]: RRQ from 69.64.57.18 filename > >>>> 0004f2034f6e.cfg > >>>> > >>>> so basically an sequential read of polycom MAC address config files. > >>>> Some is trying to read to determine if I have any polycom files just > >>>> sequential read after read. > >>>> And if so - it would get any extension and password at that time. > >>>> Luckily I have none. > >>>> > >>>> However - how does one block attempts like this ? > >>>> > >>>> Thanks! > >>>> > >>>> Jerry > >>>> > >>>> -- > >>>> _____________________________________________________________________ > >>>> -- 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 > >>>> > >>> > >>> > >>> -- > >>> _____________________________________________________________________ > >>> -- 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 > >>> > >> > >> > >> -- > >> _____________________________________________________________________ > >> -- 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 > >> > > > > > > > > -- > > GnuPG Key ID: 0x39BCA9D8 > > https://www.github.com/mefhigoseth > > ...:::[ God Rulz ! ]:::... > > > > -- > > _____________________________________________________________________ > > -- 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 > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: <http://lists.digium.com/pipermail/asterisk-users/ > attachments/20170422/3c6361ea/attachment-0001.html> > > ------------------------------ > > _______________________________________________ > --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 > > End of asterisk-users Digest, Vol 153, Issue 28 > *********************************************** >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170424/66655275/attachment.html>