Re: [asterisk-users] parsing issue

2012-05-02 Thread Barry Miller
On Wed, May 02, 2012 at 01:48:04PM -0400, CDR wrote:
 I get an error when I execute this code
 exten = rejected,n,Hangup($[-1*${Z}])
 
 May  2 13:42:09] WARNING[23128]: ast_expr2.fl:468 ast_yyerror:
 ast_yyerror():  syntax error: syntax error, unexpected $end, expecting
 '-' or '!' or '(' or 'token'; Input:
 -1*
 
 The variable Z has a  negative number, which is the code that I need
 to use in the hangup.
 Any idea how can I do this? There is no ABS() function in Asterisk. I
 already filed a request for it but it turns up that it will cost me
 money. How can I remove the sign from a number?

If you're sure Z is non-null and negative, then
  exten = rejected,n,Hangup($[-(${Z})])

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Delete Session timer ?

2012-04-18 Thread Barry Miller
On Wed, Apr 18, 2012 at 05:42:18PM +0200, Olivier CALVANO wrote:
 Hi
 
 can i don't sent into the SIP invite the Session Timer ? on asterisk 1.6

Have you tried 'session-timers=refuse' ?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Delete Session timer ?

2012-04-18 Thread Barry Miller
On Wed, Apr 18, 2012 at 10:59:21AM -0500, Danny Nicholas wrote:
 If I interpret the original question correctly, this will make his call
 drop.

I imagine this would only happen if the remote end _requires_ RFC 4028
timers, which I don't think is very common.  I was thinking he would
refuse session timers for just those peers that had problems with them,
like one of my ITSPs.

 
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Barry Miller
 Sent: Wednesday, April 18, 2012 10:57 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] Delete Session timer ?
 
 On Wed, Apr 18, 2012 at 05:42:18PM +0200, Olivier CALVANO wrote:
  Hi
  
  can i don't sent into the SIP invite the Session Timer ? on asterisk 
  1.6
 
 Have you tried 'session-timers=refuse' ?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Delete Session timer ?

2012-04-18 Thread Barry Miller
On Wed, Apr 18, 2012 at 08:52:02PM +0200, Olivier CALVANO wrote:
 Le 18 avril 2012 17:56, Barry Miller asterisk-us...@notanet.net a ?crit :
  On Wed, Apr 18, 2012 at 05:42:18PM +0200, Olivier CALVANO wrote:
  Hi
 
  can i don't sent into the SIP invite the Session Timer ? on asterisk 1.6
 
  Have you tried 'session-timers=refuse' ?
 
 yes i have put this option, but asterisk sent in the Header that he support 
 the
 Session Timers, the sip server of the operator sent a session timer too and
 asterisk ignor it.
 
 my objectifs is asterisk don't sent the session timer

I'm not sure about 1.6, but on 1.8 and 10, my INVITEs normally say
Supported: replaces, timer 
*unless* the peer definition has 'session-timers=refuse'.  Then I see
Supported: replaces
and CLI 'sip show channel ' on an outgoing call to this peer shows
SIP Options:(none)
Session-Timer:  Inactive

Isn't this what you're looking for?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] syntax error from digium fax manual ??

2012-04-09 Thread Barry Miller
On Mon, Apr 09, 2012 at 06:21:40PM -0400, sean darcy wrote:
 I've cut and pasted from the digium fax admin manual:
 
 exten = send,1,NoOp( SENDING FAX )
 exten = send,n,Wait(6)
 exten = send,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ])
 exten = send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
 
 -- Executing [send@sendPDFasFax:1] NoOp(DAHDI/4-1,  SENDING 
 FAX ) in new stack
 -- Executing [send@sendPDFasFax:2] Wait(DAHDI/4-1, 6) in new stack
 -- Channel 4 detected a CED tone from the network.
 [Apr  9 15:29:02] WARNING[2912]: ast_expr2.fl:468 ast_yyerror: 
 ast_yyerror():  syntax error: syntax error, unexpected '+', expecting 
 $end; Input:
   + 1
   ^
 [Apr  9 15:29:02] WARNING[2912]: ast_expr2.fl:472 ast_yyerror: If you 
 have questions, please refer to 
 https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
 -- Executing [send@sendPDFasFax:3] Set(DAHDI/4-1, 
 GLOBAL(FAXCOUNT)=) in new stack
   == Setting global variable 'FAXCOUNT' to ''
 
 The error seems to be saying that I need a closing } or ], but it 
 looks like it has closing brackets.
 
 Any suggestions?

This is exactly the error you'd get if FAXCOUNT is null or not set.
(Because then the expression would be the invalid '$[ + 1]'.)

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] fail2ban restarts

2012-01-29 Thread Barry Miller
On Sun, Jan 29, 2012 at 09:48:47AM -0500, eherr wrote:
 I have fail2ban running on my Asterisk box.
 Every so often I receive emails stating that the jails stopped and then 
 started.
 Why does this happen?
 Why isn't it just continuously running?

fail2ban is restarted when it switches its log file.  Depending on
your platform, this can be the result of a cron job, an entry in
/etc/lograte.d, /etc/newsyslog.conf, whatever.  It's normal.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Weird IPs in Fail2ban list

2012-01-27 Thread Barry Miller
On Thu, Jan 26, 2012 at 11:49:32PM -0500, asterisk jobs wrote:
 Hello everyone,
 
 I have noticed getting wired IPs blocked by Fail2ban. Has anyone else seen
 this or can explain this?
 
 Chain fail2ban-ASTERISK (1 references)
 num  target prot opt source   destination
 1DROP   all  --  0.23.20.189  0.0.0.0/0
 
 I also get things like, 0.0.5.2, etcFail2ban seems to be working when I
 am testing. Are these numbers taken from the SIP packet or the TCP/IP
 protocol source because they surely are not valid addresses.
 
 Thanks

See fail2ban-regex(1).  It's very useful for discovering what fail2ban
makes of your log files.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Which device auto-registered an extension?

2011-12-18 Thread Barry Miller
On Sat, Dec 17, 2011 at 03:55:55PM -0600, Warren Selby wrote:
 Why not try set a variable under each device in sip.conf to the same as the 
 endpoint name then Dial(SIP/${CustomVar})?

Thanks.  That keeps the device-extension association in one place, at the
cost of a little redundancy if done manually:

  [0010b5c1867c]
  setvar = HEREITISAGAIN=0010b5c1867c
  regexten = 543

I've coded (but not yet seriously tested) an optional feature that would
basically automate just what you suggested.  It'll be interesting to see
how many think this is useful.

 On Dec 15, 2011, at 7:03 PM, Barry Miller asterisk-us...@notanet.net wrote:
 
  Hi all,
  
  In sip.conf:
   [general]
   regcontext = autoreg
  
   [devabc]
   regexten = 543
  
  creates exten= 543,1,Noop(devabc) in context autoreg when devabc
  registers.  But I can't use exten= _5XX,2,Dial(SIP/${EXTEN}) in the
  dialplan, because there's no device SIP/543.  Now I know I can add a line
  like exten= 543,2,Dial(SIP/devabc) for each and every device that uses
  regexten, but it would be a lot cleaner to be able to use something like
  Dial(SIP/${WHAT_GOES_HERE?}) instead.
  
  So is there a way for the dialplan to determine which device caused SIP to
  auto-register an extension?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Which device auto-registered an extension?

2011-12-16 Thread Barry Miller
On Fri, Dec 16, 2011 at 05:02:11PM +0100, Olle E. Johansson wrote:
 
 16 dec 2011 kl. 02:03 skrev Barry Miller:
 
  So is there a way for the dialplan to determine which device caused SIP to
  auto-register an extension?
 
 Not really, unless someone else can come up with something. 
 
 In Asteirsk, the extension hints are the connection from the dialplan to a 
 device,
 used for subscriptions and blinking lamps.
 
 exten = 543,hint,SIP/devabc
 
 then you can use
 
 exten= _5XX,DIAL(/${HINT})
 
 Which opens up the question on how you enter all the hints...
 
 I know Tilghman added something clever recently to new versions of Asterisk, 
 but I 
 haven't used it myself so I can't describe how it works.

Thanks.  I like to keep devices and extensions separate, for security reasons, 
and it's a
pain having to define the association in different places, especially when 
sip.conf seems
like the logical place to do this.  Do you think if I were to code up a 
function like
AUTOREG([context,]exten) that returned 1 for auto-registered extensions, 0 
otherwise, and
set a channel variable to the registering device name, it might be useful 
enough to be
accepted as a feature?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Which device auto-registered an extension?

2011-12-15 Thread Barry Miller
Hi all,

In sip.conf:
  [general]
  regcontext = autoreg

  [devabc]
  regexten = 543

creates exten= 543,1,Noop(devabc) in context autoreg when devabc
registers.  But I can't use exten= _5XX,2,Dial(SIP/${EXTEN}) in the
dialplan, because there's no device SIP/543.  Now I know I can add a line
like exten= 543,2,Dial(SIP/devabc) for each and every device that uses
regexten, but it would be a lot cleaner to be able to use something like
Dial(SIP/${WHAT_GOES_HERE?}) instead.

So is there a way for the dialplan to determine which device caused SIP to
auto-register an extension?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] AST-2011-013: Possible remote enumeration of SIP endpoints with differing NAT settings

2011-12-09 Thread Barry Miller
On Thu, Dec 08, 2011 at 04:47:37PM -0600, Asterisk Security Team wrote:
 [...]
 Description  It is possible to enumerate SIP usernames when the general   
  and user/peer NAT settings differ in whether to respond to   
  the port a request is sent from or the port listed for   
  responses in the Via header. In 1.4 and 1.6.2, this would
  mean if one setting was nat=yes or nat=route and the other   
  was either nat=no or nat=never. In 1.8 and 10, this would
  mean when one was nat=force_rport or nat=yes and the other   
  was nat=no or nat=comedia.   

I see that early this year, VOIPPACK (from the folks who brought us
SIPVicious) announced  Additionally we improved vp_sipenumerate to be
able to scan Asterisk servers regardless of the alwaysauthreject option.

I'm guessing this is how they do it.  VOIPPACK isn't free, so it's not as
widely used as SIPVicious, but it seems to show that there's at least one
exploit already out there.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 10.0 CallerID question

2011-10-20 Thread Barry Miller
On Thu, Oct 20, 2011 at 04:41:17PM -0500, Danny Nicholas wrote:
  ... I installed 10.0
 and copied my 1.4 configuration files over.  With a few tweaks everything
 works great except for 1 feature that I specifically went to 10.0 for.  When
 I do an attended transfer, I still get the receptionists caller ID on the
 transferred phone instead of the incoming callerID.  My assumption is that
 there is some new users.conf or sip.conf flag I'm not setting to make this
 functionality work?

Hi.  I think sendrpid and trustrpid in sip.conf are what you're looking
for.  I've meaning to test this since 1.8, but haven't gotten around to
it yet.  I did bookmark this thread from a PIAF forum a while ago

http://pbxinaflash.com/forum/archive/index.php?t-8923.html

that claims that, at least with some phones, attended transfer with
transferee's callerID now works.

I hope this helps.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 10 'database show' CLI command

2011-10-13 Thread Barry Miller
On Thu, Oct 13, 2011 at 10:13:49AM -0500, Kevin P. Fleming wrote:
 On 10/12/2011 07:24 PM, Barry Miller wrote:
 Up through 1.8, 'database show' returned results ordered by key.  In 10,
 the output is unordered (or maybe chronological?).  Is this intentional?
 
 It was not intentional, probably a side-effect of the switch to SQlite 3 
 from BDB. Unfortunately, that command was not documented to produce the 
 database results ordered in any particular order, so this change isn't a 
 bug, just a side-effect.

Thanks.  The only time it really matters to me is on my little test box,
so I'll just keep running a patched db.c there.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 10 'database show' CLI command

2011-10-13 Thread Barry Miller
On Thu, Oct 13, 2011 at 02:52:58PM -0500, Terry Wilson wrote:
  It was not intentional, probably a side-effect of the switch to SQlite 3 
  from BDB. Unfortunately, that command was not documented to produce the 
  database results ordered in any particular order, so this change isn't a 
  bug, just a side-effect.
 
  Thanks.  The only time it really matters to me is on my little test box,
  so I'll just keep running a patched db.c there.
 
 It will be easy enough to change. No real reason for me not to add an 'ORDER 
 BY key' to the get_tree_all SQL statement near the top of the file.

I also added the clause to gettree and showkey stmts, because wildcarding

  database show abc%
  database showkey 212%

can return many results.  But I'm not sure if anyone besides me cares :)

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Asterisk 10 'database show' CLI command

2011-10-12 Thread Barry Miller
Up through 1.8, 'database show' returned results ordered by key.  In 10,
the output is unordered (or maybe chronological?).  Is this intentional?

(I know 'database query' will let me view the AstDB any way I want, but
the output isn't formatted as nicely.)

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] asterisk rpm build problem

2011-07-22 Thread Barry Miller
On Fri, Jul 22, 2011 at 10:10:01AM +0200, marek cervenka wrote:
 hi,
 
 i'm trying build asterisk rpm
 normal compilation is ok but rpm building always fail
 
 centos6/asterisk 1.8.5.0
 
 any ideas?
 
 
 gcc -o recno/rec_utils.o -c recno/rec_utils.c -MD -MT recno/rec_utils.o 
 -MF .recno_rec_utils.o.d -MP -pthread -Wall -D__DBINTERFACE_PRIVATE -I. 
 -I.. -Iinclude -Ihash -Ibtree -Irecno 
 -I/root/rpmbuild/BUILD/asterisk-1.8.5.0/include -O2 -g -march=i386 
 [snip]
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 undefined reference to `__sync_fetch_and_add_4'
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 undefined reference to `__sync_fetch_and_add_4'
 ccss.o: In function `ast_atomic_fetchadd_int':
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 undefined reference to `__sync_fetch_and_add_4'
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 undefined reference to `__sync_fetch_and_add_4'
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 undefined reference to `__sync_fetch_and_add_4'
 cdr.o:/root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 more undefined references to `__sync_fetch_and_add_4' follow
 utils.o: In function `ast_atomic_dec_and_test':
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:646: 
 undefined reference to `__sync_sub_and_fetch_4'
 utils.o: In function `ast_atomic_fetchadd_int':
 /root/rpmbuild/BUILD/asterisk-1.8.5.0/include/asterisk/lock.h:600: 
 undefined reference to `__sync_fetch_and_add_4'

I do not use centos (or build rpms, for that matter), but at least on
OpenBSD the -march=i386 causes the same undefineds you are seeing.

I have to force i686 when configuring asterisk:
./configure --prefix=/usr/local CFLAGS=-march=i686 
for the build to succeed.

I'm not sure if this applies in your case, but maybe it will help.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Requires

2011-07-18 Thread Barry Miller
On Mon, Jul 18, 2011 at 11:02:16AM +0530, mahesh katta wrote:
 Sorry boss
 Best Regards,

Mahesh, I'm afraid that at some point Ashirwad will become annoyed
that you are including the asterisk-users list on these emails.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Stripping characters from ${CALLERID(num)} ?

2011-07-07 Thread Barry Miller
On Thu, Jul 07, 2011 at 12:55:37PM -0500, Tim Nelson wrote:
 - Original Message -
  On Thu, 7 Jul 2011, Tim Nelson wrote:
  
   On occasion, I have calls coming into an Asterisk 1.2.x system where
   the
   ${CALLERID(num)} includes '-'. Ex:
  
   123-456-7890
  
   How can I strip the dashes from the number, leaving me with
   '1234567890'?
  
  I would do this in an AGI written in C -- but that's just me...
  
  SNIP
 
 Let's assume, hypothetically, I'm looking for a simpler solution directly 
 in the dialplan or via a quick run of System(). :-)

I'm pretty sure that 1.2 has the FILTER dialplan function, so

   exten = Set(CALLERID(num)=${FILTER(0123456789|${CALLERID(num)})})

should work.

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] broken SVN asterisk 1.8 ?

2011-06-05 Thread Barry Miller
On Sun, Jun 05, 2011 at 04:18:25PM +, satish patel wrote:
 
 Hey guys!
 
 I have just download latest SVN Revision 322051 and compile and install but 
 my asterisk -V showing still old version :( is it broken ?
 
 /usr/sbin/asterisk -V
 Asterisk SVN-branch-1.8-r321926

asterisk -V shows the last changed revision in the build.

To see the difference, try:

   cd asterisk-src-dir
   svnversion
   svnversion -c

-- 
Barry 

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] DAHDI custom ring cadences in 1.8.3

2011-03-27 Thread Barry Miller
When did Dial() with a custom ring cadence replace the default from
indications.conf for subsequent calls?

indications.conf:
ringcadence = 2000,4000

asterisk -rx dahdi show cadences
r1: 667,1333

extensions.conf:
exten= 201, 1, Dial(DAHDI/1)
exten= 202, 1, Dial(DAHDI/1r1)
exten= 203, 1, Dial(DAHDI/1r0)

Dialing, in sequence:
201 - 2000,4000; Good  
202 - 667,1333 ; Good
201 - 667,1333 ; Huh?
203 - 2000,4000; r0 seems to be default cadence
201 - 2000,4000

Do I now need to specify r0 every time I dial an FXS line to be sure it
will use the default cadence in case I've previously used a custom one?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] wrong time retrieved from system command

2011-03-21 Thread Barry Miller
On Mon, Mar 21, 2011 at 07:45:37PM +0800, asterisk asterisk wrote:
 ${STRFTIME(${EPOCH},GMT+8,%G%m%d-%H%M%S)}
 
 I use the above command to get the system date and time
 
 it returns 20110321-034329
 
 but it is exactly 8 hours early than the system time when I type date in
 linux terminal
 
 Mon Mar 21 19:43:35 HKT 2011

Have you tried ${STRFTIME(${EPOCH},Hongkong,%G%m%d-%H%M%S)} ?

$ date ; TZ=UTC date ; TZ=Hongkong date
Mon Mar 21 10:13:31 EDT 2011
Mon Mar 21 14:13:31 UTC 2011
Mon Mar 21 22:13:31 HKT 2011

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] uptime

2011-02-16 Thread Barry Miller
On Mon, Feb 14, 2011 at 10:39:20PM -0500, Jeff LaCoursiere wrote:
 
 Now this is what I call uptime...
 
 minipbx*CLI show uptime
 System uptime: 41 years, 7 weeks, 6 days, 3 hours, 26 minutes, 46 seconds
 Last reload: 8 hours, 3 minutes, 51 seconds
 
 Bizarre bug?

Hi.  I see that 41 years, 7 weeks,...,46 seconds is

$ TZ=EST5EDT date -d @`dc -e '41 365*7 7*+6+24*3+60*26+60*46+p'`
Mon Feb 14 22:26:46 EST 2011

about 13 min. before your post, meaning Asterisk apparently used 0 as
its start time when calculating uptime.  How do you set the system time?

Is it possible that Asterisk starts before the time is set?  Do you run
ntpdate -b at startup, or set the time by some other means before
the boot completes?

Could this result in some really humorous CDRs?

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 1.8 MIBs

2011-01-03 Thread Barry Miller
On Mon, Jan 03, 2011 at 08:04:48PM -0800, Kirill Katsnelson wrote:
 Cannot find asterisk-mib.txt and digium-mib.txt anywhere. Were they dropped?

They're now part of the wiki.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions
https://wiki.asterisk.org/wiki/display/AST/Digium+MIB+Definitions

-- 
Barry

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] S110M not working

2010-11-16 Thread Barry Miller
On Tue, Nov 16, 2010 at 01:17:08PM -0500, Noah Miller wrote:
 Hi All -
 
 I pulled from a working system a TDM400 with one s110 fxs and three
 x100 fxos.  I put it into a new box and the fxs no longer works.  The
 fxos work just fine.  I thought it was odd, but I chalked it up to a
 random chance failure and ordered another s110.  The replacement
 doesn't work either, and now I'm confused.
 
 dahdi_scan recognizes the s110, but it says it fails.  Output looks like this:
 
 [2]
 active=yes
 alarms=OK
 description=Wildcard TDM400P REV E/F Board 5
 name=WCTDM/4
 manufacturer=Digium
 devicetype=Wildcard TDM400P REV E/F
 location=PCI Bus 05 Slot 01
 basechan=5
 totchans=4
 irq=169
 type=analog
 port=5,FXO
 port=6,FXO
 port=7,FXO
 port=8,FXS FAILED
 
 I tried moving both the s110s to other positions on the TDM400, but it
 fails in all of them.
 
 Is this a power issue?  The system it's in only has sata power
 connectors, so I had to splice on an ide power connector.  Both the 5v
 and 12v lines are connected through all the way from the power supply
 to the tdm400 card.
 
 If I force the issue, and manually configure the s110 like this:
 ---
 fxoks=8
 echocanceller=mg2,8
 ---
 the dahdi startup script throws this error:
 
 Running dahdi_cfg:  DAHDI_CHANCONFIG failed on channel 8: Invalid argument 
 (22)
 Selected signaling not supported
 Possible causes:
 FXO signaling is being used on a FXO interface (use a FXS
 signaling variant)
 RBS signaling is being used on a E1 CCS span
 Signaling is being assigned to channel 16 of an E1 CAS span
 
 
 Have I bungled the power connection and/or the config, or am I just
 extremely unlucky and have two bad s110s?

Hi.  FXS cards use FXO signalling, and vice versa.  Think of it this way:
FXS cards want to look like a CO when talking to stations, and FXO cards
want to look like a phone when talking to a CO.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] S110M not working

2010-11-16 Thread Barry Miller
On Tue, Nov 16, 2010 at 01:55:32PM -0500, Noah Miller wrote:
  Hi.  FXS cards use FXO signalling, and vice versa.  Think of it this way:
  FXS cards want to look like a CO when talking to stations, and FXO cards
  want to look like a phone when talking to a CO.
 
 Thanks, Barry.  I am aware of this.  You'll notice in the config line
 that I used fxo signalling.
 
 I'm just thinking that the failure that dahdi_scan see may be because
 the s110 isn't getting power.

Sorry.  I write faster than I read.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Why are the hackers scanning for these?

2010-11-07 Thread Barry Miller
On Sun, Nov 07, 2010 at 07:11:43AM -0700, Steve Murphy wrote:
 Hey, I'm going thru logs, and I see some very common and interesting things
 that the hackers are looking for.
 
 In a whole bunch of scans, I've noticed that the first guess or two for sip
 accounts
 is usually a 10-digit number. I'm asking myself, why these numbers? Are they
 looking
 for a voip trunk? Or is it just like a serial number for the scan? What?

It's SIPVicious.  Before it starts its sequential scan, it makes sure
that it can tell the difference between a valid peer and an unknown one.

It tries two random peers, expecting a 404 response to at least one (most 
likely both) of them.  Then, if it later gets a 401 during the sequential
scan, it knows it's found a good peer name that can be targeted for
password guessing.

On the other hand, if both random guesses elicit 401 responses to
REGISTERs, it knows that it can't winnow out the real peers, and (normally)
just gives up right there.  That's why 'alwaysauthreject' is so effective
at stopping the attacks (as opposed to blocking them).  But if the attacker
uses the '--force' option, which causes the scan to press on regardless, or
something other than SIPVicious, only something like fail2ban will help,
but that won't save your bandwidth like 'alwaysauthreject' will.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Under heavy attack

2010-10-30 Thread Barry Miller
On Sun, Oct 31, 2010 at 03:23:52AM +0200, Tzafrir Cohen wrote:
 On Sat, Oct 30, 2010 at 01:43:49PM -0600, Joel Maslak wrote:
  Is there really any benefit to blocking these, if you use good passwords?
 
 Regardless of any threat from those attacks succeeding, they completely
 saturated the uplink in our ADSL-connected office.
 
 What are they after, anyway? Merely cheap international calls?

I'm guessing free PSTN access.  They don't want to DoS you.  The scans
are an attempt to collect valid extensions for later password guessing
attempts.  Every one I've seen has used svwar (from SIPVicious), which
by default will give up if it can't tell the difference between trying
to register (or invite) an unknown peer and a known one.  This is why
alwaysauthreject = yes is so effective, even though it bends RFC3261
a bit.

But keep using fail2ban, too.  svwar.py --force will cause it to scan
regardless of response code.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8.0 Release Candidate 5 Now Available

2010-10-19 Thread Barry Miller
On Tue, Oct 19, 2010 at 09:59:34AM -0400, Leif Madsen wrote:
 On 10-10-18 11:01 PM, Barry Miller wrote:
  On Mon, Oct 18, 2010 at 07:58:07PM -0400, Asterisk Development Team wrote:
  On 10-10-18 07:54 PM, Asterisk Development Team wrote:
  For a full list of changes in the current release candidate, please see 
  the
  ChangeLog:
 
  http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.0-rc4
 
  Apologies, this link should be:
 
  http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.0-rc5
 
  -- The Asterisk Development Team
 
  Is it worth mentioning somewhere (ChangeLog? This list?) that all the
  asterisk-core-sounds tarballs were updated today?  It would remind someone
  [me!] who's trying to upgrade from an earlier rc to rc5 a chance to do a
  'make sounds' before stopping asterisk for the install.  My test system is
  on a slow link, and waiting for the tarball downloads in the middle of
  installing is frustrating.
 
 
 If you deselect the sounds from menuselect then you don't have to wait for 
 them 
 to download, and you can update them at your convenience later.

Thanks.  I would not have thought of that.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8.0 Release Candidate 5 Now Available

2010-10-18 Thread Barry Miller
On Mon, Oct 18, 2010 at 07:58:07PM -0400, Asterisk Development Team wrote:
 On 10-10-18 07:54 PM, Asterisk Development Team wrote:
  For a full list of changes in the current release candidate, please see the
  ChangeLog:
 
  http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.0-rc4
 
 Apologies, this link should be:
 
 http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.0-rc5
 
 -- The Asterisk Development Team

Is it worth mentioning somewhere (ChangeLog? This list?) that all the
asterisk-core-sounds tarballs were updated today?  It would remind someone
[me!] who's trying to upgrade from an earlier rc to rc5 a chance to do a
'make sounds' before stopping asterisk for the install.  My test system is
on a slow link, and waiting for the tarball downloads in the middle of
installing is frustrating.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to find .gsm audio file length or duration

2010-10-16 Thread Barry Miller
On Sat, Oct 16, 2010 at 04:12:14PM +0530, RAJNIKANT VANZA wrote:
 Hi Friends,
 
 I need to find .gsm file length or duration.
 
 *E.g.*
 demo-congrats.gsm
 
 sox demo-congrats.gsm -e stat
 
 Above command is display file length in seconds. like as
 Length (seconds): 27.96
 
 I want to .gsm file length or duration in dialplan.

   Set(DUR=$[${STAT(s,/var/lib/asterisk/sounds/en/demo-congrats.gsm)} / 1650])
   Verbose(Length (seconds): ${DUR})

for asterisk = 1.6

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to find .gsm audio file length or duration

2010-10-16 Thread Barry Miller
On Sat, Oct 16, 2010 at 06:46:20PM +0100, Tiago Geada wrote:
 r you would have to convert that gsm to another format first like ogg

Why on earth would you have to do that?  Did you even try doing what
I suggested?

 
 On 16 October 2010 18:23, Barry Miller asterisk-us...@notanet.net wrote:
 
  On Sat, Oct 16, 2010 at 04:12:14PM +0530, RAJNIKANT VANZA wrote:
   Hi Friends,
  
   I need to find .gsm file length or duration.
  
   *E.g.*
   demo-congrats.gsm
  
   sox demo-congrats.gsm -e stat
  
   Above command is display file length in seconds. like as
   Length (seconds): 27.96
  
   I want to .gsm file length or duration in dialplan.
 
 Set(DUR=$[${STAT(s,/var/lib/asterisk/sounds/en/demo-congrats.gsm)} /
  1650])
Verbose(Length (seconds): ${DUR})
 
  for asterisk = 1.6

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] SIP flood attacK

2010-10-03 Thread Barry Miller
On Sun, Oct 03, 2010 at 02:19:35PM -0600, Greg Saunders wrote:
 Hello all. I was recently the victim of a SIP flood attack. I'm wondering
 what is the best method to prevent such things in the future.

In sip.conf:
[general]
alwaysauthreject = yes

The attacking program is probably svwar.py (part of SIPVicious).  It
will give up as soon as it realizes it can't tell the difference
between attempting to register an invalid extension and a valid one
(with an arbitrary password).

It's the default in 1.8, but the option goes back at least to 1.4.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.8.0 Release Candidate 2 Now Available

2010-09-24 Thread Barry Miller
On Fri, Sep 24, 2010 at 10:25:01PM -0700, Ira wrote:
 At 01:14 PM 9/23/2010, you wrote:
 The Asterisk Development Team has announced the second release candidate of
 Asterisk 1.8.0. This release candidate is available for immediate download at
 http://downloads.asterisk.org/pub/telephony/asterisk/
 
 I downloaded this, ran ./configure followed by make menuselect 
 and I don't seem to have SIP as an available protocol. Is there 
 something I can do to make it available? It works fine on the most 
 recent 1.6 version and it's worked on most of the prior 1.8 versions.

You probably need to install libssl-dev then rerun ./configure.  At
least I did (Debian Lenny).  Seems chan_sip needs res_crypto which
needs libssl.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] http://www.asterisk.org/downloads naming schema

2010-09-22 Thread Barry Miller
On Wed, Sep 22, 2010 at 09:50:00AM -0700, Steve Edwards wrote:
 
 Still, for scripting and portability, I'd recommend specifying the 
 decompressor and using the long option form:
 
   tar\
   --list\
   --[un]gzip\
   --file\
   asterisk-1.4-current.tar.gz

Those are GNU tar options, which {Free,Net,Open}BSD won't like.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] AGI Delimiter in 1.6

2010-09-16 Thread Barry Miller
On Thu, Sep 16, 2010 at 07:44:23PM +0100, Jon Farmer wrote:
 Hi
 
 I am currently using 1.2.x and 1.4.x behind OpenSER. One of the things
 I do on INVITES is to re-authenticate the user from OpenSER. Then when
 the INVITE gets passed to Asterisk I capture the AUTH to a variable in
 the dialplan and pass to an AGI script. I am now trying to set the
 same thing up in 1.6 However because the argument delimter in 1.6 has
 changed from pipe to comma this breaks as the AUTH line is also comma
 delimited. Thus the AGI sees the AUTH as extra arguments instead of a
 single argument. As the AUTH may contain varying number of arguments I
 need a new way for a my AGI to access this data.
 
 Does anyone have any ideas how I might go about this?

For an interim fix, setting res_agi=1.4 in the [compat] section of
asterisk.conf should work.  See UPGRADE-1.6.txt .

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Force ip disconnect after register?

2010-09-13 Thread Barry Miller
On Mon, Sep 13, 2010 at 11:22:33AM -0400, Bryant Zimmerman wrote:
 Is there a way to drop a ip connection to asterisk after a number of 
 register attempts.
 
 I have been having issues with hackers doing registration scanning against 
 our server. We block their address at the fire wall but since asterisk does 
 not force a drop of the connect after so many bad reg attempts I can't 
 enforce the block until they drop and try again. This allows them to run 
 the box with reg attempts as long as they maintain their initial connection 
 or I reset the state tables on the firewall. This is very bad. Is there a 
 way to force the connection to drop and reconnect after let's say 50 
 attempts.

Not an exact answer to your question, but if the attacker is using svwar
(part of SIPVicious), setting alwaysauthreject=yes in sip.conf will make
the probing stop after only TWO tries.  svwar first tries registering a
few longish, random extensions before it begins a sequential or dictionary
scan, to see how you handle unknown extensions.  With alwayauthreject set,
svwar just gives up, complaining:

ERROR:TakeASip:SIP server replied with an authentication request for an 
unknown extension. Set --force to force a scan.

I still see 3-4 attempts per week from various sites, but now they stop
after just two failed registration attempts.  Saves lots of wear and tear
on my DSL.  I still run fail2ban, but after setting alwaysauthreject a
few months ago nothing has passed its threshold.  And nothing seems to
have broken, either.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Archive of security advisories?

2010-09-09 Thread Barry Miller
On Thu, Sep 09, 2010 at 12:25:03PM -0500, Carlos Chavez wrote:
   Is there an archive of security advisories for Asterisk?  We recently
 upgraded a customer from 1.2 to 1.4 and now they are asking for
 documentation of all security and bug related fixes.  I know the
 advisories get published on this list but is there an easier way to find
 them than trying to search the list.

Recent ones: http://www.asterisk.org/security

Back to 2007: http://downloads.asterisk.org/pub/security/

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] What can make G.729a codec hostid change?

2010-09-07 Thread Barry Miller
On Tue, Sep 07, 2010 at 04:02:29AM -0700, Kyle Kienapfel wrote:
 On Mon, Sep 6, 2010 at 12:32 PM, Barry Miller 
 asterisk-us...@notanet.netwrote:
 
  After upgrading my small test system from Debian Etch-Lenny via a
  complete reinstall, I find my g729 hostid has changed.  Same machine,
  same CPU, same NIC!  It doesn't seem reasonable that I have to burn
  my one no-hassle re-registration for a simple OS upgrade.
 
  The README only says that hostid is based on MAC addresses of all NICs,
  but that doesn't seem to be true.  Does anyone know anything else that
  might cause g729 to compute a different hostid?
 
 Just one nic? I don't know much about licensing but I do know that if you
 swap ethN assignments on network cards the hostid changes.

Yes.  Just the lone integrated NIC that's always been there.  NO hardware
changes.  Still eth0 with the same MAC address.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] What can make G.729a codec hostid change?

2010-09-07 Thread Barry Miller
On Tue, Sep 07, 2010 at 07:43:45PM +0100, Tiago Geada wrote:
 Hi,
 
 I don't have any g729 codec license. But by reading Barry's complaint I get
 to think that it is really unfair that Digium can't renew his license or
 something.
 
 I am a Debian user myself and I understand the need to upgrade from etch to
 lenny (and to squeeze in no time).
 Having a kernel built on purpose to remove some modules is out of line.
 
 A better solution needs to be provided in cases like these.
 
 On 7 September 2010 19:15, Roger Burton West ro...@firedrake.org wrote:
 
  On Tue, Sep 07, 2010 at 10:58:18AM -0700, Dave Platt wrote:
 
  Note that ifconfig will not necessarily show all of your
  interfaces (hard- or soft-) - only the active, configured ones.
 
  ifconfig -a would help here. Kernel upgrades often seem to bring in new
  default interfaces.
 
  If this turns out to be the problem, rmmod or a custom kernel
  compilation may do the trick. (Of course if you've _lost_ an interface
  you were using under etch this may be more of a problem.)

I posted here before contacting Digium.  They have been helpful.

Here is what I've found :

An old Etch dmesg shows this:

  eth0: VIA Rhine II at 0x1cc00, 00:13:d4:f5:e3:e6, IRQ 10.
  eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 41e1.
  eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)
  eth1: link up, 100Mbps, full-duplex, lpa 0x41E1

Current (Lenny) dmesg:

  [8.257495] eth0: VIA Rhine II at 0x1cc00, 00:13:d4:f5:e3:e6, IRQ 10.
  [8.258221] eth0: MII PHY found at address 1, status 0x786d advertising 
05e1 Link 41e1.
  [   39.188147] eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

And a diff between Etch  Lenny /etc/network/interfaces:

  9,10c9,10
   allow-hotplug eth1
   iface eth1 inet static
  ---
   allow-hotplug eth0
   iface eth0 inet static

So even though the PHY is eth0 on both, it winds up as eth1 on Etch,
(because of the Firewire?), but eth0 on Lenny.

I have to admit, I never saw that one coming.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] SOLVED: What can make G.729a codec hostid change?

2010-09-07 Thread Barry Miller
On Mon, Sep 06, 2010 at 03:32:35PM -0400, Barry Miller wrote:
 After upgrading my small test system from Debian Etch-Lenny via a
 complete reinstall, I find my g729 hostid has changed.  Same machine,
 same CPU, same NIC!  It doesn't seem reasonable that I have to burn
 my one no-hassle re-registration for a simple OS upgrade.
 
 The README only says that hostid is based on MAC addresses of all NICs,
 but that doesn't seem to be true.  Does anyone know anything else that
 might cause g729 to compute a different hostid?

G.729a is happy again.  I'm not sure how many people will be affected
by this, but here's what fixed it here:

Etch loads eth1394.ko, Lenny doesn't.  Why, I don't know.  But it caused
the eth0 PHY to become iface eth1.  To get things working again, I added
alias eth0 eth1394 to modprobe.conf, and swapped eth0-eth1 in
udev/rules.d/70-persistent-net.rules and network/interfaces.  If there's
a simpler way to do this, please let me know.

Now my original hostid is back.  Thanks, everybody.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] What can make G.729a codec hostid change?

2010-09-06 Thread Barry Miller
After upgrading my small test system from Debian Etch-Lenny via a
complete reinstall, I find my g729 hostid has changed.  Same machine,
same CPU, same NIC!  It doesn't seem reasonable that I have to burn
my one no-hassle re-registration for a simple OS upgrade.

The README only says that hostid is based on MAC addresses of all NICs,
but that doesn't seem to be true.  Does anyone know anything else that
might cause g729 to compute a different hostid?

Console output follows:

Connected to Asterisk SVN-branch-1.6.2-r284958M currently running on secundus 
(pid = 2430)
secundus*CLI g729 show version 
Digium G.729A Module Version 1.6.2.0_3.1.4 (optimized for k6_3_32)
secundus*CLI g729 show hostid 
Host-ID: 02:e1:6c:f6:81:a7:06:b6:4d:fc:94:49:83:c5:3e:71:a4:0f:1b:2c
secundus*CLI g729 show licenses 
0/0 encoders/decoders of 0 licensed channels are currently in use

Licenses Found:
File: G729-2028.lic -- Key: G729-2028 -- Host-ID: 
98:3e:89:19:af:0c:11:32:49:cc:fc:9b:e4:92:63:bb:fc:0b:26:4d -- Channels: 0 
(incorrect host-id)
File: G729-4075.lic -- Key: G729-4075 -- Host-ID: 
98:3e:89:19:af:0c:11:32:49:cc:fc:9b:e4:92:63:bb:fc:0b:26:4d -- Channels: 0 
(incorrect host-id)

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk on Ben NanoNote?

2010-08-10 Thread Barry Miller
On Tue, Aug 10, 2010 at 11:24:18AM -0700, C. Chad Wallace wrote:
 
 At 1:42 PM on 10 Aug 2010, Gilles wrote:
 
  I just read an article on the tiny Ben NanoNote:
  
  http://en.qi-hardware.com/wiki/Ben_NanoNote
  
  As CPU, it uses a JZ4720 366 MHz MIPS compatible processor from
  Ingenic Semiconductor Co, and it runs Linux.
  
  Does someone know if Asterisk has been ported to that platform?
 
 The real question is, does it have PCI slots for Digium cards?
 
 And where do I get one of those HUGE coke cans?! ;-)

I'm waiting until the Ben Counterweight project is complete.

http://projects.qi-hardware.com/index.php/p/ben-counterweight/

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] STRFTIME function declared in globals context

2010-07-13 Thread Barry Miller
On Tue, Jul 13, 2010 at 11:30:44AM -0500, Warren Selby wrote:
 I'm trying to declare a few date-related global variables to ease my
 dialplan.  When I declare the following in the [globals] context of
 extensions.conf, I get unexpected results:
 
 YEAR = ${STRFTIME(${EPOCH},,%Y)}
 MONTH = ${STRFTIME(${EPOCH},,%m)}
 DAY = ${STRFTIME(${EPOCH},,%d)}
 TIMESTAMP = ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}
 
 If I evaluate these variables in the dialplan later, using
 
 exten = ,n,Verbose(${TIMESTAMP} - ${YEAR} - ${MONTH} - ${DAY})
 
 My output is as follows:
 
 -- Executing [7...@phones:3] Verbose(SIP/2625-d5f0, Tue Jul 13
 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue
 Jul 13 11:08:42 2010) in new stack
 Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42 2010 - Tue Jul 13 11:08:42
 2010 - Tue Jul 13 11:08:42 2010
 
 However, the following line:
 
 exten = ,n,Verbose(${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)} -
 ${STRFTIME(${EPOCH},,%Y)} - ${STRFTIME(${EPOCH},,%m)} -
 ${STRFTIME(${EPOCH},,%d)})
 
 evaluates with what I expect:
 
 -- Executing [7...@phones:4] Verbose(SIP/2625-d5f0,
 20100713-110853 - 2010 - 07 - 13) in new stack
 20100713-110853 - 2010 - 07 - 13
 
 Is what I'm trying to do possible?  It seems like it's at least recognizing
 that I'm trying to grab a date, but it's not taking the date format
 parameters that I want.

Try adding preload = func_strings.so to modules.conf

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] STRFTIME function declared in globals context

2010-07-13 Thread Barry Miller
On Tue, Jul 13, 2010 at 01:07:34PM -0400, Barry Miller wrote:
 
 Try adding preload = func_strings.so to modules.conf

Ah, sorry.  I just saw your earlier response that said you're on 1.4 -
I was remembering that after I migrated from 1.4 - 1.6, I had to preload
func_db.so so that I could use the DB function in [globals].

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] MAC Address prefixes of Voip equipment

2010-07-12 Thread Barry Miller
On Mon, Jul 12, 2010 at 04:41:16PM +0100, Frank Church wrote:
 Is there a database of MAC address prefixes used the common VoIP
 devices. I see the Linksys Sipura devices state with 00:0E.

See http://standards.ieee.org/regauth/oui/oui.txt

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!

2010-07-01 Thread Barry Miller
On Thu, Jul 01, 2010 at 10:19:08PM -0500, Karl Fife wrote:
 Calls that come in on DAHDI FXO ports are routed to [context], extension 's'
 
 INSTEAD, I would like to route specific ports to specific extensions, For 
 example:
 
 I want DAHDI/1-1 to go to 1234
 I want DAHDI/1-2 to go to 2345
 I want DAHDI/1-3 to go to 3456 ...etc
 
 What is the CLEANEST way to do this?
 
[...]
 
 Is there a way that I can simply specify the extension associated with a 
 given dahdi channel in dahdi_channels.conf? It would seem logical, but I'm 
 finding no love.  If you also know for sure that there ISN'T a way to do 
 what I'm asking, I'd like to know that too.
 
[...]

Do you mean chan_dahdi.conf?  There you can do something like

setvar = EXT=1234
channel = 1

setvar = EXT=2345
channel = 2

and EXT will be passed into your dialplan.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] [CRON] Right way to restart Asterisk and Zaptel?

2010-06-25 Thread Barry Miller
Hi Gilles.  You appear to be both posting to newsgroup
gmane.comp.telephony.pbx.asterisk.user AND sending the same message
directly to the asterisk-users list.  This means that we list subscribers
see two copies of all your messages: one from gmane, one from you.  (They
don't show up that way on gmane because it suppresses duplicates.)

Can you please pick one or the other?  Thanks.  Sorry for interrupting.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.6.2 WARNING[23042]: acl.c:392 ast_get_ip_or_srv: Unable to lookup 'whsvoip.globalipcom.com'

2010-06-15 Thread Barry Miller
On Tue, Jun 15, 2010 at 07:50:36PM +0500, Faisal Hanif wrote:
 Hi,
 
 We are using Asterisk 1.6.2 and it is continually failing to resolve Verizon
 SRV and sending following message,
 
 WARNING[23042]: acl.c:392 ast_get_ip_or_srv: Unable to lookup
 'whsvoip.globalipcom.com'
 
 DNS settings on OS level is working fine.
 
 Can anyone have an idea about it?

I think asterisk only does UDP DNS queries.  The response here is too long.

$ dig _sip._udp.whsvoip.globalipcom.com SRV
;; Warning: Message parser reports malformed message packet.
;; Truncated, retrying in TCP mode.

;  DiG 9.3.4  _sip._udp.whsvoip.globalipcom.com SRV
;; global options:  printcmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: NOERROR, id: 63565
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;_sip._udp.whsvoip.globalipcom.com. IN  SRV

;; ANSWER SECTION:
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy20.nl.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy00.de.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy00.nl.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy00.uk.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy10.de.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy10.nl.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy10.uk.whsvoip.globalipcom.com.
_sip._udp.whsvoip.globalipcom.com. 860 IN SRV   0 0 5060 
whs-proxy20.de.whsvoip.globalipcom.com.

;; Query time: 3 msec
;; SERVER: 66.92.213.114#53(66.92.213.114)
;; WHEN: Tue Jun 15 11:28:09 2010
;; MSG SIZE  rcvd: 515

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.6.2 WARNING[23042]: acl.c:392 ast_get_ip_or_srv: Unable to lookup 'whsvoip.globalipcom.com'

2010-06-15 Thread Barry Miller
On Tue, Jun 15, 2010 at 09:35:37PM +0500, Faisal Hanif wrote:
 Hi,
 
 I am also wonder that same SRV record is working fine on one machine but not
 on 2nd while both have same asterisk version.
 
 It may be some missing OS utilities which asterisk using to resolve SRV?

Could be. To test, does replacing whsvoip.globalipcom.com with, say,
whs-proxy00.de.whsvoip.globalipcom.com (or whatever is reachable) make
it work?  What is different about the two machines you've tried?

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.6.2 WARNING[23042]: acl.c:392 ast_get_ip_or_srv: Unable to lookup 'whsvoip.globalipcom.com'

2010-06-15 Thread Barry Miller
On Tue, Jun 15, 2010 at 10:40:06PM +0500, Faisal Hanif wrote:
 Till now I am not able to find any difference between both machines.
 Can you please tell me how I can try to resolve it on OS level using some
 utility like dig?
 
 On Tue, Jun 15, 2010 at 09:35:37PM +0500, Faisal Hanif wrote:
  Hi,
  
  I am also wonder that same SRV record is working fine on one machine but
 not
  on 2nd while both have same asterisk version.
  
  It may be some missing OS utilities which asterisk using to resolve SRV?
 
 Could be. To test, does replacing whsvoip.globalipcom.com with, say,
 whs-proxy00.de.whsvoip.globalipcom.com (or whatever is reachable) make
 it work?  What is different about the two machines you've tried?

Hmm. I see something odd.  My initial dig came back with a length of 515
bytes.  Then:

;  DiG 9.3.4  @auth210.ns.uu.net 
_sip._udp.whsvoip.globalipcom.com SRV +ignore
[lines deleted]
;; SERVER: 195.129.12.74#53(195.129.12.74)
;; WHEN: Tue Jun 15 16:39:09 2010
;; MSG SIZE  rcvd: 457

Then:

;  DiG 9.3.4  @auth210.ns.uu.net 
_sip._udp.whsvoip.globalipcom.com SRV
[lines deleted]
;; SERVER: 195.129.12.74#53(195.129.12.74)
;; WHEN: Tue Jun 15 16:39:59 2010
;; MSG SIZE  rcvd: 515

The difference is that sometimes one more server is returned, pushing
the response over 512 bytes.

Now it's back to 457.  I suspect that they know there's a problem, and
are trying to figure out what to do about it.  (maybe shorten their
server names by one or two characters each?)

So depending on when each of your boxes happens to issue the SRV query,
they could very well be identical but get different results.

I doubt it will help, but you can try quoting RFC 2782, Currently
there's a practical limit of 512 bytes for DNS replies.  Until all
resolvers can handle larger responses, domain administrators are
strongly advised to keep their SRV replies below 512 bytes.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Time variables in system application

2010-06-02 Thread Barry Miller
On Wed, Jun 02, 2010 at 10:26:12AM -0400, khalid touati wrote:
 Hi Guys,
 for people who may have the same issue:
 i was just not using STRFTIME the right way, after consulting docs, i'm
 using it like this:
 exten =
 ,n,Set(FAXFILENOEXT=/var/spool/asterisk/fax/${STRFTIME(${EPOCH},America/New_York,%F_%T)})
 
 instead of this:
 exten =
 ,n,Set(FAXFILENOEXT=/var/spool/asterisk/fax/${STRFTIME(${EPOCH},GMT-5,%F_%T)})
 and it's displaying the right time now!!

If all you want is your system's idea of the current local time, you can
simplify it to:

exten =
,n,Set(FAXFILENOEXT=/var/spool/asterisk/fax/${STRFTIME(,,%F_%T)})

Sorry for replying so late.  I somehow missed this thread back in April.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] iax calls via checkbox.cc

2010-05-11 Thread Barry Miller
On Tue, May 11, 2010 at 04:42:30PM -0600, Joseph wrote:
 On 05/11/10 17:22, lists-asterisk-us...@yoinks.net wrote:
 Joseph wrote:
  Is anybody using checkbox.cc to make iax2 calls?
  They have recently did some changes and my calls no no longer go through.
 
  They don't have a best service either, not replying to emails..
 
 
 
 I don't know about that company, but since you are sounding unhappy with 
 them, have you looked into callwith.us?
 
 -Brandon Broyles
 
 I think I will go back to callwith.us.
 I think they only take paypal 
 
 checkbox.cc is not customer friendly.

CallWithUs dropped IAX when they converted to FreeSWITCH.

But I still use them at home, and their email-only support and call
quality remain good.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Changing storm-prevention behaviour in logger.conf

2010-04-18 Thread Barry Miller
On Sun, Apr 18, 2010 at 08:21:57PM +0200, Remco Bressers wrote:
 
 On Apr 18, 2010, at 12:40 AM, Barry Miller wrote:
 
  On Sat, Apr 17, 2010 at 11:14:23PM +0200, Remco Bressers wrote:
  Dear List,
  
  According to https://issues.asterisk.org/view.php?id=14905 there is a storm
  prevention mechanism in newer Asterisks. If i look in my logfile, i see : 
  
  [2010-04-17 15:12:01] NOTICE[1190] chan_sip.c: Registration from '
  sip:x...@xxx.xxx.xxx.xxx' failed for 'xx.xx.xx.xx' - Wrong password
  [2010-04-17 15:12:01] NOTICE[1190] chan_sip.c: Last message repeated 3
  times
  
  This IS a good thing to do, but i want to disable this behaviour. We are
  using fail2ban to ban scripts and people from the Asterisk system. On
  version 1.4.23 this worked fine, but now this mechanism is in place, i
  cannot use fail2ban anymore.
  
  Is there any option to disable this behaviour, or even better, add it to
  logger.conf so anybody can decide what to do? I just want all logging and 
  it seems impossible now.
  Maybe a patch on the source?
  
  If you use a newer version of rsyslogd to do your logging, there is a
  global configuration directive:
  
  $RepeatedMsgReduction off
  
  that will do what you are asking.  The issue #14905 patch you mention is
  not in 1.6.2.x.
 
 
 Hi,
 
 Well, this sounds fair, but this happened after an upgrade to 1.4.29 from 
 1.4.23. Nothing else changed in my setup after that.
 
 My logger.conf :
 
 [general]
 dateformat=%F %T
 
 [logfiles]
 console = notice,warning,error
 messages = notice,warning,error
 
 This tells me i'm not using the syslog feature at all and 
 /var/log/asterisk/messages is generated by Asterisk and not by syslogd 

Hi.

First, I'm sorry I didn't look more closely at your in your example.  Of
course you're not using syslog, but rather asterisk's own logging.

Second, I just downloaded 1.4.29.  The patch that does the message
repeated stuff is just not there, as Tilghman said.  Is it possible that
someone applied that patch to your source?  Have you tried downloading
the 1.4.29 tarball again and recompiling?  If you installed asterisk as
a package from somebody's repo, I can't really say, but it seems highly
unlikely that the patch would be present.

I hope this helps a little bit.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Changing storm-prevention behaviour in logger.conf

2010-04-17 Thread Barry Miller
On Sat, Apr 17, 2010 at 11:14:23PM +0200, Remco Bressers wrote:
 Dear List,
 
 According to https://issues.asterisk.org/view.php?id=14905 there is a storm
 prevention mechanism in newer Asterisks. If i look in my logfile, i see : 
 
 [2010-04-17 15:12:01] NOTICE[1190] chan_sip.c: Registration from '
 sip:x...@xxx.xxx.xxx.xxx' failed for 'xx.xx.xx.xx' - Wrong password
 [2010-04-17 15:12:01] NOTICE[1190] chan_sip.c: Last message repeated 3
 times
 
 This IS a good thing to do, but i want to disable this behaviour. We are
 using fail2ban to ban scripts and people from the Asterisk system. On
 version 1.4.23 this worked fine, but now this mechanism is in place, i
 cannot use fail2ban anymore.
 
 Is there any option to disable this behaviour, or even better, add it to
 logger.conf so anybody can decide what to do? I just want all logging and it 
 seems impossible now.
 Maybe a patch on the source?

If you use a newer version of rsyslogd to do your logging, there is a
global configuration directive:

$RepeatedMsgReduction off

that will do what you are asking.  The issue #14905 patch you mention is
not in 1.6.2.x.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems with Fax over TDM410P

2010-04-13 Thread Barry Miller
On Tue, Apr 13, 2010 at 06:59:01PM -0400, David Backeberg wrote:
 On Tue, Apr 13, 2010 at 6:55 PM, David Backeberg dbackeb...@gmail.com wrote:
  On Tue, Apr 13, 2010 at 4:12 PM, Danny Dias ing.diasda...@gmail.com wrote:
  What do you mean with problems on my configuration?
  ?This is a FXO port on zapata:
  signalling=fxs_ks
  group=0
  channel = 1
  Not a FXS...can you explain to me what were you trying to say?
 
  http://www.voip-info.org/wiki/view/Asterisk+config+zapata.conf#SignallingType
 
  Yep.
  If you say that's an fxo port, that's a disagreement between what you
  told me and what you told the DAHDI layer.
  You told DAHDI it's fxs.
  Try changing the config to say fxo and tell us what happens.
 
 Of course, after re-reading what I just wrote, I think I have it backwards.

You do.  FXO ports want fxs signalling, and vice-versa.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] CallerID and distinctive ring detection

2010-03-03 Thread Barry Miller
Using distinctive ring detection with bell202 cid, is there any way to tell
DAHDI to sometimes expect the cid after the 2nd ring, other times after the
1st?  

I just added RingMaster service (2nd DID w/ distinctive ring) to a TDM800P
FXO line.  No problem setting dringcontext for the 2nd DID.  The 1st DID
works normally, but I get no CallerID on the 2nd because the call is picked
up before the FSK spill is sent.

In both cases, the spill is sent about 2.8 secs after the start of the 1st
ring, and 0.7 secs after the (1st or 2nd) ring ends.  But after the default
cadence, DAHDI waits for the spill.  After the dring cadence, the pickup is
almost immediate (about 0.5 sec).

Anybody have any suggestions?  distinctiveringaftercid doesn't help.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] string length in dialplan

2010-02-22 Thread Barry Miller
On Mon, Feb 22, 2010 at 12:57:30PM -0500, Leif Madsen wrote:
 Jerry Geis wrote:
  I am trying to find out how I can tell the length of a string actually
  CALLERID(num) in the dialplan.
  
  How is that done?
  
  If need to test the length of the CALLERID(num) if its less the 10 digits I
  need to set it to a known value or insert 0's at the beginning until it 
  is 10 digits in length.
  My PRI provider needs it set to 10 digits always.
 
 ...stuff before...
 exten = _NXXNXX,n,GoSub(set_cid,1())
 ...stuff after...
 
 exten = set_cid,1,NoOp()
 exten = set_cid,n,Set(CURRENT_CID_LENGTH=${LEN(${CALLERID(num)})})
 exten = set_cid,n,GotoIf($[${CURRENT_CID_LENGTH} = 10]?skip_modify_cid)
 exten = set_cid,n,While($[${LEN(${CALLERID(num)})}  10])
 exten = set_cid,n,Set(CALLERID(num)=0${CALLERID(num)})
 exten = set_cid,n,EndWhile()
 exten = set_cid,n(skip_modify_cid),Return()
 
 
 There is likely a more efficient way of doing that, but I haven't gone 
 through 
 and looked at the functions to see if there might be a way of avoiding the 
 loop :)

His provider wants 10 digits always, so

  exten = set_cid,n,Set(FOO=00${CALLERID(num)})
  exten = set_cid,n,Set(CALLERID(num)=${FOO:-10})

would work, but in that case he's likely going to present annoying CIDs
like 000666 to his callees.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] agi debug in Asterisk 1.6?

2010-02-13 Thread Barry Miller
On Sun, Feb 14, 2010 at 04:50:06AM +0100, Alejandro Recarey wrote:
 Much to my surprise I tried to debug an AGI script today with agi
 debug on the Asterisk CLI and it did not work. Plus, I could find no
 reference on lie of it being removed.
 
 Is there another name for that command? I scanned the CLI help but
 found nothing similar. Both my 1.6 boxes do not have the command but
 my 1.4 box does.
 
Syntax changed from 1.4.  In 1.6 it's agi set debug on.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dial script

2010-02-06 Thread Barry Miller
Here's a .sig from the m...@openbsd list, (which I couldn't resist
top-posting.)

  A: Because it messes up the order in which people normally read text.
  Q: Why is top-posting such a bad thing?
  A: Top-posting.
  Q: What is the most annoying thing in e-mail?

On Sat, Feb 06, 2010 at 10:13:42AM -0800, Steve Edwards wrote:
 On Sat, 6 Feb 2010, Michelle Dupuis wrote:
 
 [snip]
 
  Oh wait, the advent of computers has allowed us to conveniently insert 
  the most recent text at the TOP of a message, to prevent people from 
  having to reread the same stuff every time.
 
 A: Because we read from top to bottom, left to right.
 
 Q: Why should i start my reply below the quoted text?
 
 Just because you can do something with a computer doesn't mean you should.
 
  Just because this list's moderator has chosen bottom posting doesn't 
  make it right, logical, common sense, etc.
 
 (These lists are not moderated...)
 
 The list owner's choice did not make bottom posting right, logical and 
 common sense. It was all of those things already. The list owner just made 
 the right choice.
 
  How about we don't belittle people who don't notice?
 
 (I don't think I belittled anyone for top-posting.)
 
 We all make mistakes, but once we are informed, continuing to make the 
 same mistakes indicates either a lack of consideration or stupidity or 
 both.
 
 Simple courtesy would be to only include relevant sections of previous 
 posts and to reply below the quoted text.
 
 If you don't like the rules of the playground, find another playground.

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Gotoif Question

2010-02-04 Thread Barry Miller
I think the quotes cause the values to be compared as strings, not
numbers.  The old shell programmer's trick (which allows for empty
strings):

exten = s,n,GotoIf($[0${SPEECH_SCORE(0)} = 0${THRESHOLD}]?:tag)

ought to cause a numeric comparison.

-- 
Barry

On Thu, Feb 04, 2010 at 09:42:18AM -0600, Danny Nicholas wrote:
 Hi Gang,
 
  I'm working on a lumenvox app and am having fun with the
 Gotoif's on speech/DTMF recognition.  If you're using DTMF to enter a number
 instead of speech to enter a numeric value, the engine will often return a
 confidence score of 1000 instead of 1-999.  Therefore this Gotoif fails:
 
 exten = s,n,GotoIf($[${SPEECH_SCORE(0)} = ${THRESHOLD}]?:tag)
 
  
 
 ${THRESHOLD} was set to 850.
 
 If SPEECH_SCORE(0) = 850 (1-850) fails
 
 851-999 succeeds
 
 1000 fails
 
  
 
 My workaround was this:
 
 exten = s,n,GotoIf($[${SPEECH_SCORE(0)} = 1000]?tag)
 
 exten = s,n,GotoIf($[${SPEECH_SCORE(0)} = ${THRESHOLD}]?:tag)
 
  
 
 Is there a better way than using to Gotoif's per evaluation?
 
  
 
 Regards,
 
  
 
 Danny Nicholas
 
  
 

 -- 
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Unable to create channel of type 'DAHDI' (cause 0- Unknown)

2010-01-28 Thread Barry Miller
Interesting.  I had the same problem last Sept with a TDM800, DAHDI 2.2.0.2.

Shaun Ruffel of Digium pointed me to
  https://issues.asterisk.org/file_download.php?file_id=22725type=bug
which fixed it for me.  This fix is already in 2.2.1.

-- 
Barry

On Thu, Jan 28, 2010 at 07:30:57PM -0600, Karl Fife wrote:
 I have had the exact same problem for over a year on my server sporting the 
 TDM800 but NOT on my server with the TE212P.  Both servers run the same 
 version of Linux, Asterisk and DHADI.
 
 The problem has remained consistent through all versions of DAHDI 2.0.x 
 through 2.2.0.2, and every version of Asterisk which I have I've tried which
 includes various iterations of 1.6.0, 1.6.1, and 1.6.2.  Currently 1.2.6.1. 
 Surprisingly I also observe that I can even compile  install NEW versions 
 of Asterisk and/or DAHDI, and NOT observe the bug provided that I do NOT 
 bounce the server.
 
 A developer (not an asterisk developer) named Jim Duda posted this issue to 
 the list back in October of 08.   (Asterisk 1.6.0-beta9  DAHDI 2.0.x 
 originally for him).  After what he described as considerable effort he 
 found that by changing one line in chan_dahdi.c the issue appeared to be 
 resolved (below).  His simple patch (below) has works (for me too) as a 
 stop-gap.
 
 I posted this the DEV list back January of 09, and the issue was reopened 
 and then closed as 'fixed' .  It would appear the issue needs to be 
 re-reopened, as it's now appearing less specific to my hardware or 
 configuration.
 
 https://issues.asterisk.org/view.php?id=13786
 Duplicate issue to 13927
 
 If I do not patch chan_dahdi (below), this is what I (still) observe:
 ONLY after a system reboot, any attempt(s) to dial from a device attached to 
 an FXS port on my TDM800P, result in the following error :
 
 WARNING[2975]: app_dial.c:1502 dial_exec_full: Unable to create channel of 
 type 'DAHDI' (cause 0 - Unknown)
   == Everyone is busy/congested at this time (1:0/0/1)
 
 BUT after the first INBOUND call to any FXO port on the device, the FXS port 
 works normally until the next reboot.
 
 (Asterisk 1.6.2.1  DAHDI 2.2.0.2 ( earlier ) Centos 2.6.18-164.11.1.el5 #1 
 SMP Wed Jan 20 07:39:04 EST 2010 i686 i686 i386 GNU/Linux
 
 Does anyone else observe this?  Could it be specific to certain 
 (mis)configurations?  It's possible that others have the issue but do not 
 know it.  With any inbound call volume it may be nearly transparent :-)
 
 -Karl
 
 JIM's ONE-LINE FIX 
 On line 8730 (I think it's still on this line) of chan_dahdi.c
 replace a return 0  with return 1.
 
 if (par.rxisoffhook)
 return 1;
 else
 - return 0;
 + return 1;
 
 
 
 - Original Message - 
 From: Walter Arguello walter_argue...@yahoo.com
 To: asterisk-users@lists.digium.com
 Sent: Thursday, January 28, 2010 6:15 PM
 Subject: [asterisk-users] Unable to create channel of type 'DAHDI' (cause 0-
 Unknown)
 
 
  Hi,
 
  I have a tdm22b (2 fxs / 2 fxo)
 
  When Asterisk is just started, outbound calls routing to fxo port, do not
  working with error:
 
  Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
 
  Inbound calls to fxo port work fine.
 
  After first inbound call, the outbound calls starts working.
 
  CentOS 5.4
  asterisk 1.6.0.21-1
  dahdi 2.2.1.-1
 
  Can anybody help me to identify what is the possible cause of problem?
 
  Thanks,
 
  Walter.
 
 
 
 
 
  -- 
  _
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
  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 --
 
 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 --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk core dumps when using PrivacyManager

2010-01-11 Thread Barry Miller
On Mon, Jan 11, 2010 at 03:23:33PM +, --[ UxBoD ]-- wrote:
 Hi,
 
 why would Asterisk core dump with the following test dialplan extension ?
 
 exten = 8100,1,Answer()
 exten = 8100,n,Set(CALLERID(all)=)
 exten = 8100,n,PrivacyManager()
 exten = 8100,n,GotoIf(${[${PRIVACYMGRSTATUS} = FAILED]}?:nocid)
 exten = 8100,n,NoOp(Number is ${CALLERID(num)})
 exten = 8100,n,Hangup()
 exten = 8100,n(nocid),Playback(vm-goodbye)
 exten = 8100,n,Hangup()
 
It shouldn't coredump, but what happens if you remove the extra '{}'
from the GotoIf, like so:

  exten = 8100,n,GotoIf($[${PRIVACYMGRSTATUS} = FAILED]?:nocid)

-- 
Barry

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk core dumps when using PrivacyManager

2010-01-11 Thread Barry Miller
On Mon, Jan 11, 2010 at 04:42:44PM +, --[ UxBoD ]-- wrote:
 
 - Barry Miller asterisk-us...@notanet.net wrote:
 
  On Mon, Jan 11, 2010 at 03:23:33PM +, --[ UxBoD ]-- wrote:
   Hi,
   
   why would Asterisk core dump with the following test dialplan
  extension ?
   
   exten = 8100,1,Answer()
   exten = 8100,n,Set(CALLERID(all)=)
   exten = 8100,n,PrivacyManager()
   exten = 8100,n,GotoIf(${[${PRIVACYMGRSTATUS} = FAILED]}?:nocid)
   exten = 8100,n,NoOp(Number is ${CALLERID(num)})
   exten = 8100,n,Hangup()
   exten = 8100,n(nocid),Playback(vm-goodbye)
   exten = 8100,n,Hangup()
   
  It shouldn't coredump, but what happens if you remove the extra '{}'
  from the GotoIf, like so:
  
exten = 8100,n,GotoIf($[${PRIVACYMGRSTATUS} = FAILED]?:nocid)
  
 It still core dumps .. Have opened 
 https://issues.asterisk.org/view.php?id=16576
 
 -- 
 Thanks, Phil
 
I've got to read the whole thing. Sorry.  The ':' also has to go.

  exten = 8100,n,GotoIf($[${PRIVACYMGRSTATUS} = FAILED]?nocid)

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Feature Request: GotoIfTimeWithOffset

2009-12-17 Thread Barry Miller
On Fri, Dec 18, 2009 at 12:23:22AM +0100, Olivier wrote:
 
 Today, this IVR is using function AEL GotoIfTime in several places.
 The problem is if it's 11pm at the moment I'm testing this IVR, I can't
 nicely test the 9am or 2pm branch.
 
 Suggestions ?

How about setting, say, LUNCHTIME to 23:00-23:59 and using
GotoIfTime(${LUNCHTIME},...) until you're ready to go live?

I try to do this when there are multiple GotoIfTime's referencing
the same interval in a dialplan.  Companies change their minds about
things like lunch times, working hours, shift changes all the time,
and this makes it easier to change down the road.

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] AXVoice Server Hacked.. accounts info leaked

2009-11-19 Thread Barry Miller
On Fri, Nov 20, 2009 at 12:32:31AM +0500, baba jigger wrote:
 AXvoice server hacked. Here are few working accounts
 USE XLITE to make calls
 
 Registrar/Proxy
 magnum.axvoice.com:9060
 
 Free Sample account
 username=xMaxwellSmartx
 secret=thanksapache
 
 username=woodsy
 type=friend
 secret=haramikuttasala
 
 username=wumingzi
 type=friend
 secret=kickyourass
 
 Enjoy!
 
 B.R
 BaBa Jigger

I forwarded this to techsupp...@axvoice.com, just in case they didn't
already know.  I also apologized if I was the 10,000th person to do so.

--Barry Miller

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] OT - DECT SIP Phones

2009-10-18 Thread Barry Miller
On Sun, Oct 18, 2009 at 10:46:05AM -0800, Mr. James W. Laferriere wrote:

  http://www.theopensourcerer.com/2008/04/27/siemens-gigaset-685ip-phones/
   Thank you for creating this site  keeping up the info available there .
   But I'd -really- like to see Siemens Data Sheet on the product ,  Does 
 anyone know where that may (Still|Ever) exist ?

Try:
http://gigaset.com/shc/0,1935,hq_en_0_152411_rArNrNrNrN,00.html

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] DAHDI congestion problem

2009-09-28 Thread Barry Miller
On Mon, Sep 28, 2009 at 02:26:29PM +0200, Tzafrir Cohen wrote:
 On Mon, Sep 28, 2009 at 04:56:01AM -0700, Landy Landy wrote:
  I have a similar problem with DAHDI. If my server gets rebooted, I can't 
  make any calls until the a call come in from outside. From there I can 
  answer the call and DAHDI works fine afterwards.
 
 In your case: is the problem reset by restarting asterisk? 'dahdi
 resstart'?
 
 Also, please look at the reply he gets: 
 
 0/1/0 (Busy/Congested/Not-Available) - the call was marked as
 congested. Is that the same for you?
  
Funny.  The first thing I always do after a reboot is call in from my
cell to make sure things work.  But last night I rebooted and immediately
tried dialing out (with a TDM842B) and got:

WARNING[2720]: app_dial.c:1721 dial_exec_full: Unable to create channel of type 
'DAHDI' (cause 34 - Circuit/channel congestion)

Restarting all of Asterisk or 'dahdi restart' didn't matter.  Neither FXO
card would make an outgoing call until it had received an incoming one.
This with DAHDI 2.2.0.2.

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] DAHDI congestion problem

2009-09-28 Thread Barry Miller
On Mon, Sep 28, 2009 at 04:09:43PM -0500, Shaun Ruffell wrote:
 On 09/28/2009 01:06 PM, Danny Nicholas wrote:
  Funny.  The first thing I always do after a reboot is call in from my
  cell to make sure things work.  But last night I rebooted and immediately
  tried dialing out (with a TDM842B) and got:
 
  WARNING[2720]: app_dial.c:1721 dial_exec_full: Unable to create channel of
  type 'DAHDI' (cause 34 - Circuit/channel congestion)
 
  Restarting all of Asterisk or 'dahdi restart' didn't matter.  Neither FXO
  card would make an outgoing call until it had received an incoming one.
  This with DAHDI 2.2.0.2.
 
 
 This sounds like https://issues.asterisk.org/view.php?id=15429.

It is.  Thanks.  (I'm the guy whose post is blamed on Danny Nicholas.)
This: https://issues.asterisk.org/file_download.php?file_id=22725type=bug
against DAHDI SVN-branch-2.2-r7039M fixes it. 

What's interesting about this is that my normal post-boot testing, which
starts with does incoming PSTN work?, actually served to mask the
problem.  There's a lesson there somewhere.

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 1.6.1 + TDM840 FSK MWI problem

2009-09-10 Thread Barry Miller
On Thu, Sep 10, 2009 at 05:06:01PM -0500, Doug Bailey wrote:
 
 - Doug Bailey dbai...@digium.com wrote:
 
  - Doug Bailey dbai...@digium.com wrote:
  
   - Barry Miller asterisk-us...@notanet.net wrote:
   
On Fri, Sep 04, 2009 at 04:10:43PM -0500, Doug Bailey wrote:
   - Barry Miller asterisk-us...@notanet.net wrote:
   
Hi,

Using 1.4.26.1  DAHDI 2.2.0.2, FSK VMWI devices off a
   TDM840
  work
fine.

With 1.6.1.[45]  same DAHDI, instead of the FSK spill I
   get
a
  line
polarity reversal.  Stutter dialtone is generated as
expected.

Has anyone else seen this?  Is there anything special I
   need
to
  do
for
1.6.1 to make FSK MWI work?

[snip]

 
 The only thing I can think of that would be preventing the
  output
would be 
 problems in the interface chip with the On-Hook transfer mode. 
 
 If you run a dahdi_monitor on the channel that should be
  sending
   the
FSK 
 spill and look at the results in a program like audacity, you
  can
see if 
 the MWI FSK spill is actually reaching the interface SLIC IC. 
 
 Something like dahdi_monitor 1 -t spilloutput.raw (Monitors
  the
output 
 going to dahdi channel 1.) 

Hmm.  With both 1.4  1.6, without touching
  /etc/[asterisk|dahdi],
I used a butt-set to go off-hook, then back on.  I got:

1.4.26.1:  dahdi_monitor captured stutter dialtone, 4.5 seconds
  of
silence, then the FSK spill.  And that's what I heard.

1.6.1.6:   dahdi_monitor captured stutter dialtone, 1.5 seconds
  of
silence, then the FSK spill.  Sounds good with audacity.  But
all I heard through the butt-in was stutter dialtone.  No FSK
spill at all.

Here's hoping this tells you more than it does me :)

   Actually it does tell me a lot.  
   
   The problem appears in how the interface chip is being programmed. 
  
   For some reason, the interface chip is not being set to on-hook 
   transfer mode which would allow for the mwi spill to go out on the 
   actual fxs port lines.  
   
   I am looking to see where the problem lies. (It is either in
   chan_dahdi 
   or in the driver.)   I hope to have more information later. 
   
  
  The problem lies in a race condition between chan_dahdi making an
  ioctl call to
  set the VMWI state (performed in the do_monitor loop ) and a a
  subsequent call
  to set the channel in ONHOOK transfer mode (performed in
  mwi_send_init).  This
  requires the driver to send successive commands to the SLIC interface
  chip
  linefeed register.  If the command required for the VMWI mode is not
  completed
  by the time the ONHOOK transfer mode is requested, the ONHOOK transfer
  request
  is thrown away and the MWI spill does not get sent.
  
  I will be fixing this in the drivers trunk branch and hope to have it
  committed
  soon.  I'm not sure when it will be released.
  
  Another option is to comment out the ioctl call for VMWI in the
  do_monitor loop
  (especially if you do not care about line reversal MWI.).  
  
 
 See https://issues.asterisk.org/view.php?id=15875 for more information

Thanks much!  I would not have figured that out.  Eliminating the ioctl
works fine for now-- rpas is not an issue here.

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 1.6.1 + TDM840 FSK MWI problem

2009-09-06 Thread Barry Miller
On Fri, Sep 04, 2009 at 04:10:43PM -0500, Doug Bailey wrote:
   - Barry Miller asterisk-us...@notanet.net wrote:
   
Hi,

Using 1.4.26.1  DAHDI 2.2.0.2, FSK VMWI devices off a TDM840
  work
fine.

With 1.6.1.[45]  same DAHDI, instead of the FSK spill I get a
  line
polarity reversal.  Stutter dialtone is generated as expected.

Has anyone else seen this?  Is there anything special I need to
  do
for
1.6.1 to make FSK MWI work?

[snip]

 
 The only thing I can think of that would be preventing the output would be 
 problems in the interface chip with the On-Hook transfer mode. 
 
 If you run a dahdi_monitor on the channel that should be sending the FSK 
 spill and look at the results in a program like audacity, you can see if 
 the MWI FSK spill is actually reaching the interface SLIC IC. 
 
 Something like dahdi_monitor 1 -t spilloutput.raw (Monitors the output 
 going to dahdi channel 1.) 

Hmm.  With both 1.4  1.6, without touching /etc/[asterisk|dahdi],
I used a butt-set to go off-hook, then back on.  I got:

1.4.26.1:  dahdi_monitor captured stutter dialtone, 4.5 seconds of
silence, then the FSK spill.  And that's what I heard.

1.6.1.6:   dahdi_monitor captured stutter dialtone, 1.5 seconds of
silence, then the FSK spill.  Sounds good with audacity.  But
all I heard through the butt-in was stutter dialtone.  No FSK
spill at all.

Here's hoping this tells you more than it does me :)

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 1.6.1 + TDM840 FSK MWI problem

2009-09-02 Thread Barry Miller
On Wed, Sep 02, 2009 at 09:44:05AM -0500, Doug Bailey wrote:
 
 - Barry Miller asterisk-us...@notanet.net wrote:
 
  Hi,
  
  Using 1.4.26.1  DAHDI 2.2.0.2, FSK VMWI devices off a TDM840 work
  fine.
  
  With 1.6.1.[45]  same DAHDI, instead of the FSK spill I get a line
  polarity reversal.  Stutter dialtone is generated as expected.
  
  Has anyone else seen this?  Is there anything special I need to do
  for
  1.6.1 to make FSK MWI work?
  
 
 The ability to do line reversal MWI was added into the 1.6.2 branch. 
 Looking through the 1.6.1 code base, I don't see anything other than fsk 
 MWI (with and without Ring Pulse Alert Signalling.) 
 
 In any case, this is set by defining mwisendtype in chan_dahdi.  
 The default for this is fsk spills.  
 It can be set to nofsk if you want to disable the fsk spills. 
 
 The line reversal is set by specifying 
 mwisendtype=lrev
 
 Regards,
 Doug Bailey 
 
Thanks, but that's not the problem.  I _want_ FSK.  A few ast_debug's in
chan_dahdi tell me that after calling vmwi_generate(), it's taking the
MWI_SEND_SPILL path through mwi_send_thread(), and happily sending about
9K bytes of spill, 160 bytes at a time.  But my phones (and a butt-set)
tell me that nothing is being received.

I don't understand the DAHDI ioctls very well.  Is it possible that the
TDM840 is not in the correct state when the spill is transmitted?

Thanks again,

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] 1.6.1 + TDM840 FSK MWI problem

2009-08-31 Thread Barry Miller
Hi,

Using 1.4.26.1  DAHDI 2.2.0.2, FSK VMWI devices off a TDM840 work fine.

With 1.6.1.[45]  same DAHDI, instead of the FSK spill I get a line
polarity reversal.  Stutter dialtone is generated as expected.

Has anyone else seen this?  Is there anything special I need to do for
1.6.1 to make FSK MWI work?

Thanks,

--Barry

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] dialplan syntax error: need new eyes

2008-05-24 Thread Barry Miller
On Sat, May 24, 2008 at 12:01:50AM -0400, sean darcy wrote:
 Barry Miller wrote:
  On Fri, May 23, 2008 at 05:08:28PM -0400, sean darcy wrote:
  This doesn't work:
 
  exten =_1NXXNXX,n,Set( CALLERID(num) = ${IF ( $[${CALLERID(num)}  
  140] ? ${MAINSTUB}${CALLERID(num)} : ${MAINNUMBER} )})
  
  Change IF ( to IF(.
 
 Same result.

Sorry.  This time I actually tested it.  *After* de-spacing the  = ,

exten = test,n,Set(CALLERID(num)=${IF( $[${CALLERID(num)}  140] ? 
${MAINSTUB}${CALLERID(num)} : ${MAINNUMBER} )})
exten = test,n,NoOp(${CALLERID(num)})

behaved properly.  At least with 1.4.19.1.  FWIW, every time I try to use
whitespace to make a dialplan more readable, it jumps up and bites me.

Again, sorry for jumping in with an untested response.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] dialplan syntax error: need new eyes

2008-05-23 Thread Barry Miller
On Fri, May 23, 2008 at 05:08:28PM -0400, sean darcy wrote:
 
 This doesn't work:
 
 exten =_1NXXNXX,n,Set( CALLERID(num) = ${IF ( $[${CALLERID(num)}  
 140] ? ${MAINSTUB}${CALLERID(num)} : ${MAINNUMBER} )})

Change IF ( to IF(.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users