Re: [asterisk-users] ACD functionality , Skills for agents

2007-11-20 Thread James FitzGibbon
On Nov 20, 2007 10:16 AM, Kyriakos [EMAIL PROTECTED] wrote:

   I have a question regarding ACD for queues.   What happens when I have 2
 or more queues with same weight and  each queue has a call in?  How will it
 decide which call will be routed to the next available agent? Will it take
 the call with the longest waiting time in queue?  If not how would I do
 this?

Beware of queue weights.  They have caused major problems in the past
for many people on this list.  As I understand it, enabling weights
requires * to grab a lock on a large number of data structures related
to queue state, which can cause performance slowdowns and crashes.  I
haven't seen reports of this recently, so it might be better in the
later 1.4 releases, but at one time it was a sure-fire recipe for
pain.

 Also can someone point me to resources for making a single queue with
 customer calls tagged with agent skills? What I mean is instead of having
 multiple queues Sales,Tech support, etc,  have only a single queue with
 calls being tagged according to the customer's choice from IVR, so if a
 customer would choose SALES , the call would go into the queue with other
 calls but it would only be answered from agents with the skill SALES.
 This is something offered in other PBX systems like Avaya but im pretty sure
 it can be done on Asterisk, right?

It probably could be, but it would make reporting pretty difficult, as
the key fields in the queue log are the call id and the queue name.
While you could use the QueueLog() application to stick extra data
about the call (e.g the skill chosen from the IVR) into the queue log,
that would appear in one line only and require post-processing to glue
it together with the rest of the data for that call.  I'm pretty sure
it wouldn't mesh nicely with the reporting package I use
(QueueMetrics).

What I do for this is maintain queue (skill) membership in a database,
then add the channels to the appropriate queues when the agents log on
via a web page.  Is there a particular reason you want to just have
one queue?

-- 
j.

___
--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] ACD Queue LOG RINGNOANSWER Content 0

2007-11-13 Thread James FitzGibbon
On 11/12/07, asterisk [EMAIL PROTECTED] wrote:

 In my  queue log I see that on the RINGNOANSWER Event I get different
 content.   Some events soe the ring timeout (15000).  Other events show
 0.  Other yet show 1000 Doens anyone know what 0 means?  Did it try to
 ring the phone, but it was busy?


For my internal reporting, I consider 0 or 1000 to be the result of a phone
being on DND.  Since all the time values in the log are rounded to the
nearest 1000, I speculate that 0 is a rejection in  500ms and 1000 is a
rejection in the 500 to 1499 ms range.  I figure unless someone is hovering
over the ignore button on a softphone, they aren't going to be able to
click it so fast that Asterisk registers it as RINGNOANSWER|1000.

Likewise, RINGNOANSWER|2 is (for me, given timeout=20 in queues.conf)
a failure to pick up a presented call.

Everything from 2000 through 19000 I treat as a manual ignore triggered by
the agent.  So far, the reports I generate based on these rules seem to make
sense to the managers reading them.

-- 
j.
___
--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] 'a' extension

2007-11-08 Thread James FitzGibbon
On 11/8/07, Peder @ NetworkOblivion [EMAIL PROTECTED] wrote:

 Is there any way to see the called number when a call gets redirected to
 the 'a' extension from voicemail?  Say x123 calls x456 and it rolls to
 voicemail.  x123 hits * and gets dumped into the 'a' extension in the
 original context.  I need some logic in 'a' to do a database lookup
 based on the original called number (x456).  Any ideas?  When I do a
 test, it appears that the called number is 'a' and the calling number is
 123.  I need to be able to tell that it was a call to x456.  Thanks.


You're sending them into VoiceMail() from your dialplan - just stick the
dialed number in a channel var before calling VoiceMail(), then refer to it
in your 'a' extension.

-- 
j.
___
--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] Telus (Alberta) PRI Caller ID NAME, Display IE, Facility ID

2007-11-06 Thread James FitzGibbon
On 11/6/07, Stephen Bosch [EMAIL PROTECTED] wrote:

  It survives if it goes to a Telus customer, but not if it crosses over
  to Bell, Rogers, etc.

 Well -- here's where you can help me, because our name info is not even
 surviving on Telus' own network. I don't really care too much about Bell
 and Rogers, since Bell barely has a footprint out here and Rogers
 doesn't provide CNAM on its mobile network anyway (and nobody is using
 Rogers home phone ;) ).

 So -- if you had it working on Telus, what did you do?


As soon as I turned on facilityenable=yes, outbound name display started to
work for me.

 One tech claimed it was because I was sending calling name in addition
  to the IE,

 He probably meant the Display IE *and* the Facility IE. If you see my
 post it's what the technician I was working with suggested. Would be
 great if I knew a way of turning off the Display IE, if that's even
 possible/allowed. If it's not, then the don't send both idea is wrong.


Probably correct, as that's what I'm sending now:

 [1c 15 9f 00 00 00 00 00 00 00 00 00 00 00 00 00 43 6f 6d 77 61 76 65]
 Facility (len=23, codeset=0) [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 'Namehere']
 [00 00 00 00 00 00 00 00 00 00 00]
 Display (len= 8) Charset: 31 [ Namehere ]

I just checked dialing out of and back into my system, and the Facility IE
comes back in the SETUP message, but the Display IE does not.

Did you end up adding name records to the LIDB?


For our purposes name display was a nice to have, so we didn't go down this
path.

Anyway -- again -- what did you do to get it working on Telus' network?
 Do you know what kind of switch you were connected to?


To the best of my knowledge, we're connected to a 5ESS running NI-2.

Here's the relevant zapata bits I use:

facilityenable = yes
pridialplan=unknown
priindication=outofband
overlapdial=no
resetinterval=86400
echocancel=yes
switchtype=national
signalling=pri_cpe
callerid=asreceived

Hope that helps.

-- 
j.
___
--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] Telus (Alberta) PRI Caller ID NAME, Display IE, Facility ID

2007-11-06 Thread James FitzGibbon
On 11/6/07, Stephen Bosch [EMAIL PROTECTED] wrote:

 We are trying to send caller ID NAME information over a Telus PRI in
 Alberta.

 The PRI tech says that he sees the NAME information, and for calls over
 the same network, that NAME info should be reaching the receiving
 station, but it is not.


I've had no end of trouble getting CNAM out of NI-2 PRIs with Telus.  We're
in Ontario, but the switch configs are the same across the country I
believe.

It survives if it goes to a Telus customer, but not if it crosses over to
Bell, Rogers, etc.

One tech claimed it was because I was sending calling name in addition to
the IE, while another claimed it was just a problem when the call passes
from a NI-2 circuit to NI-1 (which some of the other carriers still use).

So, no real solution for you, but at least you know it's not something
obvious you're doing.  I've tweaked my zaptel settings back and forth and
tested with Telus on the phone to no avail.  In the end, we deemed the
effort to not be worth it.

-- 
j.
___
--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] Dynamic Queue Members - Auto Logoff

2007-11-05 Thread James FitzGibbon
On 11/5/07, Nick Brown [EMAIL PROTECTED] wrote:

 Another quick question (Spending the day trying to get this project sorted
 and tucked away) If I am dynamically adding queue members, they will not
 abide to settings within agents.conf will they?


correct.

Ie. I need the equivalent of Autologoff however want my agents to receive
 calls when someone joins the queue, not have to sit on hold all day. I see
 AgentCallbackLogin has finally been removed.

 Has anyone got a work around for this?



It hasn't been removed (in 1.4), just deprecated (I assume you're not trying
this with -trunk).  Still, it's not compatible with adding members via
AddQueueMember().

There is an example of doing auto-logoff in docs/queues-
with-callbackmembers.txt in the source distribution.  Look for macro
callagent for the specific block that does the work.  You do have to be
using Local channels to make this work though, as you need to Dial() the
actual device from the dialplan, then check ${DIALSTATUS} to make decisions
about what to do if the agent doesn't pick up.

j.
___
--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] use dial plan passed arg value in C agi code

2007-11-02 Thread James FitzGibbon
On 11/2/07, Arpit Mehta [EMAIL PROTECTED] wrote:

 Hello * users,

 I know that passing variable in the AGI script is by

 exten = _.,1,AGI(simple_c_prgm|123|789)  ; 123, 789 are arguments being
 passed and simple_c_prgm is C code

 Now how will I receive these variables within C code ? Is it by the same
 way arguments are passed in command line to C by using argc and argv or
 there is more to be done than that?


From the wiki (http://www.voip-info.org/wiki-Asterisk+AGI):

When Asterisk starts an AGI script, it feeds the channel variables to the
script on standard input. The variable names are prefixed with agi_ and
are separated from their values by a colon and a space. Though the actual
channel variables may be in the upper case, the names passed to an AGI
script are all lower case. Also, some channel variable names as passed to
AGI script differ from the current variable names used in the dial plan.

These docs, while dated, are also useful:

http://www.bitflipper.ca/Documentation/agi.html

It even includes code for getting at variables from several languages.

-- 
j.
___
--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] use dial plan passed arg value in C agi code

2007-11-02 Thread James FitzGibbon
On 11/2/07, Eric ManxPower Wieling [EMAIL PROTECTED] wrote:

 Sadly those docs cover the situation of this:

exten = 666,1,Set(MY_VAR=fred)
exten = 666,n,AGI(simple_c_prgm)

 Not this:
exten = 666,1,AGI(simple_c_prgm|123|789)


Looking back over it, you're right.

However, multiple args passed to the AGI work fine; they come in the same
way as any standard argc/argv program.

i.e.:

AGI(agentpause.agi
,--mode=pause,--autopause,--agent=${AGENTCODE},--pausereason=${PAUSEREASON})

I handle this (in Perl) using Getopt::Long, which knows nothing of AGI's
stdin/stdout mechanics:

GetOptions(
  \%opts,
  'mode=s',
  'agent=i',
  'pausereason=i',
  'autopause!',
) or die can't parse command line;
___
--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] PRI span configuration - span remains down

2007-10-26 Thread James FitzGibbon
On 10/26/07, Matthew Fredrickson [EMAIL PROTECTED] wrote:

  Is there some part of the debug output I need to tell the telco about?
  When I was on to them earlier today, the engineer only seemed to know
  how to turn bits of their network on and off, not much about settings
  I need my end etc.
 

 Just tell them when you try to make a call, you get cause code 44 back
 (channel unavailable).  They can look at their switch to figure out
 what's going on.


I had a strange problem with cause code 44 on just 5 B channels of a PRI.
The first time I'd dial, I'd get cause code 44 and * would attempt to
restart the B channel.  The switch would never respond to the request to
restart, so the channel remained in limbo from *'s perspective, and further
attempts to dial out explicitly on that channel would give me congestion
(generated from *, not from the Telco), and attempts to dial out using a
group that contained those channels would just skip over them.

I called the Telco, and spent over a week trying to convince them that the
RELEASE COMPLETE was coming from their end.  They claimed it was coming from
me.  It was almost as if something in between my system and where the tech
was running his trace was proxying the Q.931 messages, and sending us both a
cause code 44 when I used those channels.

In the end, they re-built my trunk and the problems immediately cleared, so
it was apparantly some buggered state in their switch.

This was with a 5ESS running NI-2 if that helps.

-- 
j.



-- 
j.
___
--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] Voicemail Options

2007-10-26 Thread James FitzGibbon
On 10/26/07, Peder @ NetworkOblivion [EMAIL PROTECTED] wrote:

 I know that you can set it up to where a user hits 0 from their mailbox
 and goes to an operator, but can you set up other options as well?
 Could I have 0 for an operator and 1 to go to another extension?  I know
 you can do this by building an AA, but I don't want to have to do that
 for every user as there are about 40 people that want this.  They won't
 all go to the same number.  Thanks.


You can also exit VoiceMail() using *, which jumps you to the 'a' extension
in the calling context.  As for building an IVR for 40 users, you could
store the destination in ASTdb or realtime keyed by original extension.
Then look up where to send them when they press * based upon the mailbox
that VoiceMail() was called against.

-- 
j.
___
--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] Cisco 79xx logon/logoff

2007-10-25 Thread James FitzGibbon
On 10/25/07, Adrian Marsh [EMAIL PROTECTED] wrote:

 I'd like to know if anyone has figured out a way to be able to have
 users logon/logoff manually from Cisco 79xx phones (with SIP firmware
 loaded)?
 Scenario is, user walks into office, sits at a random desk, and logs
 onto the phone. The system would need to log them off of the last
 hardphone they were on, and then configure the new phone for their
 extension.

 We're creating hotdesks and it would be good if users could logon/logoff
 the desk phones.

 At present they all use softphones on the PC too, and I could engineer a
 way of maybe doing things via cgi scripting, replacing the tftp config
 files for that phone, and then remotely resetting the phone, however
 that would be quite clumber sum.
 And before I go that route, I wondered if any of the commercial A*k
 systems already offer this?


I haven't done this with Cisco specifically, but I have done it with other
hardphones.  I didn't go the route of updating the phone's config while the
person was at that desk because I didn't have a reliable way to remotely
restart the phone.

Instead, I gave each phone an extension and dynamically created links in
ASTdb between the person's extension to the phone's extension for the
duration of the login session.  All the hot desk phones are in a context
that when nobody is linked to that desk only allows you to logon and do
basic things like call the operator and emergency services.  If a user is
linked to the desk, then I do a
Goto(proper-context-for-that-user,${EXTEN},1), which gives me dynamic
contexts for outbound calling without having to have my sip users in
realtime.

The downside to this approach is MWI, but all of my users get voicemail via
email with delete-on-send enabled, so I just kind of sidestepped the issue.

I'm not sure if you're specifically asking about using the softkeys to do
this without going through some kind of IVR application; worst case you have
speed-dials to your logon/logoff extensions.  You could even save a key by
having a single logon/logoff extension that changed its behaviour based on
whether a link exists for that desk.  Then again, if someone forgets to log
off it might be easier for users to have a dedicated 'logoff' button rather
than having to press the dual-purposed key twice.

Hope that gives you some ideas.

-- 
j.
___
--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] How to tune Asterisk AMD - Answering Machine Detection hacks

2007-10-24 Thread James FitzGibbon
On 10/24/07, Costa Dinoteli [EMAIL PROTECTED] wrote:

 Most everytime Asterisk calls  it thinks it is an Answering Machine and it
 starts playing
 the AMD message, instead of the delivering the 1st real message


Why is it thinking that it's a machine?  If you're on the console at verbose
3 or higher, you'll see what thresholds were tripped.  You can also get the
reason in the ${AMDCAUSE} variable:

[Oct 23 09:58:34] VERBOSE[25147] logger.c: -- AMD: Zap/81-1 416XXX
(null) (Fmt: 4)
[Oct 23 09:58:34] VERBOSE[25147] logger.c: -- AMD: initialSilence [2500]
greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000]
minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [4]
silenceThreshold [256]
[Oct 23 09:58:37] VERBOSE[25147] logger.c: -- AMD: ANSWERING MACHINE:
silenceDuration:2500 initialSilence:2500

or

[Oct 23 09:43:37] VERBOSE[24313] logger.c: -- AMD: Zap/4-1 4166XXX
(null) (Fmt: 4)
[Oct 23 09:43:37] VERBOSE[24313] logger.c: -- AMD: initialSilence [2500]
greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000]
minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [4]
silenceThreshold [256]
[Oct 23 09:43:38] VERBOSE[24313] logger.c: -- AMD: Word detected.
iWordsCount:1
[Oct 23 09:43:38] VERBOSE[24313] logger.c: -- AMD: Changed state to
STATE_IN_SILENCE
[Oct 23 09:43:39] VERBOSE[24313] logger.c: -- AMD: HUMAN:
silenceDuration:800 afterGreetingSilence:800

Figure out why AMD thinks it's a machine and you can change the thresholds,
either in amd.conf or in the call to AMD().

-- 
j.
___
--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] Control space of each voicemail box

2007-10-16 Thread James FitzGibbon
On 10/15/07, Pepo [EMAIL PROTECTED] wrote:

 I am  using Asterisk like voicemail of a great system with many users, How
 do
 I can get statistics of each box in the voicemail system? something like
 space, number of messages, etc.


The only CLI commands are 'voicemail show zones' and 'voicemail show users';
the latter shows the number of new messages  for each box, but not the
total.  So as the previous poster described, shell tools are your friend.

If you're storing voicemail using IMAP, then this becomes either easier or
harder (depending on your experience with email).  You can get more details
about the contents of a mailbox using the IMAP protocol, but depending on
the implementation you might get less info about the actual bytes taken up
in backend storage.

-- 
j.
___
--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] question about PSTN pickup

2007-10-12 Thread James FitzGibbon
On 10/12/07, Yair Hakak [EMAIL PROTECTED] wrote:

  you'll have to excuse the ignorance (i'm a software guy, not a telcom
 guy..)
  Is there any way to know if a channel has been answered by an automatic
 system (like voicemail) rather than a human being?
  Specifically, I want to use a .call to make a call on a channel and only
 do something if a person answers, not a machine of any kind. Is this even
 possible, or is an answered channel an answered channel?


Asterisk 1.4 has the AMD() application that uses several thresholds (which
you can vary) to determine if the other end is a human or machine:

  -= Info about application 'AMD' =-

[Synopsis]
Attempts to detect answering machines

[Description]
  AMD([initialSilence][|greeting][|afterGreetingSilence][|totalAnalysisTime]
  [|minimumWordLength][|betweenWordsSilence][|maximumNumberOfWords]
  [|silenceThreshold])
  This application attempts to detect answering machines at the beginning
  of outbound calls.  Simply call this application after the call
  has been answered (outbound only, of course).
  When loaded, AMD reads amd.conf and uses the parameters specified as
  default values. Those default values get overwritten when calling AMD
  with parameters.
- 'initialSilence' is the maximum silence duration before the greeting. If
   exceeded then MACHINE.
- 'greeting' is the maximum length of a greeting. If exceeded then MACHINE.
- 'afterGreetingSilence' is the silence after detecting a greeting.
   If exceeded then HUMAN.
- 'totalAnalysisTime' is the maximum time allowed for the algorithm to
decide
   on a HUMAN or MACHINE.
- 'minimumWordLength'is the minimum duration of Voice to considered as a
word.
- 'betweenWordsSilence' is the minimum duration of silence after a word to
   consider the audio that follows as a new word.
- 'maximumNumberOfWords'is the maximum number of words in the greeting.
   If exceeded then MACHINE.
- 'silenceThreshold' is the silence threshold.
This application sets the following channel variable upon completion:
AMDSTATUS - This is the status of the answering machine detection.
Possible values are:
MACHINE | HUMAN | NOTSURE | HANGUP
AMDCAUSE - Indicates the cause that led to the conclusion.
   Possible values are:
   TOOLONG-%d total_time
   INITIALSILENCE-%d silenceDuration-%d initialSilence
   HUMAN-%d silenceDuration-%d afterGreetingSilence
   MAXWORDS-%d wordsCount-%d maximumNumberOfWords
   LONGGREETING-%d voiceDuration-%d greeting

-- 
j.
___
--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] Mask Initial Processing with Ring Back Tone

2007-10-11 Thread James FitzGibbon
On 10/11/07, James FitzGibbon [EMAIL PROTECTED] wrote:

 What you do in between is up to you.  Many people use something like
 Wait(2) to give a comfort ring, since PRI-connected incoming calls can
 often be set up nearly instantaneously.  You'd want to limit the time
 obviously, and have proper exception handling in case whatever you're doing
 between Ringing() and Answer() fails.


I should add that some applications (usually ones dealing with audio) will
answer the channel for you, so you do have to be cognizant of that.  If what
you're doing in between is information processing, you should be OK, but I
believe calling an AGI will auto-answer the channel, limiting what you can
do somewhat.

-- 
j.
___
--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] Mask Initial Processing with Ring Back Tone

2007-10-11 Thread James FitzGibbon
On 10/11/07, Victor [EMAIL PROTECTED] wrote:

 I need to process a number of lines of code in the dialplan before
 answering a
 call.  Can standard ring back tones be played to the caller while this is
 happening prior to answering the call.  Which commands would facilitate
 this?


You start sending ringback with Ringing()

You answer with Answer()

What you do in between is up to you.  Many people use something like Wait(2)
to give a comfort ring, since PRI-connected incoming calls can often be
set up nearly instantaneously.  You'd want to limit the time obviously, and
have proper exception handling in case whatever you're doing between
Ringing() and Answer() fails.

-- 
j.
___
--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] Setting caller id value on outgoing calls using .call files

2007-10-04 Thread James FitzGibbon
On 10/4/07, Arpit Mehta [EMAIL PROTECTED] wrote:


I was looking at a way to add the caller id to the outgoing calls (which are
 made using .call files) using asterisk. Any ideas how to do this ?
 Currently I get 'Unknown' number displayed on my phone when asterisk makes
 an outgoing call.


Add a CallerID: whatever line to your callfile.

http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out has a
reference of the callfile contents.

-- 
j.
___
--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] show queue (queue name)

2007-09-25 Thread James FitzGibbon
On 9/25/07, Everton Goularth [EMAIL PROTECTED] wrote:

 does anybody know any way that when it run reload app_queue in the
 asterisk cli it don't lose the  informations from show queue (queue
 name) ?


A 'keepstats' option has been added to -trunk, and will show up when 1.6 is
released.  Until then, you'd have to look at backporting this change:

http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?r1=43945r2=44150

(it's a pretty small change)

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Hints / State change on outgoing calls

2007-09-20 Thread James FitzGibbon
On 9/19/07, Alex Epshteyn [EMAIL PROTECTED] wrote:


 Also, Asterisk restart results in all the watchers being lost. Is there a
 way to force the phone to subscribe to notifications after restart (short
 of
 rebooting it) and is it phone specific?


Usually resubscribe-interval for extensions is client controlled, much like
SIP re-register interval.  Just make sure it's in between the min and max
registration times as displayed in the output of 'sip show settings',
otherwise you can run into problems where the phone thinks that the
subscription is valid for longer than Asterisk does.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Building an RPM from Asterisk 1.4

2007-09-20 Thread James FitzGibbon
On 9/20/07, Marcus Franke [EMAIL PROTECTED] wrote:

 Do you have any examples for these spec files?

 I found a repository for installing Asterisk on Centos, but it
 took a while before I discovered it. Ok, just checked the link
 its for RHEL, but as Centos is just recompiled this won't matter.

 Same situation for Ubuntu using the debian package format, but
 I have not found a repository so far and Ubuntu delivers just
 the old 1.2 release. :)


www.atrpms.net has pretty solid RPMs, and you can grab the SRPMS in order to
get the spec file (either install the SRPM or use rpm2cpio to convert the
package and extract the specfile manually).  This is where I get my libpri
and zaptel RPMs from (though I still build * from source, as the RPM
compilation options they use are not to my liking).

There is a book called Maximum RPM.  The dead tree version is now pretty
out of date with respect to the latest version of RPM (though still a good
introduction if you've never built a package).  I believe there was a
slightly more up-to-date online version, but it still had some gaps the last
time I looked.

The best way to learn seems to be to examine good examples and then build
your own package using their techniques.




-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Softphone RTP Session Start-up Delay

2007-09-19 Thread James FitzGibbon
On 9/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  here because we are actually specifying the IP Address of the Asterisk
 server, but I am willing to try anything to fix this problem.  The two user
 pc's are setup on workgroups, so I do not believe that there is a domain
 available that can be entered in the hosts file.  Could the DNS still be the
 issue?  If not, would anyone be able to suggest any other possible problems
 that may be causing this delay.


It wasn't the same magnitude (more like 4 seconds for me), but I had an
issue where the default eyeBeam (the commercial version of X-Lite) install
was imposing a delay when a call first came in while it attempted to contact
a non-existent STUN server.  When I removed the STUN server setting, call
setup was immediate.

Might be worth looking at.  Have you done a trace on the PC where the
softphone is running (without a filter) to see what network packets are
flying at the time the call setup happens?

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Why does everyone seem to dislike *now?

2007-09-18 Thread James FitzGibbon
On 9/17/07, Jim Canfield [EMAIL PROTECTED] wrote:

 stuff useless. My real concern was the immediate '/ignore' for asking
 about an issue with the *now ditro that actually had nothing to do with
 the GUI itself. Truth be told, most of my time today was in the CLI


You may be taking what happened on IRC a bit too literally.

You got plenty of help on your Polycom and call parking issues on 09/14,
from some very knowledgeable people.  On 09/17, you asked one question about
rPath/Conary and one person did a '/me puts jcanfield on ignore' emote.  He
probably didn't even ignore you, it was just his way of saying he wasn't
interested in answering questions about packaging systems on a Linux distro
he doesn't use.  The simple answer to your question (how do I get the
LDAPGet module) is answered on the Wiki - you download it from the author's
site.  The question of how do I package some arbitrary source code into a
conary package? isn't really germane to #asterisk.

As to the second class citizen point, I think you'll find that people who
come into #asterisk asking about problems with their GUI-enabled Asterisk
install fall into one of two categories: those who are willing to reduce the
problem down to it's non-GUI elements and pastebin the configs and output,
and those who are incapable or unwilling to do so.  The former tend to get
help from people on #asterisk; IMHO the latter should find other places to
ask for help, or pay for consulting services.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Enabling MySQL UNIQUE from cdr.conf

2007-09-18 Thread James FitzGibbon
On 9/17/07, Luís Palma [EMAIL PROTECTED] wrote:

 Is there a way to enable the usage of UNIQUEID CDR field using a MySQL
 database backend for storing CDRs without having to recompile
 asterisk-addons as stated here
 http://www.voip-info.org/wiki-Asterisk+cdr+mysql ?

 After version 1.4 it is said in release that it can be done (not sure if
 it applies to mysql backend)


In addons v1.4.2,  it's not possible without recompilation.  You get one of
two versions of code depending on the definition of a compile time
constant.  If that constant isn't defined, the text of the SQL INSERT
statement in the shared module will be:

INSERT INTO %s
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield)

instead of

INSERT INTO %s
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield)

In the -trunk version of cdr_addon_mysql.c, the behaviour of loguniqueid was
changed from a compile-time to runtime option, just like userfield already
was.

The changes to make loguniqueid a runtime option are pretty small, and
trivial to backport to the 1.4 branch on their own.  You'd have to do more
research to see if you can just build the trunk version against 1.4, given
that trunk also has added MySQL SSL support.

Of course, if your question stems from the fact that you are unable to
recompile anything in your installation, none of this is much help.  :(

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Call Center SoftPhone with Auto Answer

2007-09-18 Thread James FitzGibbon
On 9/18/07, David Gomillion [EMAIL PROTECTED] wrote:

 I've stayed out of this thread for a long time, and really didn't read the
 past comments, so if I'm repeating someone, I'm sorry. I've been thinking
 this for a while, and just have to say it. If you feel like you have to keep
 people from turning off the auto-answer feature on a softphone, you don't
 need a new softphone. You need new people.


Yes, but have you ever drawn up a budget for a full-blown meatware(tm)
upgrade?

Makes Vista look like a picnic.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Agent Callback Login in 1.4

2007-09-14 Thread James FitzGibbon
On 9/13/07, Kevin P. Fleming [EMAIL PROTECTED] wrote:

 It shouldn't be that hard to translate the AEL example into traditional
 dialplan language; in fact, Asterisk does that itself when you load the
 AEL into memory, so if you load it yourself and then do a 'dialplan
 show' you'll see the translated version, which you can then copy into
 your database.


You can also use 'aelparse -w' to dump extensions.ael as
extensions.ael.dumpto assist in this.  The branching and labeling of
priorities is designed for
efficiency, not readability, so you'll have to go over it carefully to get a
good feel for how AEL constructs are turned into extensions.

According to Murf, one of the purposes of this switch was to allow people to
write dialplan in AEL and insert it into * installations where AEL was
either not supported (1.2) or not viable (GUIs, realtime, resistance to
change, etc.).

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Force a new user to configure Comedian mail?

2007-09-14 Thread James FitzGibbon
On 9/14/07, Jeremy Wadhams [EMAIL PROTECTED] wrote:

  In Asterisk 1.4, is there any way to force new users to configure their
 mailbox?  I'm thinking a simple IVR that holds a user's hand through
 changing their PIN, recording their name, and setting up one or both
 greetings, the very first time they use the account.


If your pin is equal to your mailbox, VoiceMailMain() does this
automatically when you log in.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Voicemail in 1.4?

2007-09-13 Thread James FitzGibbon
On 9/13/07, Ken D'Ambrosio [EMAIL PROTECTED] wrote:

 I got dragged away from Asterisk (somebody made me an offer I couldn't
 refuse for system administration), but I'm thinking about seeing if I
 can't get it deployed at my new employer.  Regardless, there are two
 things about older voicemail that used to annoy me:

 - Dial by name.  Has anyone made it so it can be first or last?


Yes, Directory() has a switch to make it search by first name.  You still
need to choose one or the other, or use the dialplan to ask the user whether
they want to search by first or last before calling Directory with or
without the switch, but it works.

- Jump to voicemail; you used to have to actually dial the voicemail,
 whereas most voicemail systems allow you to go to your mailbox when you
 hear your voice prompt.  Any chance this has been rectified?


Look at the 'a' extension, which will be executed if you hit '*' while
listening to the outgoing message.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] exit ChanSpy with DTMF

2007-09-11 Thread James FitzGibbon
On 9/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Part of a supervisor menu I'm writing requires that I allow the
 supervisor to choose to ChanSpy a channel from the main menu then return
 back to the menu (dialplan) to choose other options when she's done.  Is
 there a way to 'exit' ChanSpy and continue down the dialplan?  Or is a
 caller stuck in ChanSpy until they hangup the phone?


In 1.4, they are stuck.

-trunk has an option to allow them to escape out to a context using a DTMF
digit; check the changelog in SVN for details.  I'm not sure how portable it
might be back to 1.4/1.2 if you want to attempt that.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Which cause less CPU usage: GSM or wav??

2007-09-10 Thread James FitzGibbon
On 9/9/07, Barton Fisher [EMAIL PROTECTED] wrote:

 Thanks, OK, a bit confused  The cards are TE410P.  I really don't
 see how the set a codec for this, other than it might default to
 something in code like ulaw.  Any clue on how to verify codec in use
 during a call?


If you absolutely want to be sure, use 'pri intense debug span X' and watch
for SETUP messages:

 Protocol Discriminator: Q.931 (8)  len=62
 Call Ref: len= 2 (reference 542/0x21E) (Originator)
 Message type: SETUP (5)
 [04 03 80 90 a2]
 Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer
capability: Speech (0)
  Ext: 1  Trans mode/rate: 64kbps, circuit-mode
(16)
  Ext: 1  User information layer 1: u-Law (34)
 [18 03 a9 83 95]
 Channel ID (len= 5) [ Ext: 1  IntID: Implicit  PRI  Spare: 0  Exclusive
Dchan: 0
ChanSel: Reserved
   Ext: 1  Coding: 0  Number Specified  Channel Type: 3
   Ext: 1  Channel: 21 ]

You'll see the voice characteristics in the Bearer Capability details (I
have NI-2, this might be different for NI-2 or other PRI variants).

But as others have mentioned, generally T1 PRI = uLaw, E1 PRI = aLaw.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Cascading queues calls not joining unavailable queues.

2007-09-07 Thread James FitzGibbon
On 9/7/07, Mark Michelson [EMAIL PROTECTED] wrote:

 After talking in #asterisk-dev with those who wrote the joinempty
 option, it appears I was mistaken about its use. joinempty=strict will
 only not allow a caller to join the queue if the members are in a
 permanently unavailable state. A member being busy is not enough to
 trigger the joinempty=strict option. Since DND on most phones works the
 same way as a phone being busy, DND will not trigger the
 joinempty=strict option either.


It's also important to distinguish between DND-style busy (where in the case
of SIP the INVITE is rejected with a 480 temporarily unavailable) and the
internal channel state AST_CONTROL_BUSY.  For SIP, the latter occurs when
the use count exceeds the configured call-limit, and results in no INVITE
being sent.  The two also have drastically different behaviours when you
have members with penalties.

Assume we have five agents with penalty zero (A-E) and five agents with
penalty 1 (F-J). Assume also that 'ringinuse=no' is set for the queue.  If
A-D are in use and E is available but their phone is set to DND, then
app_queue will continually attempt to dequeue to agent E, never trying
agents F-J.  If E is busy because they have a call-limit of 2 and they have
two calls active, then app_queue will attempt to dequeue to agents F-J.

This has been a source of confusion for my users on several occasions.  IMO,
It also puts an unrealistic burden on agents to always put themselves on
pause before they walk away from their desk, and since agents are human and
sometimes forget to do this, prevents me from using agent penalties
extensively.  I just can't explain to non-technical people why one phone
keeps ringing while five other agents sit idle.  It makes no sense to them.

Someone developed a new strategy for app_queue they called XRRMEMORY that
will seek to higher-penalty agents after trying all lower-penalty agents.
They posted details about it on voip-info:

http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Queue

(look at the second comment)

Unfortunately, the patches weren't done against trunk or the head of 1.4,
and the author didn't file a disclaimer with Mantis, so the bug (
http://bugs.digium.com/view.php?id=9165) was recently closed.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Cascading queues calls not joining unavailable queues.

2007-09-07 Thread James FitzGibbon
On 9/7/07, Atis [EMAIL PROTECTED] wrote:

 Well, for that case i have a   RemoveQueueMember() after Dial, in case
 of ${DIALSTATUS}!=ANSWERED. That works great, except for agent
 complaints - that they are logged out from queue :D Would be a bit
 better to be able to set agent's status to Unavailable.


This only works if you're using Local channels to bridge calls to agents.

It doesn't work if you're using AddQueueMember with SIP channels, because
the Dial() is implicit, so you have no control over what happens after that
implicit Dial() finishes.

And yes, I have good reason for using SIP channels.  We have externally
driven automatic pausing (because the built-in wrapuptime is per-queue and
therefore broken for any agent who is assigned to more than one queue), and
neither form of Local (with or without /n) perform properly under this
configuration.

It would be great if you could define arbitrary states in queues.conf, then
have dialplan logic to set an agent to given state.  If you could indicate
in the definition what things a state means (able to take a call, counted as
part of ${QUEUE_MEMBER_COUNT()}, etc. that would truly be useful.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] Cascading queues calls not joining unavailable queues.

2007-09-07 Thread James FitzGibbon
On 9/7/07, Atis [EMAIL PROTECTED] wrote:

  It doesn't work if you're using AddQueueMember with SIP channels,
 because
  the Dial() is implicit, so you have no control over what happens after
 that
  implicit Dial() finishes.

 Nop, it works for Dial to SIP channels, if you set g option in Dial.


I call AddQueueMember like this:

AddQueueMember(queuename,SIP/1234)

When I then call

Queue(queuename)

from my dialplan, the Dial() of SIP/1234 is implicit.  There is no priority
and extension that I control where Dial() is being executed, and thus there
is no priority + 1 for me to go to by using the 'g' option to Dial.

What you're talking about only works if I do this instead:

AddQueueMember(queuename,Local/[EMAIL PROTECTED])

And then somewhere in my dialplan I have:

[agents]
exten = 1234,1,Dial(SIP/1234,20)
exten = 1234,n,DoSomethingHereIfDollarDialStatusIsNotANSWERED

And then of course it makes no difference that agent 1234 is on SIP - they
could be Zap, IAX, Skinny, whatever.

 And yes, I have good reason for using SIP channels.  We have externally
  driven automatic pausing (because the built-in wrapuptime is per-queue
 and
  therefore broken for any agent who is assigned to more than one queue),
 and
  neither form of Local (with or without /n) perform properly under this
  configuration.

 This is something new for me. Are you sure about this? Isn't
 wrapuptime taking in account agent state change? Because then, it's
 really bad for direct calls (for me it's rare that agent have several
 queues).


Wrapuptime isn't a state in app_queue.  You'd think it was (agent goes from
in-use to in-wrapup, then back to available after the configured
number of seconds).  But what really happens is that the last time a member
took a call is part of the member struct, which is subordinate to the queue
struct (i.e. the last time a member took a call is stored
per-member-per-queue, not per-member).  You can test this easily by adding a
member to two queues, then sending a call to each queue spaced a minute
apart.  Then run 'queue show' on the CLI.  You'll see that the last was xxx
seconds ago differs for the same member in  the two queues.

When app_queue is attempting to dequeue a call to an available agent, it
checks if the current time minus the time of the last call for the member in
this queue is less than the wrapuptime, and if it is, it skips that member
and goes onto the next.

Because the last call time is per queue, you can have an agent take a call
on queue foo, hang up that call, and receive a call for queue bar one second
later, even if both queue foo and queue bar have a wrapuptime of 60 seconds
configured.

So, the built in wrapup has three major problems compared to the ACD system
we moved to Asterisk from:

- wrapuptime is per-queue-per-member, not per-member
- wrapuptime is invisible (the internal state of the member during the
wrapup is not in use, and only by looking at the last was xxx seconds
ago and knowing what the configured wrapuptime for the queue is can you
tell that a member is not actually eligible to take a call)
- wrapuptime cannot be shortened or extended by the agent (or anyone else
for that matter - I once mused with writing a dialplan function to set the
last call time to some arbitrary epoch value to make this viable)

These problems led to me developing this external wrapuptime system.

My original implementation for doing external auto-pause was to have an AMI
client watch for Hangup events.  When I did that, Local channels caused
problems.  If I used one form of Local channel (with or without the /n, I
forget now) then the hangup event was fired when the call was bridged to the
agent.  The other way, the hangup didn't fire until the agent was done with
the caller, but some equally unpleasant side effect manifested.  This was
all months ago, so I don't recall the specific problems I faced.

The AMI solution was too CPU intensive, so I switched to a system that
essentially tails queue_log.  When it seems COMPLETEAGENT or COMPLETECALLER
or TRANSFER, it uses AMI to pause the member, and schedules an unpause for x
seconds in the future.By using PauseQueueMember without a queue name, it
pauses an agent in all their queues, and if the agent needs to, he can
unpause themselves early or cancel the pending unpause to give themselves
more time to write notes.

This way of doing things might not be incompatible with Local channels, but
I'd have to do some tests.

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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 Died message

2007-09-05 Thread James FitzGibbon
On 9/5/07, Tzafrir Cohen [EMAIL PROTECTED] wrote:

 Or you might have two safe_asterisk processes trying to restart asterisk.


A symptom of this (when Asterisk is not actively crashing) is constant
remote UNIX connection messages on the console every few seconds (assuming
you have nothing that legitimately polls Asterisk using 'asterisk -rx'
running).

The solution is to use ps to find out which of the safe_asterisk processes
owns the actual running copy of Asterisk (using pid and ppid) and then kill
the other one.

-- 
j.
___
--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 regexp

2007-09-05 Thread James FitzGibbon
On 9/5/07, Adrian Marsh [EMAIL PROTECTED] wrote:

 Many thanks for that!!  I didn't know that the order worked quite like
 that but I see it now... Better go check the other contexts...
 (the [56][0-9] worked fine).


You can also impose a finer level of control over the order extensions are
searched in by putting them in different contexts and using include to
pull them in in a specific order:

[foo]
exten = _017935201[56][0-9],1,Goto(local,${EXTEN:-3},1)
include = bar

[bar]
exten = _0.,1,Set(CALLERID(num)=${PSTN_GLOBAL}${CALLERID(num):-3})
exten = _0.,2,Dial(${TRUNK}/${EXTEN},,W)

Dialing 01793520158 would match the longer pattern in this case.  The search
is done in the initial context, then in each included context in the order
they were included.

There's more info here:

http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf+sorting

-- 
j.
___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

--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] E1 to Ethernet Bridge

2007-09-04 Thread James FitzGibbon
On 9/3/07, Arinze Izukanne [EMAIL PROTECTED] wrote:

 Can you show me a sample fo config?  The link schematic should look like
 this:

 E1 == TDMoE==E1.


Refer to the section Sample configs for setting up TDMoE between 2 servers
without TDM hardware, using ztdummy on this page:

http://www.voip-info.org/wiki/index.php?page=Asterisk+TDMoE

The examples are for T1, so you'll have to change the number of channels on
each span and change the channel numbers used for bchan= and dchan=, but if
you're familiar with E1 deployment already this should be simple.

-- 
j.
___
--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] Members in 'Unknown' status in output of 'queue show'

2007-08-30 Thread James FitzGibbon
On 8/29/07, BJ Weschke [EMAIL PROTECTED] wrote:

 I think we will want to see what state chan_sip is sending into
 app_queue for it to be called Uknown. What is the last state these
 channels are in before they go to Unknown in app_queue?


Unfortunately, I don't know.  This is in an active call center (~20 calls
going on at all times) and the first I hear about it is when agents start
complaining of getting calls while already on a call.

I'd have to add some debug code to both chan_sip and app_queue every time
the state changes I expect, but the last time this happened was over 5 weeks
ago and there's no obvious similarities between the two occurences.

I'll add the debug code anyway just in case, but I don't think it will give
me anything useful prior to opening the bug report.

-- 
j.
___
--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] How to handle + prefix

2007-08-30 Thread James FitzGibbon
On 8/30/07, Adrian Marsh [EMAIL PROTECTED] wrote:

 [outgoing-pstn-international]
 exten = _+.,1,Set(EXTEN=00${EXTEN:+1})
 exten = _+.,2,NoOp(test line: ${EXTEN})


Setting ${EXTEN} won't work, but Goto(context,00${EXTEN:1},priority) will:

[foo]
exten   = 7997,1,Answer
exten   = 7997,n,Set(FOO=+1441793xx)
exten   = 7997,n,Goto(foo,00${FOO:1},1)
exten   = 7997,n,Hangup
exten = _0.,1,NoOp(${EXTEN})
exten = _0.,n,Hangup

-- Executing [EMAIL PROTECTED]:1] Answer(SIP/427-9dd49740, )
in new stack
-- Executing [EMAIL PROTECTED]:2] Set(SIP/427-9dd49740,
FOO=+1441793xx) in new stack
-- Executing [EMAIL PROTECTED]:3] Goto(SIP/427-9dd49740,
foo|001441793xx|1) in new stack
-- Goto (foo,001441793xx,1)
-- Executing [EMAIL PROTECTED]:1] NoOp(SIP/427-9dd49740,
001441793xx) in new stack
-- Executing [EMAIL PROTECTED]:2] Hangup(SIP/427-9dd49740, ) in
new stack

-- 
j.
___
--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] Monitor System using AGI Scripts

2007-08-29 Thread James FitzGibbon
On 8/29/07, Nitesh Divecha [EMAIL PROTECTED] wrote:

Basically, it would be a totally different system running Asterisk with
 AGI scripts and monitoring other systems (Web Servers, FTP, SMTP). Not
 specifically monitoring ports (80, 21, 25) but whole system. If system
 timeouts then AGI scripts are triggered and notify system admin.


You'd be better to monitor using something like Nagios or one of the other
open-source monitoring systems, then have the notification script (which
should be customizable in your monitoring system) write a .call file to make
Asterisk dial out and tell the sysadmin.

To use the Asterisk dialplan to schedule and cycle checks of services .
erm. no.

-- 
j.
___
--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] Queue Agents on Remote Asterisk server?

2007-08-29 Thread James FitzGibbon
On 8/29/07, Aubrey Wells [EMAIL PROTECTED] wrote:

 I have a main Asterisk server, and a server at a branch location connected
 via a IAX2 trunk. I want to have a queue at the main location that has
 people from both locations as members. I got this working, but the trouble
 comes when the round-robin logic selects a member at the branch office to
 call. If that user is unavailable, their voicemail answers the call, and the
 main server detects this as an answered call and assumes the agent answered.
 This is obviously not what I want, as I would like for the call to roll to
 one of the other agents. Has anyone come across this before? Solutions?


Don't contact the remote agents using a context that includes a call to
VoiceMail().  Contact a remote context that dials the agent using Dial()
with the appropriate timeout and hangs up if the agent is unavailable.  Then
app_queue () will do the right thing.

-- 
j.
___
--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

[asterisk-users] Members in 'Unknown' status in output of 'queue show'

2007-08-29 Thread James FitzGibbon
Does anyone know what can cause queue members to go into a status of
Unknown?

pbxtel-01*CLI queue show

cshas 2 calls (max unlimited) in 'rrmemory' strategy (24s holdtime),
W:0, C:447, A:20, SL:91.7% within 60s
   Members:
  SIP/1405 (dynamic) (Unknown) has taken no calls yet
  SIP/1420 (dynamic) (paused) (Not in use) has taken no calls yet
  SIP/1442 (dynamic) (paused) (Unknown) has taken 2 calls (last was 101
secs ago)
  SIP/1440 (dynamic) (In use) has taken 2 calls (last was 3071 secs ago)
  SIP/1428 (dynamic) (paused) (Not in use) has taken 2 calls (last was
10818 secs ago)
  SIP/1404 (dynamic) (paused) (Not in use) has taken 2 calls (last was
2228 secs ago)
  SIP/1429 (dynamic) (paused) (Unknown) has taken 2 calls (last was 953
secs ago)
  SIP/1432 (dynamic) (Unavailable) has taken 5 calls (last was 1229 secs
ago)
  SIP/1430 (dynamic) (In use) has taken 2 calls (last was 22744 secs
ago)
  SIP/1435 (dynamic) (In use) has taken 3 calls (last was 13511 secs
ago)
  SIP/1434 (dynamic) (Unknown) has taken 6 calls (last was 9504 secs
ago)
  SIP/1424 (dynamic) (In use) has taken 4 calls (last was 16373 secs
ago)
  SIP/1408 (dynamic) (paused) (Not in use) has taken 2 calls (last was
8685 secs ago)
  SIP/1203 (dynamic) (In use) has taken 3 calls (last was 16425 secs
ago)
  SIP/1410 (dynamic) (Unknown) has taken 2 calls (last was 8629 secs
ago)
   Callers:
  1. Zap/50-1 (wait: 11:15, prio: 0)
  2. Zap/36-1 (wait: 0:41, prio: 0)

That's just one queue, but I had nearly all my agents just go into Unknown
status.  This is on * 1.4.10.1.  I had this happen once in the past, but
couldn't reproduce it in the lab.

When this happens, 'ringinuse=no' stops working, because app_queue considers
Unknown to be a valid state to dispatch a caller to.  So my agents start
getting flooded with calls while already on the phone, then the call-limit
I've configured in sip.conf kicks in and my console fills up with this:

pbxtel-01*CLI
[Aug 29 16:44:04] ERROR[22621]: chan_sip.c:3169 update_call_counter: Call to
peer '1405' rejected due to usage limit of 2

pbxtel-01*CLI
[Aug 29 16:44:04] ERROR[22621]: chan_sip.c:3169 update_call_counter: Call to
peer '1410' rejected due to usage limit of 2

pbxtel-01*CLI
[Aug 29 16:44:04] ERROR[22762]: chan_sip.c:3169 update_call_counter: Call to
peer '1405' rejected due to usage limit of 2

pbxtel-01*CLI
[Aug 29 16:44:04] ERROR[22762]: chan_sip.c:3169 update_call_counter: Call to
peer '1410' rejected due to usage limit of 2

pbxtel-01*CLI
[Aug 29 16:44:04] ERROR[22686]: chan_sip.c:3169 update_call_counter: Call to
peer '1405' rejected due to usage limit of 2

pbxtel-01*CLI
[Aug 29 16:44:04] ERROR[22686]: chan_sip.c:3169 update_call_counter: Call to
peer '1410' rejected due to usage limit of 2

I had to restart Asterisk to clear the states - sip reloads, app_queue
reloads didn't do anything.

Any thoughts as to where to start debugging this?  I killed * instead of
stopping it so that I got a core file.  There is nothing in the log to
indicate what went wrong prior to the first instance of ...rejected due to
usage limit.

Anything else I should gather before submitting a bug?

Thanks

-- 
j.
___
--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] Distributed System

2007-08-28 Thread James FitzGibbon
On 8/28/07, Philipp Kempgen [EMAIL PROTECTED] wrote:


 Realtime + MySQL does it. That needs some extra work but
 it's possible.


Or DUNDi.  JR just posted a quick tutorial on getting that up and running:

ftp://ftp.ntcp.net/DUNDi_So_Easy.pdf

-- 
j.
___
--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] Keeping queue counters after restarting

2007-08-24 Thread James FitzGibbon
On 8/24/07, Marlon Dutra [EMAIL PROTECTED] wrote:

 Every queue has some status counters (completed, abandoned, hold
 time...) that are very useful for statistics. The problem is that those
 counters are reset every time Asterisk restarts.

 Is there a way to keep those counters, maybe in astdb? Also, is there a
 way to reset the counters through a cli command?


Not sure about restarts, but trunk keeps them through reloads.  How often
are you restarting?

From
http://svn.digium.com/view/asterisk/trunk/CHANGES?revision=79638view=markup
:

Queue changes
-
* Added keepstats option to queues.conf which will keep queue
  statistics during a reload.

I don't think there's a command to reset the counters - would be a
good (and relatively simple I think) patch to offer up before 1.6 gets
closer to a release.

-- 
j.
___
--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] Stable-Stable Asterisk

2007-08-24 Thread James FitzGibbon
On 8/24/07, Joshua Colp [EMAIL PROTECTED] wrote:

 I'm going to end this email with a question myself... how many people
 have Asterisk on a development/staging server before deployment, test,
 and isolate the issues they may have in their specific scenario?


I do, but many of the problems I have experienced (see #10199 for an
example) don't manifest under anything but production loads.  In that
particular case, I couldn't find a way to replicate the levels of traffic
and the nuances of agent pickup / ignore / hangup / etc. in my lab.  My
current load test consists of a lab box generating about 50-75 concurrent
calls to an ITSP that terminate on another * conencted to PRI.  But what you
do with a call when it hits your box can make a difference.  I had a load
test that just walked through my IVRs pressing random keys for about 5
minutes.  I could load 4 PRI full of calls to that context and the box would
be fine.  The second I added queueing (so that there was SIP signalling out
to agent softphones), I'd get a kernel panic.  The agent didn't even have to
pick up the phone - just making it ring was enough.

Let me ask a question myself: what kind of regression test does * undergo
before release, and what level of traffic gets put through stuff like
app_queue?  I assume it's not real-world scale, else these hard to pin down
concurrency issues we're seeing would have been caught in test.

-- 
j.
___
--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] 99 bottles of beer

2007-08-21 Thread James FitzGibbon
On 8/21/07, Steve Edwards [EMAIL PROTECTED] wrote:

 To control the tv in this room, press 1. To control a tv in another room,
 press 2. To control the outside lights, press 3. To control the
 sprinklers, press 4, ...


To control the power bar the Asterisk server is plugged into, press 5

click

DAAD!  The stupid phone isn't working!

-- 
j.
___
--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] Rewriting the From and Subject from voicemail for a MMS Message to a Cell Phone - like visual voicemail

2007-08-20 Thread James FitzGibbon
On 8/19/07, Steve Turner [EMAIL PROTECTED] wrote:

 I would like to send Multimedia Messaging (MMS) email (gateway)  to my
 cell
 phone and have the from and subject be the callerid/calleridnam
 information
 from the voice mail message.


voicemail.conf lets you change the from and subject line, and has
replacement tokens for ${VM_CALLERID}, ${VM_CIDNUM} and ${VM_CIDNAME}.

What are you trying to achieve that use of emailfrom, emailsubject and
attach=yes in voicemail conf won't do?

-- 
j.
___
--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

[asterisk-users] Suggestions on how to debug strange DTMF problems

2007-08-17 Thread James FitzGibbon
I'm hoping people can suggest some ideas for debugging a problem that I'm
having with DTMF.

Unlike most of the DTMF problems reported here, it has nothing to do with
Asterisk interpreting DTMF.  My problem is with the synthesis of DTMF tones
on outbound calls on a PRI connected to a TE412P card.

I'm running * 1.4.10.1 with Zaptel 1.4.4.  It is important to note that
these problems never occurred when we were using 1.2.  They started
immediately after upgrading to 1.4 (1.4.4 and 1.4.2.1 at the time IIRC)

The original problem people would report is that they have problems using
IVRs that they call over the PSTN.  Duplicated digits, missed digits, etc.
I've tried to replicate the problem using various user agents (Polycom 430,
Grandstream GXP2000, Linksys SPA942, eyeBeam, etc.) and have observed the
problem.  It's not consistent, but that's probably due to the inconsistency
of user input.  If you concentrate very carefully and hit the keys for a
consistent period of time with consistent spacing, the problem doesn't seem
to happen.  I also found that when the user agent was directed into DISA()
and then dialed the IVR from within that application, they didn't have
problems with their DTMF being recognized.

In an attempt to quantify the problem, I set up the following test harness,
sending calls out of Asterisk into an ITSP system.  The final termination of
the call is a different Asterisk box from the one that generated the call,
though running the same version.  DTMF from the ITSP to the second Asterisk
system is SIP INFO.

Asterisk - PRI (TE412P) - PSTN - ITSP - Asterisk

I generated calls that executed SendDTMF().  On the other Asterisk system, I
used Read() to capture the DTMF and stick it in a database.  I did 1250
calls (250 to each of the 4 PRIs connected to the TE412P and 250 without
regard to the PRI used).  Across all of those calls, I didn't see one missed
or doubled-up digit.

I then did some manual tests where I placed calls from the Polycom 430 to
the same application (basically putting myself in place of SendDTMF).
Immediately I saw doubled up an missed digits.  I turned on DTMF debugging
on the second Asterisk box, and doubled-up digits always seem to take this
form:

[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF begin emulation of '4' with
duration 90 queued on SIP/5060-08da0d70
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF end emulation of '4' queued on
SIP/5060-08da0d70
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF end '4' received on
SIP/5060-08da0d70, duration 70 ms
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF begin emulation of '4' with
duration 80 queued on SIP/5060-08da0d70
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF end emulation of '4' queued on
SIP/5060-08da0d70
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF end '4' received on
SIP/5060-08da0d70, duration 50 ms
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF begin emulation of '4' with
duration 80 queued on SIP/5060-08da0d70
[Aug 17 10:50:05] DTMF[25160] channel.c: DTMF end emulation of '4' queued on
SIP/5060-08da0d70

That's a single keypress.  As I understand it, synthesized DTMF tones should
consistently have a duration of 100 ms, and indeed most of what shows up in
the DTMF log does have that duration (or something close to it):

[Aug 17 10:49:55] DTMF[25160] channel.c: DTMF end '1' received on
SIP/5060-08da0d70, duration 100 ms
[Aug 17 10:49:55] DTMF[25160] channel.c: DTMF begin emulation of '1' with
duration 100 queued on SIP/5060-08da0d70
[Aug 17 10:49:55] DTMF[25160] channel.c: DTMF end emulation of '1' queued on
SIP/5060-08da0d70
[Aug 17 10:49:57] DTMF[25160] channel.c: DTMF end '2' received on
SIP/5060-08da0d70, duration 100 ms
[Aug 17 10:49:57] DTMF[25160] channel.c: DTMF begin emulation of '2' with
duration 100 queued on SIP/5060-08da0d70
[Aug 17 10:49:57] DTMF[25160] channel.c: DTMF end emulation of '2' queued on
SIP/5060-08da0d70
[Aug 17 10:49:58] DTMF[25160] channel.c: DTMF end '3' received on
SIP/5060-08da0d70, duration 110 ms
[Aug 17 10:49:58] DTMF[25160] channel.c: DTMF begin emulation of '3' with
duration 110 queued on SIP/5060-08da0d70
[Aug 17 10:49:58] DTMF[25160] channel.c: DTMF end emulation of '3' queued on
SIP/5060-08da0d70
[Aug 17 10:50:00] DTMF[25160] channel.c: DTMF end '4' received on
SIP/5060-08da0d70, duration 100 ms
[Aug 17 10:50:00] DTMF[25160] channel.c: DTMF begin emulation of '4' with
duration 100 queued on SIP/5060-08da0d70
[Aug 17 10:50:01] DTMF[25160] channel.c: DTMF end emulation of '4' queued on
SIP/5060-08da0d70
[Aug 17 10:50:02] DTMF[25160] channel.c: DTMF end '4' received on
SIP/5060-08da0d70, duration 100 ms

Yet from time to time, the ITSP hears that supposed 100ms tone as two
tones of 70 and 50ms, or 90 and 40, or some combination that makes it appear
to be a doubled-up digit.

I'd be tempted to say that the problem is whatever part of the ITSP that is
interpreting the DTMF coming in from the PSTN, but the IVRs that my users
complain about are operated by tons of different 

Re: [asterisk-users] Experimenting- Sip dialing with Zap

2007-08-16 Thread James FitzGibbon
On 8/16/07, John Meksavan [EMAIL PROTECTED] wrote:

 CLI.  What am I doing wrong? Thanks in advance.


The channel spec you need to use is:

Dial(Zap/g0/${EXTEN:1})

not

Dial({Zap/g0/{EXTEN:1})

Though bear in mind that the :1 is removing the first char of your
extension, so if you dial '123' on your Linksys, you'll dial '23' out your
analog line, which is unlikely to be what you want to do if said line is
connected to the PSTN.  It's more typical to see something like

exten = _9NXXNXX,1,Dial(Zap/g0/${EXTEN:1})

which matches a 10 digit local number prefixed by nine, but removes the
leading 9 (using :1) because it's not needed (or wanted) by the telco.

-- 
j.
___
--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] IVR and MySQL

2007-08-14 Thread James FitzGibbon
On 8/14/07, Atis [EMAIL PROTECTED] wrote:

 That's possible, but i wouldn't recommend on large production system.
 Using MySQL you would need to connect and disconnect all the time, and
 it takes resources.. I would suggest to append that info to CDR
 userfield (if you are storing your CDR in MySQL), and run periodically
 some script that extracts them. Of course it's more complex, but that
 would be my way.


If the data you wish to store is more complex than stuffing in the CDR
userfield would allow, you can always call out to an AGI which can write the
data to whatever file format you want for later loading into a database.

If you used FastAGI and a pre-forking AGI server model, you could even take
the database connection hit when the AGI server starts.  The per-call cost
would then be the cost to establish the socket connection to the AGI server
from Asterisk, the cost to perform the SQL inserts over an established
database connection, plus whatever other calculation or transformation you
needed to do before doing the insert.

That architecture would hold up under a fairly large load.  Perl's
Asterisk::FastAGI framework lets you specify the number of pre-forked
children to launch, plus you can tell each child to exit (spawning a
replacement for the pool) after processing a certain number of
transactions.  It's very similar to the Apache prefork model.

-- 
j.
___
--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] BLF with Aastra

2007-08-14 Thread James FitzGibbon
On 8/14/07, Matt [EMAIL PROTECTED] wrote:

 I have a 536i expansion module attached to a 57i-CT.   The BLF lights
 on the 536i will light up and work fine for a while... however after a
 bit they seem to loose their ability to see if someone is on a phone.
 They still work to dial, if I try to dial, however, they don't light
 up when someone makes a call, or if their phone rings. If I reboot
 the phone, the lights start working again (for a while).


Does 'sip show subscriptions' indicate that the 57i is still subscribed to
the extension for updates?  If not, you might have to do a test with 'sip
debug peer aastraname' to confirm that the subscription is being made
properly on phone startup and not being removed by the phone in response to
some state change.

A quick glance at chan_sip.c indicates that if a user agent tries to
subscribe with an expiry time greater than 'maxexpiry' from
sip.conf(default 3600 seconds), the subscription expiry in Asterisk
will be silently
changed to whatever the allowed maximum is.  So if the Aastra is trying to
subscribe for say 3 hours and Asterisk doesn't allow subscriptions greater
than one hour, then notify messages will stop being sent after one hour
until the Aatra re-subscribes.  I haven't delved in very deep, so I can't
tell if the response to the UA indicates the actual expiry Asterisk used,
but even so you'd have to be certain that the Aastra respects an expiry in
the response that differs from what it asked for.

When you're doing the debug (hopefully on a quiet system), watch the phone
boot, then use 'sip show subscriptions' to get the call-id of the
subscription.  Then watch for console messages indicating that the call has
been destroyed (which should come at the 1 hour mark or whatever time the
Aastra used for it's subscription length.

-- 
j.
___
--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] IVR and MySQL

2007-08-14 Thread James FitzGibbon
On 8/14/07, Fabio Ardeola [EMAIL PROTECTED] wrote:


 Let say that the user entry during the call is a
 reference number of a house to rent. Would be possible
 to check if the reference number is a valid entry on
 the MySQL database and then base on its answer define
 the next menu item on the IVR menu.


If you want to do something like that, you can either use the MYSQL function
(with the attendant issues of connecting/reconnecting/etc.) or put all of
the functionality in an AGI script.  Since AGI can both receive information
from and send commands to Asterisk, you can do pretty much anything you can
code.  There are programming frameworks for AGI for Perl, PHP, Java, and you
could even do it in shellscript if you want.  The communication channel
between Asterisk and the script is stdin/stdout, so you're not restricted at
all.

Using AGI does make the the integrity of your system depend on an external
component (i.e. if you're using FastAGI and the agi server goes down, your
calls will just return immediately to the dialplan), but when you need to do
something that doesn't fit intuitively into the Asterisk dialplan, I find
it's the way to go.

-- 
j.
___
--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] Hardware Platform Recommendations for Digium Card Compatability

2007-08-13 Thread James FitzGibbon
On 8/10/07, Jason K. Carter [EMAIL PROTECTED] wrote:

 Could everyone that has a working production Asterisk server that uses a
 Digium telephony card as a BRI/PRI gateway let me know what
 motherboard/processor your server uses?


Currently running a TE412P in a IBM x3650 Model 7979.  I had some problems
when I also had a TDM400B in the same system.

I have also run this card successfully on a Intel SE7230NH-1 board (having
the TDM400B installed as well was not a problem on this board)

I had a reproduceable kernel panic under moderate load running this board on
a HP DL380G5 with Zaptel 1.4.  Zaptel 1.2 was just fine.

All of my testing was done on CentOS 4.4 and 4.5.

My zttest scores (on the IBM) are generally above 98%, but sometimes I see
the tests start at 97.73% for about 20 seconds before it climbs.  I often
see spikes up to 100% rapidly followed by a drop back to 98.x%.

-- 
j.
___
--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 Manager to Record Greetings

2007-08-10 Thread James FitzGibbon
On 8/10/07, Peder @ NetworkOblivion [EMAIL PROTECTED] wrote:

 That's great, now say you have 5 or 6 AA's and each one has 10 different
 parts that you want to record (thank you for calling...  for Steve
 press 1 for dave press 2).  Rather than having to record a long
 message, I want to break it into pieces so that if dave leaves, we can
 just record that one chunk rather than the whole thing.  I would need
 lots of extensions pre-setup for each chunk.  Not very efficient.


You could front it with something other than extensions.  I tag all my
recordings with a 4 digit number, but I use an AGI script to manage them.
The AGI (written in Perl) authenticates the user, then lets them punch in
the announcement number.  A database lookup translates the announcement
number to the pathname of the the file, then the user gets the choice to
listen to the existing recording or re-record it.

Adding new announcements is a simple SQL insert.

TMTOWTDI

-- 
j.
___
--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] generating a GUID

2007-08-09 Thread James FitzGibbon
On 8/9/07, Julian Lyndon-Smith [EMAIL PROTECTED] wrote:

 I have a need to have a GUID (for example,
 bcd47ccc-d7c9-ddb6-dc11-6746a770d77d [36 characters long including the
 -]) generated in the dialplan. Is there any asterisk function that
 would do this ? I would prefer not to have to shell out every time a
 call comes in.


There's nothing built in that I know of.  I had mused with the idea of
wrapping the available UUID generator code out there into a function and
offering it as a patch, but it's a low priority thing for me.

In the meantime, you could achieve what you want without the cost of
spinning up a shell process by writing a FastAGI app in Perl.  Using the
modules Asterisk::FastAGI and Data::UUID, you could get a UUID back for the
cost of the socket connection.

This is a quick example that I coded up to do that - it was actually more
painful to install the modules from CPAN than code up the server itself:

--START--
#!/usr/bin/perl
#

use strict;
use warnings;

MyAGI-run( port = 4574 );

package MyAGI;
use base 'Asterisk::FastAGI';

use strict;

use Data::UUID;

my $uuid;

sub child_init_hook
{

  $uuid = Data::UUID-new;

}

sub fastagi_handler
{

  my $self = shift;
  $self-agi-set_variable( UUID = $uuid-create_str() );

}
---END---

When run, this creates a pre-forking server with 5 children, which makes the
individual UUID generation about as cheap as you're going to get going
outside of the Asterisk process.  When I execute that with agi debugging
turned on from this diaplan snippet:

exten   = 7993,1,Answer
exten   = 7993,n,AGI(agi://127.0.0.1:4574/fastagi_handler)
exten   = 7993,n,SayAlpha(${UUID})
exten   = 7993,n,Hangup

I get this:

-- Executing [EMAIL PROTECTED]:1] Answer(SIP/427-9df490e0, )
in new stack
-- Executing [EMAIL PROTECTED]:2] AGI(SIP/427-9df490e0,
agi://127.0.0.1:4574/fastagi_handler) in new stack
AGI Tx  agi_network: yes
AGI Tx  agi_network_script: fastagi_handler
AGI Tx  agi_request: agi://127.0.0.1:4574/fastagi_handler
AGI Tx  agi_channel: SIP/427-9df490e0
AGI Tx  agi_language: en
AGI Tx  agi_type: SIP
AGI Tx  agi_uniqueid: 1186667018.723
AGI Tx  agi_callerid: 427
AGI Tx  agi_calleridname: James FitzGibbon
AGI Tx  agi_callingpres: 0
AGI Tx  agi_callingani2: 0
AGI Tx  agi_callington: 0
AGI Tx  agi_callingtns: 0
AGI Tx  agi_dnid: 7993
AGI Tx  agi_rdnis: unknown
AGI Tx  agi_context: from-internal-admin
AGI Tx  agi_extension: 7993
AGI Tx  agi_priority: 2
AGI Tx  agi_enhanced: 0.0
AGI Tx  agi_accountcode:
AGI Tx  CLI
AGI Rx  SET VARIABLE UUID 88AEDB9A-467E-11DC-9F13-8E31D47CEF85
AGI Tx  200 result=1
-- AGI Script agi://127.0.0.1:4574/fastagi_handler completed, returning
0
-- Executing [EMAIL PROTECTED]:3] SayAlpha(SIP/427-9df490e0,
88AEDB9A-467E-11DC-9F13-8E31D47CEF85) in new stack

And then Allison starts chattering out the digits of the UUID.

Hope that gives you something to work with.

-- 
j.
___
--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] Method for scripting options specified in make menuconfig

2007-08-09 Thread James FitzGibbon
On 8/9/07, Tzafrir Cohen [EMAIL PROTECTED] wrote:

  After you run make menuselect, you'll have a file  'menuselect.makeopts'
 in
  your asterisk source dir.  Copy that to /etc/asterisk.makeopts (or
  ~/.asterisk.makeopts) and it will be used for future builds.  Once
 you've
  copied the file over, do a 'make distclean ; ./configure ; make' to
 check
  that it worked.

 Hmmm why distclean ?


'clean' doesn't remove the generated menuselect.makeopts:

clean: $(SUBDIRS_CLEAN)
rm -f defaults.h
rm -f include/asterisk/build.h
rm -f include/asterisk/version.h
@$(MAKE) -C menuselect clean
cp -f .cleancount .lastclean

distclean: clean
@$(MAKE) -C menuselect dist-clean
@$(MAKE) -C sounds dist-clean
rm -f menuselect.makeopts makeopts menuselect-tree
menuselect.makedeps
rm -f makeopts.embed_rules
rm -f config.log config.status
rm -rf autom4te.cache
rm -f include/asterisk/autoconfig.h
rm -f include/asterisk/buildopts.h
rm -rf doc/api
rm -f build_tools/menuselect-deps

So if you go through this cycle:

untar
./configure
make menuselect
...make module choices...
cp menuselect.makeopts /etc/asterisk.makeopts
make clean
./configure

Then the automated run of menuselect is going to have two makeopts files
that it might pull from: the generated one left over from the first run of
configure, and the one in /etc.  But since the files should be identical,
you won't be absolutely sure that your file in /etc is the one driving the
module choices.

If you changed cp menuselect.makeopts... to mv menuselect.makeopts... in
the above snippet, then I suppose 'make clean' would suffice.  But 'make
distclean' doesn't do any harm - it should return the directory to it's
post-untar state, right?

-- 
j.
___
--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] Need Help in changing Voice message

2007-08-09 Thread James FitzGibbon
On 8/9/07, Farooq Ahmed [EMAIL PROTECTED] wrote:

 Asterisk has a lot of customizable voice prompt in /var/lib/asterisk/sound
 but i want to change a very well known voice message which occurs when we
 try to dail a number
 against dial plan
 beep beep beep The person you are calling is unavaiable, please try
 again.
 I thought it would be availabe in the sound directory of asterisk but it
 is not there.
 When i dial such wrong number no log appears in the asterisk cli command
 just get this message
 so i am not getting any idea which macro or application generating this
 message.
 Anybody have any idea about how to change this?


This is probably not coming from Asterisk.  It's probably generated by your
phone when Asterisk responds with a 5xx or 4xx response code to your
INVITE.  Depending on your phone you may or may not be able to change it.

-- 
j.
___
--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] Method for scripting options specified in make menuconfig

2007-08-08 Thread James FitzGibbon
On 8/8/07, arkda [EMAIL PROTECTED] wrote:

 I've been digging around and I haven't found a way to do this, but I have
 a feeling I'll feel like an idiot because it's something I'm over looking.

 Normally if I need to specify an additional option (such as different
 language sound files) or I'm building an Asterisk server with a lean
 configuration and need to remove some modules I do so with 'make
 menuconfig'. I've ran into a need however to install Asterisk entirely from
 the command line, so I'm looking for the method of accomplishing what I've
 normally done through 'make menuconfig' solely from the command line.

 Anyone know how this is accomplished?


After you run make menuselect, you'll have a file  'menuselect.makeopts' in
your asterisk source dir.  Copy that to /etc/asterisk.makeopts (or
~/.asterisk.makeopts) and it will be used for future builds.  Once you've
copied the file over, do a 'make distclean ; ./configure ; make' to check
that it worked.

It's the same idea for asterisk-addons, except you copy its
menuselect.makeopts to /etc/asteriskaddons.makeopts.

-- 
j.
___
--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] How to write a function with a return value in Asterisk

2007-08-08 Thread James FitzGibbon
On 8/8/07, Mike [EMAIL PROTECTED] wrote:

 I'd be most thankful for some link to a page that shows how to write such
 a
 function in Asterisk.


There is a test application in the source tree (not built by default I
believe), but it doesn't look like anyone has made an equivalent sample
function.

However, many of the functions in 1.4 are pretty simple, and would be a good
jumping off point.  Take func_sha1.c for example: 83 lines in the file, 4
functions and one macro.  You could copy that and do the proper renaming to
make MY_FUNKY_NEW_FUNC that does exactly what func_sha1 does (or
alternatively, nothing by getting rid of the bulk of the sha1() function
therein.

How big it gets as you add whatever magic that function should perform is up
to you of course.

-- 
j.
___
--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] How to write a function with a return value in Asterisk

2007-08-08 Thread James FitzGibbon
On 8/8/07, Mike [EMAIL PROTECTED] wrote:

 So, I wrote (well, plagarized directly from the Web) a simple Perl program
 that prints Hello World.  I call it using this:

 exten = 12345,1,AGI(agi-helloworld.agi)

 Seems to work (I'm not expecting anything, really, just no Asterisk
 error).

 When I try to use it as part Noop like this:
  exten = 12345,1,Noop(${AGI(agi-helloworld.agi)})

 In the hope of getting to see Noop(Hello World) in my CLI, I get the
 following Asterisk error:

 Aug  8 13:40:48 ERROR[5771]: pbx.c:1402 ast_func_read: Function AGI not
 registered

 AGI certainly seems registered as it worked in the first case.  Again,
 something obvious I missed?


This is calling the AGI application:

exten = something,priority,AGI(program|args)

This is an attempt to call a function called AGI (which doesn't exist) and
pass the results of said non-existent function to the NoOp application:

exten = something,priority,NoOp(${AGI(program|args)})

look at 'core show applications' and 'core show functions' to see what you
can call in each case.  Applications and functions aren't interchangeable.

If you want to use an AGI script to set a variable you can later use as an
arg to Dial(), then you want to call the AGI application from your dialplan,
then from inside the AGI script do your calculations and issue the AGI
command SET VARIABLE name value.

So if you have a very basic AGI script that just does this:

echo SET VARIABLE foo bar

then your dialplan could look something like this:

exten = foo,1,AGI(foo.agi)
exten = foo,n,NoOp(${foo})

And you'd expect to see NoOp(bar) on your console when you called that
extension.

Of course, you'd want to use one of the available AGI frameworks to do the
heavy lifting of parsing the input that Asterisk gives an AGI script and
take care of the error handing when you issue a command back to Asterisk
from the AGI script.

-- 
j.
___
--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] Learn some terminalogy before mounting thistask.

2007-08-06 Thread James FitzGibbon
On 8/5/07, James R. Stevens [EMAIL PROTECTED] wrote:

 In the design of an Asterisk system using Cisco 7900 series SIP phones
 we are struggling with giving the reception folks (3) hardware that can
 tell them the status of everyone in the office (10 or so) (On the phone,
 out of office etc) Something that would register each of the extensions
 we choose and give status of that ext.

 What hardware (Phone or other) could we give the receptionist to do
 this?


You're probably looking for something like this:

http://www.cisco.com/en/US/products/hw/phones/ps379/products_data_sheet09186a008008883d.html

I have no experience integrating this specific piece of hardware with
Asterisk, but I've done what you're trying to do with the Grandstream
equivalent for our front reception:

http://www.grandstream.com/gxp2000.html

and

http://www.grandstream.com/gxp2000ext.html

As I understand it, so long as the device can do a SIP SUBSCRIBE for each
extension you want to monitor and you configure hints in your Asterisk
dialplan for those extensions, it should work.  You may need to set
'subscribecontext' (in sip.conf) for the phone that will be watching the
extensions unless your hints are in the same context as the phone uses for
outbound dialing.

Of course, what the device does with the various payloads contained in the
SIP NOTIFY messages is going to be different for each phone.  On the
Grandstream I can see 'not in use' (solid green) and 'ringing' (flashing
red) distinctly, but 'unavailable' and 'in use' are both mapped to a solid
red, which makes it somewhat useless for transiently connected user agents
like softphones.

Hopefully someone with experience will speak up and confirm that the 7900
series does interop properly with Asterisk for SUBSCRIBE and NOTIFY.

If that doesn't work, you could always go with a software solution, like the
Flash Operator Panel.  voip-info has a list (look at the Operator section
on the page): http://www.voip-info.org/wiki/view/Asterisk+GUI

-- 
j.
___
--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] IAX bat phone.

2007-08-06 Thread James FitzGibbon
On 8/3/07, Michael Munger [EMAIL PROTECTED] wrote:

  Is there a way to setup an IAX bat phone (immediate=yes) or is this a
 privilege only reserved for ZAP channels?


As I understand it, this would have to be supported by your specific
hard/soft phone.

It's the same with SIP - taking a handset off-hook doesn't cause any traffic
to go to Asterisk.  The first packet from the user agent is sent when the
phone tries to dial something.  Depending on the user agent, this could be
as soon as someone presses a single key (so-called early dial with SIP 484
responses), or more typically when an entire number has been dialed and a
timeout has occurred or send button has been pressed.  Zap FXS ports can
tell when a handset has gone off-hook and take some action based on that due
to the change in electrical impedance.

Some soft-phones support bat-phone operation, though you have to hunt
through the docs to get it to work.  My Linksys SPA942 desk phone has a dial
plan syntax that allows this:

(:S0)

Which means prefix whatever I type with  and match an empty string,
dialing as soon as you have a match, which causes the phone to calll 
as soon as I take it off hook.  But it's obviously device-specific, and has
nothing to do with SIP or IAX or Asterisk for that matter.  When the call
arrives at my server, it doesn't look any different than a call to  from
a phone with a more traditional dialplan.

-- 
j.
___
--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] Learn some terminalogy before mountingthistask.

2007-08-06 Thread James FitzGibbon
On 8/6/07, James R. Stevens [EMAIL PROTECTED] wrote:

  I'm reading the PDF on the Cisco Expansion module and it says 'When used
 as a DN key buttons are illuminated …'



 Is that what we are doing within Asterisk or Trixbox when we configure an
 extension?  (A Directory Number??)


I suspect DN Key is just one way of describing a multi-function button
that can both display extension status and serve as a speed dial / transfer
destination.

On the Grandstream I have to configure the expansion car buttons as
Asterisk BLF buttons, even though BLF (busy lamp field) isn't an
Asterisk setting that I turn on.  To enable BLF functionality in Asterisk, I
have to set up hints in the dialplan and configure the user agent to
subscribe to status notitications for those extensions.

I'd search for asterisk user testimonials to be safe (assuming nobody steps
up and says I got that working).  Often times you'll find someone's blog
about how they got a feature working with a particular piece of hardware,
along with configuration samples.

-- 
j.
___
--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] Macro and Arguments

2007-08-03 Thread James FitzGibbon
On 8/3/07, bilal ghayyad [EMAIL PROTECTED] wrote:

 At the extensions.conf file, at [demo] context, there
 is a line:

 exten = 1234,n,Macro(stdexten, 1234,
 ${GLOBAL(CONSOLE)})

 In this line, I understand that it calls the macro
 name stdexten [macro-stdexten] but about the other
 variables, do we consider 1234 is ARG1 and the
 ${GLOBAL(CONSOLE)} is the ARG2? This is important to
 distinguish the arguments inside the macro.


Correct.

From the other side, why it used ${GLOBAL(CONSOLE)} to
 retreive the variable and did not write it directly
 ${CONSOLE} as already CONSOLE is configured in the
 [global] or what is the storey :) - ?


Using ${CONSOLE} relies on magic - it looks for a channel variable, and when
one is not found, it falls back to the global var.  If CONSOLE happened to
be defined on the channel, it would be returned instead of the global var.

Using the GLOBAL dialplan function lets you get at global variables whether
or not direct access to them is occluded by a like-named local or channel
variable.

-- 
j.
___
--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] DIALSTATUS not set

2007-08-03 Thread James FitzGibbon
On 8/3/07, Julian Lyndon-Smith [EMAIL PROTECTED] wrote:

 why if I call the Busy or Congestion extensions, the DIALSTATUS and
 HANGUPCAUSE variables are not set ?

 If I call (say) extension 1234 all things are set ok.


I think you've answered your own question there.  The only asterisk
application that sets DIALSTATUS is Dial().  If you grep the source, you'll
see that the value is retrieved by some other modules (chan_sip, chan_iax,
etc.), but only Dial() sets the value of the variable.

I assume when you say when I call the Busy extension you mean something
like a SIP user whose context is outgoing doing an INVITE to 
[EMAIL PROTECTED].  If so, you're bridging a SIP call leg to an asterisk
application, so Dial() isn't invoked and DIALSTATUS isn't set.

It might work if you did an invite to an extension that used Dial() to call
a Local channel (e.g. Local/[EMAIL PROTECTED]), but I'm not sure how DIALSTATUS
would interact with the /n option on the local channel.

-- 
j.
___
--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] partial ChanSpy

2007-08-03 Thread James FitzGibbon
On 8/3/07, nik600 [EMAIL PROTECTED] wrote:

is it possible to spy (not record, spy) partially on a channel?

 for exaple, i'd like to listen only the input or the output voice.


trunk has added an 'o' option to ChanSpy:

o - Only listen to audio coming from this channel.\n

You might be able to achieve what you want by alternately spying on either
side of the bridged call using 'o' both times.

I'm not sure if this would be portable back into 1.4 though or if you'll
have to wait for 1.6 to be released.

-- 
j.
___
--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] Hardware that can ring my phone?

2007-08-02 Thread James FitzGibbon
On 8/1/07, Linux Lover [EMAIL PROTECTED] wrote:

  This SOHO PBX box won't interop with Asterisk
  because it doesn't speak any
  of the protocols that Asterisk does.  This box

 I tend agree with your evaluation. Still, I was
 thinking that since all these el-cheapo SOHO PBX boxes
 support manual attendant call transfer, what's to
 prevent Asterisk from mimicking an attendant by
 sending proper DTMF signals and make this box
 transfer the call to the single analog phone in the
 business? That is, Asterisk will connect (via RJ-11)
 to the unit as the attendant's phone, and my real
 phone (only one in the system) will connect via a
 second RJ-11 (there could be 4 of them).

 Or is Asterisk not capable of sending DTMF signals
 over an RJ-11 connection?


You can send arbitrary DTMF over any of Asterisk's channels from the
dialplan.  I just figured that this level of integration was a bit deeper
than you were looking for as a first project.  It would be an interesting
experiment, to be sure.  The biggest issue I'd think would be feedback - you
can send the DTMF along the wire, but how do you know that the SOHO box
interpreted it correctly?  If the only feedback is designed for a human (i.e.
auditory), then interpreting those cues with Asterisk would be non-trivial.


 Do I undestand correctly that with this solution, I
 will still be able to connect to my analog Verizon
 phone line with the SIP phone? That is, the outside
 world will see my phone as an ordinary phone, when in
 fact I am using a SIP phone? If so, that means that
 Asterisk does all the magic behind the scene, right?


Yes, your Verizon POTS line would go into a FXO port in your server (which
in Asterisk would be referenced as the channel Zap/1 - zaptel being
Asterisk's TDM driver) and your SIP phone would connect via your standard
office network and be referenced as SIP/whateverusernameyouwant.

A very simplistic example of bridging a call would be:

[from-verizon]
exten = s,1,Dial(SIP/whateverusername)

Assuming that you'd configured zaptel to route calls that come in on the FXO
port to the Asterisk context named from-verizon, then any such calls would
immediately cause Asterisk to ring your SIP phone, and if answered to bridge
the two calls together.

A more complex example that makes them press one to call you and otherwise
lets them leave a message:

[from-verizon]
exten = s,1,Background(Press1ToTalkOr2ToLeaveAMessage)
exten = s,n,WaitExten(10)

; timeout
exten = t,1,Goto(vm,1)

; invalid
exten = i,1,Goto(vm,1)

; press 1
exten = 1,1,Dial(SIP/101,20)
exten = 1,n,Goto(vm,1)

; press 2
exten = 2,1,Goto(vm,1)

; all voicemail activity ends up here
exten = vm,1,VoiceMail(u101)
exten = vm,n,Hangup

[from-officephone]
exten = *98,1,VoiceMailMain
extne = *98,n,Hangup

Assuming you've now set up your SIP phone as extension 101, this would play
a sound file saying press 1 to talk to 2 to leave a message.  If they
press 1, your SIP phone rings.  If they press 2, they go to voicemail.  If
they wait 10 seconds without pressing anything, or press something other
than 1 or 2, they also go to voicemail.  If they press 1 to dial your phone
and you don't pick up after 20 seconds, they go to voicemail.

On your deskphone (could just as easily be a SIP softphone if you prefer),
you can dial *98 to log in and pick up your new voicemail messages.

Hope that demystifies some of what you're trying to do.

-- 
j.
___
--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] Recording calls after queues?

2007-08-02 Thread James FitzGibbon
On 8/2/07, Jay Moore [EMAIL PROTECTED] wrote:

 With my current setup, I record all incoming calls to my queues.  My
 problem is that once a call is transferred out of a queue, recording
 stops.  How can I make it so recording continues even after a call is
 transferred?

 If you need me to post any dialplan or conf logic, please ask.


Explicity invoke MixMontitor() in your dialplan before calling Queue()
instead of using monitor-format=whatever in queues.conf.  If you get to some
point where you want to stop the recording, call StopMixMonitor().

-- 
j.
___
--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] TE120P in Canada

2007-08-01 Thread James FitzGibbon
On 7/31/07, Klaverstyn, David C [EMAIL PROTECTED] wrote:

  span=1,1,0,ccs,hdb3,crc4

I was under the impression that ccs/hdb3 was more typical of E1 service than
T1.

I ran across this when looking up something on span syntax yesterday (from
http://www.voip-info.org/wiki/index.php?page=Zaptel.conf+span+syntax):

Framing= how to communicate with the hardware at the other end of the line.
For T1: Framing is one of *d4* or *esf*.
For E1: Framing in one of *cas* or *ccs*.

Coding= another parameter of the communication with the other end of line
hardware.
For T1: coding is one of *ami* or *b8zs*
For E1: coding is one of *ami* or *hdb3* (E1 may also need crc4)

I have NI-2 PRI service from Telus in Ontario, and my spans are set up as:

span=1,1,0,esf,b8zs

And my zapata.conf reads:

switchtype=national
signalling=pri_cpe

I don't have rxwink explicitly set to anything.  I'm not a digital trunk
expert by any means, but I thought the wink/flash/start time settings were
used on trunks that don't have a dedicated signaling channel the way PRI
does.

If you leave it as pri_net, you'll probably see messages to the effect that
I think I'm PRI_NET but so does the other end.

-- 
j.
___
--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] Hardware that can ring my phone?

2007-08-01 Thread James FitzGibbon
On 8/1/07, Linux Lover [EMAIL PROTECTED] wrote:

 But one thing that I forgot to mention is that my
 business is only in its beginning stage and I need to
 be as thrifty as possible. While $216 is a reasonable
 price, I was wondering whether my (currently very
 modest) goal can be achieved by spending much less
 (under $100). For example, what if I buy one of those
 el-cheapo PBX boxes and connect it to an Asterisk
 server?

 http://www.soho-pbx.com/sp-104.htm

 Do you think this could work for me or did I expose a
 gross misconception on my part?


This SOHO PBX box won't interop with Asterisk because it doesn't speak any
of the protocols that Asterisk does.  This box appears to be a solid-state
(and I'd assume very feature restricted) alternative to Asterisk.  That it
happens to have both FXO (to the Telco) and FXS (to the analog phone) ports
doesn't mean that it is usable as an analog interface for Asterisk.

Your best bet is to find your closest Asterisk user's group and see when
they're next doing a build seminar.  Most user groups do these a few times a
year and you might be able to find someone who will do one on demand.  You
bring some cheapo PC you might have lying around and buy a $20 FXO card and
build a simple answering machine using Asterisk. From there, it's easy to
extend so that when the user chooses a particular option in your IVR, the
call is bridged to a phone in your office.

The original single-FXO-port card from Digium was the X100P.  These aren't
sold anymore (the TDM400B modular card replaced it), but they can be found
on eBay for $10-$30.  If you can get your hands on one, you might consider
going with a cheap SIP phone instead of a analog phone for your business.
There isn't (as far as I know) a readily available cheap single-FXS-port
card.  If you go with an analog phone behind Asterisk, you'll need an FXS
port.  If you go with a SIP phone, you just need to have a network
connection from the phone to the server, which might be cheaper.  A quick
search on eBay shows a few Grandstream Budgetone 101 phones (certainly not
the best available, but they'll do the job) in the sub-$50 range.

-- 
j.
___
--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 on 64-bit?

2007-07-31 Thread James FitzGibbon
On 7/31/07, Benjamin Jacob [EMAIL PROTECTED] wrote:

 Searched all over, but couldn't find anything conclusive.
 Does an off-the-shelf version of Asterisk run without any issues on a
 64-bit machine?
 Does anyone have any 'conclusive' figures?


I've run 1.2.14 - 1.2.18 and 1.4.4 - 1.4.9 on CentOS 4.4 and 4.5 x86_64 with
no problems.

If your distro is one of those supported by http://www.atrpms.net/ then you
should be fine - they package zaptel and asterisk for x86_64.

If not, it works fine to build on your own, though some versions are a bit
finicky (IIRC, earlier versions of 1.2.x wouldn't look for libpri in
/usr/lib64, just in /usr/lib.  That resulted in a chan_zap module without
PRI support if you didn't modify the configure script.

1.4 doesn't seem to suffer from these problems, as they've revamped the
whole build system since 1.2.

-- 
j.
___
--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

[asterisk-users] Problems using TE412P and TDM400B in a IBM x3650

2007-07-31 Thread James FitzGibbon
Another day, another apparant unexplained hardware incompatibility.

I have a TE412P and a TDM400B living quite happily in a whitebox using an
Intel motherboard:

http://www.intel.com/design/servers/boards/se7230nh1-e/index.htm

I tried to move to an IBM x3650 system.  It uses a slightly newer chipset,
but apparantly it's in the same family.  The SE-7230 board has been EOL'd
and the suggested replacement uses the same chipset as the x3650.  I had to
get a PCI-X riser cage to put the cards into, as the server only supports
PCIe as shipped.

http://www-03.ibm.com/systems/x/rack/x3650/specs.html

When I just have the TE412P in the server, no problems.  If I put both the
TE412P and the TDM400B in, I get no end of errors.  When I put the TE412P in
the first PCI-X slot and the TDM400B in the second, then none of my PRI
channels will get out of red alarm - they go red as soon as I load zaptel,
and stay there through ztcfg, starting asterisk, restarting zaptel via the
Asterisk CLI, etc.

If I swap the cards, then only one of the ports (#4) stays in red alarm,
while the other 3 seem to be fine.

I checked /proc/interrupts, and both cards were getting their own interrupt
(forgot to save the output unfortunately, and I'm back on the original
hardware right now).

Has anyone run this type of hardware combo successfully, or had similar
problems on other hardware that they got around?

Thanks

-- 
j.
___
--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] Queues with logged in agents that are not reachable

2007-07-30 Thread James FitzGibbon
On 7/30/07, voiplist [EMAIL PROTECTED] wrote:

 I noticed that if I have an agent logged in using AgentCallBackLogin
 and that agent is unreachable for some reason (SIP phone unplugged)
 calls to him/her will completely yack.

 For example:

 1-Agent 500 is the only one logged into queue number 1.
 2-A call comes into queue number 1
 3-The call is pushed to agent 500 at extension 21 which is unreachable
 because the ethernet cable is unplugged to extension 21's handset.
 4-The caller gets hungup on entirely instead of the call going to
 another agent or leaving the caller in the queue

 I don't expect this to happen but I want to be sure all bases are
 covered on light days during shift changes etc.


This is either a problem with your dialplan or your  queue configuration.
If you always want your callers to enqueue regardless of agent status, make
sure that joinempty=yes and leavewhenempty=no in queues.conf for that
queue.  You may also want to add a

exten = whatever,n,NoOp(${QUEUESTATUS})

right after your call to Queue() to see why the calls are leaving the
dialplan.  I suspect that you've got one or the other of those settings not
set properly, so when there are no available agents, your calls exit the
Queue() application with $QUEUESTATUS set to JOINEMPTY or LEAVEEMPTY,
but you don't have anything in your dialplan following Queue(), so they run
off the end of the extension and * hangs up on them.

Note that there is a problem with 1.4.9 that breaks
joinempty=yes/leavewhenempty=no - there's a patch offered to my bug report (
http://bugs.digium.com/view.php?id=10320), but due to other strange
instability observed in 1.4.8 and 1.4.9, I'm back on 1.47.1, so I haven't
tested it yet.

-- 
j.
___
--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] Problems with new logic being 'n' option to Queue in 1.4.9

2007-07-27 Thread James FitzGibbon
On 7/27/07, James FitzGibbon [EMAIL PROTECTED] wrote:

 I'll go open a bug report.



http://bugs.digium.com/view.php?id=10320

For anyone who wants to track it.

-- 
j.
___
--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] Problems with new logic being 'n' option to Queue in 1.4.9

2007-07-27 Thread James FitzGibbon
On 7/26/07, James FitzGibbon [EMAIL PROTECTED] wrote:


 Is it possible for qe.parent-membercount to be set to zero in a queue
 where all agents but one are on the phone and that one remaining agent lets
 their phone ring without answering it?



I added some debug code to app_queue and ran a few tests.  The change in
app_queue in 1.4.9 breaks queues configured as joinempty=yes.

If there are no members in the queue, the membercount will be 0.  A queue
configured as joinempty=yes should still allow calls to be enqueued in this
case.  Because go_on is zero and membercount is zero and the comparison is
go_on = qe.parent-membercount, any calls that attempt to join a queue
without any members will immediately get kicked back to the dialplan.

-- Executing [EMAIL PROTECTED]:16] Queue(Zap/23-1, X|tW) in new
stack
-- Started music on hold, class 'default', on Zap/23-1
[Jul 27 07:49:27] WARNING[31209]: app_queue.c:3458 queue_exec: about to
compare X's go_on (0) = qe.parent-membercount (0)
-- Exiting on time-out cycle

Though I can't seem to lock onto the circumstances, I also oberved this
breaking queues configured as leavewhenempty=no.  I can't seem to
replicate it using a single queue and a single member (on pause or on a call
or letting their phone ring through), but as I described in my first
message, I did see the Exiting on time-out cycle message last night when I
had 4 people in the queue, all on a call, and one person didn't pick up
their phone.

Still, the joinwhenempty breakage should be enough to prompt a backout or
rapid fix for this.  Until recently, my dialplan didn't gracefully handle a
return from Queue() because all my queues were configured as joinempty=yes
and leavewhenempty=no.  Recently I added logic to kick users back to the
IVR if Queue returns for any reason, but had I not made that change,
1.4.9would have resulted in my callers getting unceremoniously hung up
on if they
tried to join a queue without agents.

I'll go open a bug report.

-- 
j.
___
--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] Problems with new logic being 'n' option to Queue in 1.4.9

2007-07-27 Thread James FitzGibbon
On 7/27/07, Mark Michelson [EMAIL PROTECTED] wrote:

 Could you submit this as an issue on the bugtracker? The 'n' option was
 mucked with just prior to the 1.4.9 release and so any problems
 experienced with it should be reported there so they can be fixed as
 quickly as possible.



It's been submitted; to clarify though the change made in 1.4.8 related to
the 'n' option doesn't seem to cause this.  1.4.8 (with or without the 'n'
option) does what I'd expect it to.  It's the logical overloading of go_on
in 1.4.9 that broke things.  go_on used to be a boolean - now it's a
dual-valued variable.  Sometimes it's compared just for it's truthfulness,
and sometimes it's used in a numeric comparison against the queues's
membercount.

If go_on had been left alone and a new variable used to store the threshold
to be compared against membercount, I don't think 1.4.9 would have broken
things, because go_on would (in my configuration) never have been set to
anything but zero, preventing the numeric comparison against membercount
from ever being performed.

-- 
j.
___
--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

[asterisk-users] Problems with new logic being 'n' option to Queue in 1.4.9

2007-07-26 Thread James FitzGibbon

I am experiencing a change in behaviour of my Queues in 1.4.9 vs 1.4.8.

I do not pass the 'n' option to any call to Queue() in my dialplan.  Yet
since I upgraded to 1.4.9, I have occasionally seen this on my console:

   -- Nobody picked up in 2 ms
   -- Exiting on time-out cycle

That log message Exiting on time-out cycle is exclusive to the logic in
app_queue meant to deal with the 'n' option.  If you don't pass 'n', you
should never see it.

1.4.8 code:

   /* exit after 'timeout' cycle if 'n' option
enabled */
   if (go_on) {
   if (option_verbose  2)
   ast_verbose(VERBOSE_PREFIX_3
Exiting on time-out cycle\n);
   ast_queue_log(args.queuename,
chan-uniqueid, NONE, EXITWITHTIMEOUT, %d, qe.pos);
   record_abandoned(qe);
   reason = QUEUE_TIMEOUT;
   res = 0;
   break;
   }

1.4.9 code:

   /* exit after 'timeout' cycle if 'n' option enabled
*/
   if (go_on = qe.parent-membercount) {
   if (option_verbose  2)
   ast_verbose(VERBOSE_PREFIX_3
Exiting on time-out cycle\n);
   ast_queue_log(args.queuename,
chan-uniqueid, NONE, EXITWITHTIMEOUT, %d, qe.pos);
   record_abandoned(qe);
   reason = QUEUE_TIMEOUT;
   res = 0;
   break;
   }

In both versions, the variable 'go_on' starts off set to 0, and only gets
set if you pass the 'n' option to Queue().  The manner in which it gets set
differs between 1.4.8 and 1.4.9, but it is only when you pass the 'n'
option, so it shouldn't matter.  In my configuration, go_on should always be
zero.

The logic check around go_on is what's worrying me.  In 1.4.8, go_on had one
of two values - 0 or 1.  If you never passed 'n' to Queue(), it was always
0, so the block of code that takes you back to the dialplan on timeout can
never be executed.

In 1.4.9, if qe.parent-membercount is zero and you didn't pass the 'n'
switch, then you'll exit the queue as if you had timed out, even though you
never passed the 'n' option.  I haven't gone through the entire code of
app_queue to see exactly how membercount gets manipulated, but it seems from
my log that these exitwithtimeouts events seem to occur right after an agent
has let their phone ring without picking it up (see the nobody picked up in
2ms message in my example above).

Is it possible for qe.parent-membercount to be set to zero in a queue where
all agents but one are on the phone and that one remaining agent lets their
phone ring without answering it?

--
j.
___
--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

[asterisk-users] vm-duration announcement missing?

2007-07-26 Thread James FitzGibbon

I just saw this on my console:

[Jul 26 11:36:30] WARNING[8667] file.c: File vm-duration does not exist in
any format
[Jul 26 11:36:30] WARNING[8667] file.c: Unable to open vm-duration (format
0x4 (ulaw)): No such file or directory

Thinking I might have lost a file during a fsck or something, I checked -
sure enough, there's no file vm-duration in any format.  I downloaded the
current (as of June 14th) core and extra sounds, but it's not in there
either.

1.2.x didn't use this file, but app_voicemail contains reference to it in
1.4.x - as far back as 1.4.0:

   if ((!res)  (durationm = minduration)) {
   res = wait_file2(chan, vms, vm-duration);

[snip stuff about polish syntax]

   res = ast_say_number(chan, durationm, AST_DIGIT_ANY,
chan-language, NULL);
   res = wait_file2(chan, vms, vm-minutes);
   }

Does anyone know where this file can be fetched from, or at least what it's
supposed to say?

Looking back at my logs, there are semi-regular instances of this error
message.  In a default setup, it's only used if the message is more than 2
minutes long, which I guess most of my user's VMs aren't.

Thanks

--
j.
___
--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] Wake-Up Call didn't work

2007-07-24 Thread James FitzGibbon

On 7/24/07, Asterisk guy [EMAIL PROTECTED] wrote:



 -- Attempting call on Local/[EMAIL PROTECTED] for application MusicOnHold()
(Retry 1)

Jul 24 08:23:17 NOTICE[21177]: chan_local.c:479 local_alloc: No such
extension/context [EMAIL PROTECTED] creating local channel

Jul 24 08:23:17 NOTICE[21177]: channel.c:2409 __ast_request_and_dial:
Unable to request channel Local/[EMAIL PROTECTED]


( but i have a extension 6009 login to * ) ,  what is the problem?



Regardless of what endpoints you may have registering to your *, your
dialplan does not allow that endpoint to be reached via extension 6009 in
the 'default' context.

Look at the file that gets put in outgoing (comment out the rename in the
AGI script so it stays in /tmp.  Then go read up on call files on the Wiki:

http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out

Calls generated by call files need to have a starting point and a
destination.  The starting point for stuff like this is typically a Local
channel, and the destination is either a context/extension/priority or an
application with arguments.  Either your starting point or your destination
is invalid.

IMO, skip the AGI for now.  Get the file that your AGI is writting to /tmp
and make a copy of it.  Modify the copy, then move it to the outgoing dir
and see what happens.  If it doesn't work, make more changes.  Without
seeing your dialplan or the callfile, we can't diagnose your problem, but
the error messages are pretty informative as to what asterisk was trying to
do.  Once you've successfully generated a call manually, then go back to
having your AGI try to generate them automatically.

--
j.
___
--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] MySQL components in asterisk-addons not being built

2007-07-24 Thread James FitzGibbon

On 7/24/07, hugolivude [EMAIL PROTECTED] wrote:


Thanks or all your help!

I've posted the ./configure output below.  I noticed that it says:

   checking for mysql_init in -lmysqlclient... no

Presumably that's a problem, but I don't know how to fix it!!  As I
mentioned, I have MySQL installed and it works fine.  rpm -qa
indicates:

   MySQL-server-5.0.22-0
   MySQL-devel-5.0.22-0
   MySQL-client-5.0.22-0

How do I get mysql_init set up properly, if indeed that is the source
of my problem?



Post the snippet of config.log that deals with mysql, as that will give more
detail as to why it's not finding mysql_init.  For example, mine has this:

configure:6161: checking for mysql_config
configure:6179: found /usr/bin/mysql_config
configure:6191: result: /usr/bin/mysql_config
configure:6223: checking for mysql_init in -lmysqlclient
configure:6258: gcc -o conftest -g -O2   conftest.c -lmysqlclient
-L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl
-lcrypto  5
configure:6264: $? = 0
configure:6282: result: yes

Yours will likely have several iterations of trying to find it, indicating
that the script is looking for the mysql libs in several directories and
then when it fails to find it, gives up.  Mine is only one iteration because
it was found in the first place the configure script looked.

Also, post the output of

rpm -ql MySQL-devel | grep client

and

rpm -ql MySQL-client | grep client

from the looks of the RPM package names, you aren't running the same distro
as me (CentOS), but I suspect that the problem is that your RPMs have stuck
the libraries in a non-standard place that the asterisk-addons configure
script doesn't know to look in.

Once you've figured out what that non-standard place is, it should be a
simple matter of passing --with-mysqlclient=PATH to ./configure to make it
look for your libs in their actual home.

--
j.
___
--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] Wake-Up Call didn't work

2007-07-23 Thread James FitzGibbon

On 7/23/07, Dovid B [EMAIL PROTECTED] wrote:

Can it be that asterisk does not have permission to copy the file over ?

Also check your date settings on the server.




Yes, it's interesting that the page intro includes the sentence Lots of
error checking to make sure its done correctly, but the final step that
makes the process work (ensuring that the callfile ends up in the directory
that pbx_spool is watching) doesn't have any error checking:

touch( $wakefile, $time_wakeup, $time_wakeup );

rename( $wakefile, $callfile );

The fact that you see files in /tmp when all is said and done means that at
least some of the script is working.  A few things to check:

Do the files in /tmp have the correct timestamp (file matches the requested
wakeup time)?  If so, then everything preceeding the rename seems to have
worked, so check if the user running the AGI can move files from /tmp to
/var/spool/asterisk/outgoing.  Though given that it's an AGI being run by *,
you'd have to have a pretty strange setup for that to fail.  Perhaps the
outgoing directory just doesn't exist (was never created for some reason?)

If the files don't have the correct timestamp, start following the logic
backwards.  Do they look complete?  Look through the AGI for places where
the wakeup file is written to (i.e. fputs( $wuc, maxretries:
$parm_maxretries\n);
) and check that everything that should be written is being written

Working backwards you should be able to figure out where the script is
failing, then you can check everything that comes afterwards as the user
running the AGI to make sure that permissions and directories are set up
properly.

--
j.
___
--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] priorityjumping not working, Dial goes to n+1 not n+101

2007-07-20 Thread James FitzGibbon

On 7/20/07, Eric ManxPower Wieling [EMAIL PROTECTED] wrote:


Did you read UPGRADE.txt?  Priority jumping was deprecated in 1.2.  I
assume it was removed from 1.4.



According to UPGRADE.txt, the default in the absence of priorityjumping=
changed from yes in 1.2 to no in 1.4:

* In previous Asterisk releases, many applications would jump to priority
n+101
 to indicate some kind of status or error condition.  This functionality
was
 marked deprecated in Asterisk 1.2.  An option to disable it was provided
with
 the default value set to 'on'.  The default value for the global priority
 jumping option is now 'off'.

But there is no indication that they removed the option to have
priorityjumping turned on globally.

--
j.
___
--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] Zaptel 1.2.19 and 1.4.4 released

2007-07-17 Thread James FitzGibbon

On 7/16/07, The Asterisk Development Team [EMAIL PROTECTED] wrote:


fix various known issues.  See the ChangeLog included in the releases
for a full list of changes.  The ChangeLogs are also available
separately on the ftp site.



Is there any more information available on this change?

2007-07-13 08:22 + [r2733-2736]  Tzafrir Cohen [EMAIL PROTECTED]




 * Fix a digit mapping bug with hardware dtmf detection (r4357)

I assume those revision numbers (4xxx) in the changelog are from another SVN
repo - I was trying to figure out what exactly had changed, but the large
number of files changed across 3 revs makes it a bit tough to isolate.

I'm fighting with a DTMF problem right now where directly dialed SIP-Zap
(PRI) calls produce doubled-up DTMF on the other side (not every digit, but
just one causes the remote IVR to go into fits).  The problem first appeared
when we moved from 1.2.x to * 1.4.4/Zaptel 1.4.3.  I haven't had much time
to investigate - it happens whether the SIP agent connected to * is using
inband, rfc2833 or info and across Grandstream, Aastra and Polycom units.

Interestingly, if I send the SIP phone into DISA() pointing at it's own
context, I get no DTMF problems on the remote side.

Thanks

--
j.
___
--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] Cisco 7940 log on/off

2007-07-17 Thread James FitzGibbon

On 7/16/07, Adrian Marsh [EMAIL PROTECTED] wrote:


Anyone know if theres a way to share a Cisco 7940 between hot-desk
users?

My phones get their setup via SIP .cnf files, that load at boot via
tftp, so I'm assuming the configs a failry static. However if I want a
phone to be hot-desked, I could have different users sitting there.  Is
there any concept of logging on in these environments?



You can set up single-person queues that you can use like extensions.  The
deskphone itself would still have to be addressable as SIP/something, and
the outbound context will be the same regardless of who is logged in (unless
you want to get fancy and store who is logged in in ASTdb then fork to the
proper outbound context using Goto in the shared context for the peer), but
it works.

Here's my queues.conf for a single-person queue:

[queuename]
strategy=rrmemory
servicelevel=60
timeout=20
retry=5
wrapuptime=0
maxlen=1
announce-frequency=0
announce-holdtime=no
joinempty=strict
leavewhenempty=strict
reportholdtime=no
monitor-format=wav
ringinuse=no

And the dialplan to enqueue:

--START--
[somecontext]
exten = ###,n,Macro(singlequeue,queuename,###)

[macro-singlequeue]
; No-op to give us a 1 priority
exten   = s,1,NoOp

; if DIAL_ANNOUNCE is set, play the please hold on while I... msg
exten   = s,n,GotoIf($[${DIAL_ANNOUNCE} != 1]?check_clid_set)
exten   = s,n,Playback(transfer)

; Set CLID Name if specified
exten   = s,n(check_clid_set),GotoIf(${ISNULL(${CLID_NAME})}?enqueue)
exten   = s,n,Set(CALLERID(name)=${CLID_NAME})

; Enqueue the caller
exten   = s,n(enqueue),Queue(${ARG1}|nrtW|||20)

; Jump based on status - TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY |
JOINUNAVAIL |
LEAVEUNAVAIL
exten   = s,n(branch),Goto(s-${QUEUESTATUS},1)

; If unavailable, send to voicemail w/ unavail announce
exten   = s-TIMEOUT,1(vmu),Voicemail(${ARG2}|uj)
exten   = s-TIMEOUT,n,Hangup

exten   = s-TIMEOUT,vmu+101,Playback(vm-theperson)
exten   = s-TIMEOUT,n,SayDigits(${ARG2})
exten   = s-TIMEOUT,n,Playback(vm-isunavail)
exten   = s-TIMEOUT,n,Hangup

; If busy, send to voicemail w/ busy announce
exten   = s-FULL,1(vmb),Voicemail(${ARG2}|bj)
exten   = s-FULL,n,Hangup

exten   = s-FULL,vmb+101,Playback(vm-theperson)
exten   = s-FULL,n,SayDigits(${ARG2})
exten   = s-FULL,n,Playback(vm-isunavail)
exten   = s-FULL,n,Hangup

; Treat the empty, unavail as full
exten   = s-JOINEMPTY,1,Goto(s-FULL,1)
exten   = s-LEAVEEMPTY,1,Goto(s-FULL,1)
exten   = s-JOINUNAVAIL,1,Goto(s-FULL,1)
exten   = s-LEAVEUNAVAIL,1,Goto(s-FULL,1)

; Treat anything else as timeout
exten   = _s-.,1,Goto(s-NOANSWER,1)

; if people star out of voicemail, send them to the top-level admin IVR
exten   = a,1,GotoIf(${ISNULL(${IVR_CONTEXT})}?setivrcontext:gotoivr)
exten   = a,n(setivrcontext),Set(IVR_CONTEXT=ivr-admin)
exten   = a,n(gotoivr),Goto(${IVR_CONTEXT},s,1)

; If they hit 0 from VoiceMail to dial the operator,
; after 20 seconds they go back to the top of the named context
exten   = o,1,Macro(operator)

exten   = h,1,Macro(loghangupcause)
---END---

There's some extra cruft in there you could easily cut out to suit your
environment.  Using that macro in the same way I would normally use Dial,
the experience for both the caller and agent is pretty much the same.   You
need to have 1.4.7 so that if the agent hits ignore or reject the call
immediately exits Queue() - there was a bug surrounding the 'n' option in
1.4.6 and earlier.  If you don't have that version, then hitting ignore or
reject will send the call back to the phone after 'retry' seconds until the
timeout runs out (in my case 20 seconds).

All you then need is some dialplan sugar to invoke AddQueueMember and
RemoveQueueMember in response to logon and logoff actions by the agent.  If
you're not worried about authenticating the users, you can just do something
like:

exten =
_7000XXX,1,AddQueueMember(singlequeue_${EXTEN:4},${CUT(CHANNEL,,1)},,,${CUT(CHANNEL,,1)})
exten =
_7001XXX,1,RemoveQueueMember(singlequeue_${EXTEN:4},${CUT(CHANNEL,,1)},,,${CUT(CHANNEL,,1)})

Then agent 123 can log in by dialing extension 7000123 and log off by
dialing extension 7001123.  If you attempt to enqueue the caller to the
queue when there's nobody logged in, then you'll immediately get kicked to
your dialplan with ${QUEUESTATUS} set appropriately.  This may or may not be
what you want, because it means that callers will go directly to voicemail
if the person they're calling isn't logged in.

HTH

--
j.
___
--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] Channel name in queue log replaced by a manager event?

2007-07-13 Thread James FitzGibbon

On 7/12/07, Jared Smith [EMAIL PROTECTED] wrote:


It probably wouldn't hurt to open a bug for this... I've seen something
like this before, only it was manager events ending up inside of SIP
traffic.  It definitely sounds like a pointer problem or maybe a locking
problem to me... which means it's probably going to be difficult to
track down.




Filed as 10199, with a bit more info about the queue config and dialplan
being used to enqueue callers.

Thanks

--
j.
___
--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] Queues monitoring software

2007-07-12 Thread James FitzGibbon

On 7/12/07, Stefan Reuter [EMAIL PROTECTED] wrote:


You might want to have a look at QueueMetrics:
http://queuemetrics.loway.it/

I am not sure if it supports all features you are looking for but it
should be a good start.



QueueMetrics is working well for me in a 75 seat call center, but it won't
do everything you ask for.

- It doesn't have an interface to let you manage your Asterisk Configuration
(though it can pull info from your Asterisk configuration apparantly - I
opted to set things up manually)

- it has a realtime view that uses the Manager API, but this is to show
queue status, not other aspects of your * operation (like Zap status)

Other than that, it's relatively easy to set up.  A tad annoying if your *
and QM live on different boxes, and I regularly lament the inability to
modify the output much (all of the calculations and most of the output are
tied up in compiled Java classes), but it took care of 80% or so of my
reporting needs in a few days when the alternative was to roll my own
reporting system.

A combination of QM plus some homegrown stuff, or maybe QM plus one of the
other Asterisk Management web portals might do the trick for you.

--
j.
___
--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] Channel name in queue log replaced by a manager event?

2007-07-12 Thread James FitzGibbon

On 7/6/07, James FitzGibbon [EMAIL PROTECTED] wrote:


Under 1.4.5 and 1.4.6, I've seen a few instances where the channel name in
queue log entries is replaced by a snippet of a manager event:



Nobody else seeing this?  I'm at a loss - it's only one queue now that I go
and look at the history, but that queue is not configured differently from
any other queue in the system.  I've since moved from 1.4.6 to 1.4.7.1 and
it's still happening.

Should I just open a bugreport without any reliable way to reproduce the
bug?

--
j.
___
--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] Monitor events?

2007-07-09 Thread James FitzGibbon

On 7/9/07, Daniel Gradecak [EMAIL PROTECTED] wrote:


are you sure the monitor is started and sotoped via the dialplan ?




If you're using Monitor() or MixMonitor(), then just add a UserEvent() call
just before it in the dialplan.

If you're doing monitoring of queues, it's a bit trickier - you have to
watch for Join events to see what calls are being enqueued, then when you
see a Link event for that call, you can assume (based on local policy) that
the monitoring has started (assuming there was no Leave event in the
meantime - the logic in your AMI client has to match the logic in your
dialplan that deals with queues obviously)

If you're talking about automon, there's no support for that, but a cursory
examination of the code doesn't show any reason why it couldn't be added.
Look at builtin_automonitor() in res_features.c.

--
j.
___
--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

[asterisk-users] Channel name in queue log replaced by a manager event?

2007-07-06 Thread James FitzGibbon

Under 1.4.5 and 1.4.6, I've seen a few instances where the channel name in
queue log entries is replaced by a snippet of a manager event:

--START--
1183582823|1183582823.104763|queuename|SIP/|REMOVEMEMBER|
1183582828|1183582793.104744|queuename|
Context: macro-dialout
Extension: s
Priority: 3
Application: GotoIf
AppData: 0?blockclid
Uniqueid: 1183582822.104759

|CONNECT|12|1183582816.104754
1183582833|1183582485.104605|queuename|SIP/|AGENTATTEMPT|
---END---

--START--
1183762515|1183762515.18034|queuename|SIP/|REMOVEMEMBER|
1183762518|1183762485.18025|queuename|
Context: from-somecontext
Extension: 
Priority: 6
Application: Hangup
AppData:
Uniqueid: 1183762515.18034

|CONNECT|5|1183762513.18033
---END---

--START--
1183762659|1183762631.18061|queuename|NONE|EXITWITHTIMEOUT|1
1183762661|1183762485.18025|queuename|: macro-singlequeue
Extension: s-TIMEOUT
Priority: 1
Application: VoiceMail
AppData: XX|uj
Uniqueid: 1183762631.18061

|COMPLETEAGENT|5|143|1
1183762665|1183762211.17926|queuename|SIP/|RINGNOANSWER|2
---END---

Because the text snippet that replaces the channel name always contains
newlines, this makes my queue stats program (QueueMetrics) go crazy.  The
first part of the line is incomplete, and the second is invalid.  If the
CONNECT event is what gets lost, then the display shows the call as waiting
in queue forever.  In every case, it's been the channel name that gets
replaced, no other field in the queue log lines.

I'm assuming it's some pointer badness going on, but I'm not sure what I'll
be able to provide beyond this and a basic config snippet to help track it
down - I can't reproduce it on demand, and replicating the conditions under
which I've observed it requires four PRIs worth of traffic.

It does seem that once a given call has it's channel name pointer corrupted,
it remains corrupted until the end of the call - I've never seen a
ENTERQUEUE with a proper channel name followed by a corrupted CONNECT then a
good COMPLETECALLER.  So far, the corruption has first appeared when the
CONNECT event is logged.


Any thoughts, or should I just replicate what I've got into the bugtracker?

Thanks

--
j.
___
--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

[asterisk-users] Missing TRANSFER event in queue log when using Local Channels

2007-07-05 Thread James FitzGibbon

Has anyone observed a problem where using Local channels with AddQueueMember
results in missing TRANSFER events?

Right now I'm using straight SIP channels when I call AddQueueMember().  I'm
contemplating moving to Local channels because the non-state-based
wrapuptime blows when you have a channel in multiple queues (they can hang
up and get a call immediately so long as it's from a different queue).  My
grand plan is to use the 'h' extension in the context where app_queue calls
my agents to invoke PauseQueueMember instead.

The problem is with the /n suffix to the channel name.  With it, I lose
TRANSFER events.  Without it, the 'h' extension gets invoked as soon as the
call is bridged to the agent.

My agent context looks like this:

[agents]
exten = 491,1,Dial(SIP/491,20)
exten = h,1,PauseQueueMember(|${CUT(CHANNEL,,1)})

When I do something along the lines of:

AddQueueMember(queuename,Local/[EMAIL PROTECTED])

Then as soon as the call is bridged, my 'h' extension gets run:

   -- Executing [EMAIL PROTECTED]:1] Dial(Local/[EMAIL PROTECTED],2, 
SIP/491)
in new stack
   -- Called 491
   -- SIP/491-00aa22d0 is ringing
   -- Local/[EMAIL PROTECTED],1 is ringing
   -- SIP/491-00aa22d0 answered Local/[EMAIL PROTECTED],2
   -- Local/[EMAIL PROTECTED],1 answered SIP/427-9d849a90
 == Spawn extension (agents, 491, 1) exited non-zero on '
Local/[EMAIL PROTECTED],2'
   -- Executing [EMAIL PROTECTED]:1] PauseQueueMember(Local/[EMAIL 
PROTECTED],2,
|Local/[EMAIL PROTECTED]) in new stack
   -- Stopped music on hold on SIP/427-9d849a90

Once the call is bridged, I transfer to  from the agent softphone.  This
is what queue log looks like for this type of call:

1183671934|1183671934.5745|emerg_nccc_ld_ts|NONE|ENTERQUEUE||427
1183671937|NONE|NONE|Local/[EMAIL PROTECTED]/n|PAUSEALL|
1183671940|1183671934.5745|emerg_nccc_ld_ts|Local/[EMAIL PROTECTED]
|CONNECT|6|1183671934.5746
1183672005|1183671934.5745|emerg_nccc_ld_ts|Local/[EMAIL PROTECTED]
|TRANSFER||from-somecontext|6|65

If I use /n when adding the channel to the queue:

AddQueueMember(queuename,Local/[EMAIL PROTECTED]/n)

Then my 'h' extension is not executed until the bridged call is actually
over.  I do the same transfer, but it doesn't show up in the queue log - the
call appears to have been terminated by the caller.

1183672119|1183672119.5839|emerg_nccc_ld_ts|NONE|ENTERQUEUE||427
1183672124|1183672119.5839|emerg_nccc_ld_ts|Local/[EMAIL PROTECTED]
/n|CONNECT|5|1183672119.5840
1183672135|1183672119.5839|emerg_nccc_ld_ts|Local/[EMAIL PROTECTED]
/n|COMPLETECALLER|5|11|1

Any ideas?  I need the Pause-on-agent-hangup behaviour (or something like
it, short of adding proper wrapup state to app_queue), but I can't lose
visibility of my transfers (especially not after I just introduced the sales
people to them after never having visibility of this stat on a Nortel BCM)

Much appreciated.

--
j.
___
--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

[asterisk-users] TE412 / HPDL380G5 / * 1.4 / CentOS 4.5 Experience

2007-06-26 Thread James FitzGibbon

Has anyone successfully run * 1.4 with the following configuration (or
something very similar)?

HP DL380 G5 (3Ghz Xeon)
CentOS 4.5 (kernel 2.6.9-55)
Asterisk 1.4.5 (or 1.4.4)
Zaptel 1.4.3 (or 1.4.2.1)
TE412P
TDM400B (2x FXO and 2x FXS modules)

I've had this rig running * 1.2.18 with Zaptel 1.2.17.1 for several months
without any issues.  Upon trying to upgrade to * 1.4.4 and Zaptel 1.4.2.1 a
few weeks ago, I saw several kernel panics, easily reproduceable with a load
test suite that bridged calls from the PSTN to SIP desk phones.  The one
time I exposed it to real world traffic (a small office, 30 extensions), I
saw five panics in the space of three hours.

Interestingly, when the load test only walked through the IVR and queues, I
couldn't get it to panic, even if I filled the TE412P and had 90
simultaneous calls going through the system.  Only bridged calls seem to
cause problems.

The panics didn't seem to follow any particular pattern.  I saw NMI traps a
few times, then failures in the wct4xxx interrupt handler, a few swap
tainted errors, etc.

To rule out an interaction between the TE412P and the HP motherboard, I
moved the installation to an Intel server board (model SE7320) with a 3 Ghz
Pentium D.  The hard drive was a direct clone from the HP.  Running the same
load test against 1.4.4/1.4.2.1 - no panics.  Running the load test against
1.4.5/1.4.3 - no panics.  I'm now nearly 6 hours into having the system
exposed to real-world traffic - no panics.

At this point, I'm pretty much ready to just put this Intel board into a
rackmount server and be done with it, but I am interested to see if anyone
else has seen similar problems, or if anyone has run this configuration
without any problems.  Part of me is saying I can't be the only person to
run * 1.4 on a current HP server, which in turn leads me to wonder if this
is an incompatibility with the specific board I have, or if I've got a
faulty server (though I have run the full HP diagnostic suite several
times).

Thanks for any feedback you can provide.

--
j.
___
--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] Inexpensive Layer 3 Switch?

2007-06-25 Thread James FitzGibbon

On 6/26/07, Marty Mastera [EMAIL PROTECTED] wrote:


 Any recommendations on an economical layer 3 switch?  Preferably
something that you have hands on experience with connecting to IP phones
with attached PCs? Specifically I need the ability to set the VLAN in the
phone to tag voice packets and to set a native VLAN on a per port basis on
the switch to put the untagged packets from the attached PC into a separate
VLAN.



POE is not a requirement but if you have suggestions for an economical
layer 3 switch with POE I'd be glad to hear them…so far I'm looking at the
SFE2000 from Linksys.



I'm using a SFE2000 with PoE with Asterisk.  Besides * and my management box
(MySQL, ARI, Queuemetrics, etc.), I have the 10 desk phones that I need PoE
for plugged into it, a mix of GXP2000, Linksys SPA941 and a couple of Aastra
480i and 9133i units.  One of the things that sold me on it was that it can
do 185W across all ports; you're not stuck giving 7W or 15W to each port
(which was a problem with many models I looked at and limits you to only 12
of 24 ports getting power).  I'm told the Grandsteams pull about 4W, and
since that's the phone with the widest deployment, I expect to be able to
drive 24 per switch eventually.

So far I've had no problems with it, though I'm not using it's layer 3
functionality.  I trunk two VLANs to a Baystack layer 3 switch, which was
pretty simple to set up and has worked properly ever since.  My setup
doesn't have both tagged and untagged packets coming into the same port, so
I can't speak to that.  The configuration certainly seems to support it, and
I suspect that the default admit all / no ingress filter combined with the
fact that every port has to have a PVID assigned means that it would work
pretty much out of the box after you configure your VLAN numbers.

The UI interface needs some improvement.  It's not quite sure if it's a
linksys or a cisco right now.  You can make all the configuration via a Web
GUI as you would with a typical Linksys SOHO router, but if you don't go to
Admin - File Management - Copy Files and choose to copy running-config
to startup-config (using drop-down boxes, naturally), it loses all your
changes on reboot.  :)

If you have other questions, feel free to contact me off-list.

--
j.
___
--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] CNAM.

2007-06-19 Thread James FitzGibbon

On 6/17/07, Nick Seraphin [EMAIL PROTECTED] wrote:




Yes... 1.5 cents per dip...  you prepay the fees... and they deduct from
the prepaid amount.  You can start with $5.00 which seems like a low-risk
to check it out at least.

The CLEC I use is more expensive that that for CNAM, and they want to do
it on EVERY incoming call, even wrong numbers, whether it's answered or
not, per PRI.  So since I get several thousand wrong numbers a month, and
only 100 or so calls that I actually CARE what the CNAM is on those calls,
I can set it up in Asterisk to only do the dip for certain DNIS numbers.

I calculated that instead of $70+/month this will cost me $1.50/month.
Nice savings. :-)

I just hope it's reliable when the call volume picks up more.



I gave this a shot yesterday.  I figure I can stand to lose $5 if it sucks.
Which for someone in Canada, it does.  Granted, their website is somewhat
hazy on whether or not they support Canadian CNAM - part of the page says
can I look up numbers outside the US and Canada while part says outside
the US, then the body says we don't support non-NANPA numbers.  Pretty
much every number I have tried to look up so far for Toronto/GTA just gives
me back the city for the name, so I get a bunch of NORTH YORK ON and
TORONTO ON or CELLPHONE ON results back, but no actual names.

I've gotten a few correct hits back on company numbers, but just as many
wrong ones.  The Hilton in Edmonton's number comes back as GTCO CALCOMP,
and a company I deal with in Mississauga (in the 905 NPA) comes back as
ETOBICOKE ON (which is in 416).

On the upside, it did find PIZZA PIZZA correctly.  /sigh

Of course, this is all via their web portal.  I am completely unable to
connect via their AGI port as provided in their sample configuration
page.  I get connection refused, which under a stock 1.2 Asterisk drops the
call, so I can't leave the dialplan logic intact in the hopes that this is a
transient error.  Attempts to telnet to the port given via their portal are
met with an immediate RST packet, suggesting that their fastagi service is
down.

At least the cost to play was cheap.  IMO, it's not ready for production
usage (at least under 1.2 - under 1.4 you can recover from a failure to
connect to an AGI service and continue dialplan execution)

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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

Re: [asterisk-users] Re: Kernel Panic in wct4xxp during unload on Zaptel-1.4.4

2007-05-24 Thread James FitzGibbon

On 5/22/07, Axel Thimm [EMAIL PROTECTED] wrote:


Have you tried using the 1.4.x atrpms packages?




I  did try the 1.4 packages from atrpms overnight yesterday, with similar
results.  I was able to address the kernel panic when unloading by
commenting out ztcfg -s in the stop() function of the init script (based
on suggestions on this list).

The system appeared stable (went through several clean startup/shutdown
cycles), but then proceeded to kernel panic four times in three hours when
calls were being processed, forcing me to downgrade to 1.2 again.

Unfortunately, I was remote and unable to capture the full kernel panic
details, so I'm kind of stuck at square one until I can upgrade again during
a maint window and attempt to force a panic during call processing.

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] Kernel Panic in wct4xxp during unload on Zaptel-1.4.4

2007-05-22 Thread James FitzGibbon

I attempted an upgrade of our production system from Asterisk/Zaptel 1.2 to
1.4 this weekend.  Intially everything looked like it was working properly,
but some time in the day following the upgrade, the system died to a kernel
panic.  I wasn't able to catch the entire kernel dump on the console
unfortunately.

I attempted to isolate the panic, and found that when 'service zaptel stop'
was run (specifically, when wct4xxp was unloaded) I get this panic
consistently:

5 Not prepped yet! (repeated approx 250 times)
5 Freed a Wildcard
5 Not prepped yet! (repeated approx 550 times)
5 Stopped TE4XXP, Turned off DMA
5 Not prepped yet! (repeated approx 11000 times)
5 Unable to handle kernel paging request at ff034010 RIP:
5 a0163207{:wct4xxp:t4_interrupt_gen2+63}
5 PML4 4ea063 PGD 1388067 PMD 1389067 PTE 0
5 Oops:  [1] SMP
5 CPU 1
5 Modules linked in: zttranscode(U) wct4xxp(U) zaptel(U) crc_ccitt
netconsole md5 ipv6 dm_mirror dm_mod button battery ac joydev ehci_hcd
uhci_hcd hw_random bnx2 ext3 jbd
cciss sd_mod scsi_mod
5 Pid: 11053, comm: hotplug Not tainted 2.6.9-42.0.8.ELsmp
5 RIP: 0010:[a0163207]
a0163207{:wct4xxp:t4_interrupt_gen2+63}
5 RSP: :0100013ebdb0  EFLAGS: 00010046
5 RAX: ff034000 RBX: 010073478724 RCX: 0002
5 RDX: 010073478680 RSI: 0002 RDI: 010073478724
5 RBP: 010073478680 R08: 0008 R09: 
5 R10:  R11: 0002 R12: 00d1
5 R13: 0100013ebec8 R14: 0100013ebec8 R15: 010075e94978
5 FS:  002a955643e0() GS:804e5900()
knlGS:
5 CS:  0010 DS:  ES:  CR0: 8005003b
5 CR2: ff034010 CR3: 013d8000 CR4: 06e0
5 Process hotplug (pid: 11053, threadinfo 01007413c000, task
01007c445030)
5 Stack: 00d1 01007413dc98 80138552
0038
50100013ebea8 0100013ebde8 0001
00d1
50012 010073478680
5 Call Trace:IRQ 80138552{printk+141}
80112f4a{handle_IRQ_event+41}
5801131c4{do_IRQ+197}
80110833{ret_from_intr+0}
58013c731{__do_softirq+77}
8013c7e5{do_softirq+49}
580110bf5{apic_timer_interrupt+133}  EOI
8011c21a{flush_tlb_page+44}
580169106{do_wp_page+1127}
80123ed3{do_page_fault+575}
580169ff2{handle_mm_fault+1228}
80123e9a{do_page_fault+518}
58011026a{system_call+126}
80132bc6{schedule_tail+202}
580110d91{error_exit+0}
5
5 Code: 8b 40 10 89 44 24 58 e8 3d 80 1a e0 31 c0 f6 44 24 58 07 0f
5 RIP a0163207{:wct4xxp:t4_interrupt_gen2+63} RSP
0100013ebdb0
5 CR2: ff034010
5  0Kernel panic - not syncing: Oops
5  Badness in panic at kernel/panic.c:118
5
5 Call Trace:IRQ 80137a8a{panic+527}
80110bf5{apic_timer_interrupt+133}
580111aec{oops_end+38} 80111b07{oops_end+65}
580124148{do_page_fault+1204}
a0078f51{:bnx2:bnx2_start_xmit+470}
5802bb4cd{netpoll_send_skb+257}
80110d91{error_exit+0}
5a0163207{:wct4xxp:t4_interrupt_gen2+63}
80138552{printk+141}
580112f4a{handle_IRQ_event+41}
801131c4{do_IRQ+197}
580110833{ret_from_intr+0}
8013c731{__do_softirq+77}
58013c7e5{do_softirq+49}
80110bf5{apic_timer_interrupt+133}
5 EOI 8011c21a{flush_tlb_page+44}
80169106{do_wp_page+1127}
580123ed3{do_page_fault+575}
80169ff2{handle_mm_fault+1228}
580123e9a{do_page_fault+518}
8011026a{system_call+126}
580132bc6{schedule_tail+202}
80110d91{error_exit+0}
5
5 Badness in i8042_panic_blink at drivers/input/serio/i8042.c:987
5
5 Call Trace:IRQ 8024219b{i8042_panic_blink+238}
80137a38{panic+445}
580110bf5{apic_timer_interrupt+133}
80111aec{oops_end+38}
580111b07{oops_end+65}
80124148{do_page_fault+1204}
5a0078f51{:bnx2:bnx2_start_xmit+470}
802bb4cd{netpoll_send_skb+257}
580110d91{error_exit+0}
a0163207{:wct4xxp:t4_interrupt_gen2+63}
580138552{printk+141}
80112f4a{handle_IRQ_event+41}
5801131c4{do_IRQ+197}
80110833{ret_from_intr+0}
58013c731{__do_softirq+77}
8013c7e5{do_softirq+49}
580110bf5{apic_timer_interrupt+133}  EOI
8011c21a{flush_tlb_page+44}
580169106{do_wp_page+1127}
80123ed3{do_page_fault+575}
580169ff2{handle_mm_fault+1228}
80123e9a{do_page_fault+518}
58011026a{system_call+126}
80132bc6{schedule_tail+202}
580110d91{error_exit+0}
5 Badness in 

Re: [asterisk-users] `PATH_MAX' undeclared here (not in a function) in asterisk!

2007-05-15 Thread James FitzGibbon

On 5/15/07, lizhong zhu [EMAIL PROTECTED] wrote:


I compiled asterisk under arm-linux. i am using asterisk 1.4.2. i can run
./configure and menuselect with embedded modules. but running make comes out
errors:
ranlib libmxml.a
[...[


/usr/src/asterisk-1.4.2/include/asterisk/paths.h:23: `PATH_MAX' undeclared

here (not in a function)
[...]




PATH_MAX on the Linux systems I have comes from /usr/include/linux/limits.h,
which gets pulled in by a few headers, sys/param.h being the most used one.

In my 1.4.4 source tree, this gets pulled in via autoconf, which has this
snippet in it's output file include/asterisk/autoconfig.h

/* Define to 1 if you have the sys/param.h header file. */
#define HAVE_SYS_PARAM_H 1

Check that you indeed have all your headers installed.  If PATH_MAX is in an
include file, but not one that gets pulled in by including sys/param.h, then
the configure script might need to be updated - best to open a bug and
attach your config.log as well as the basic info about your system.

I suspect that you're just missing the kernel-headers rpm (or equiv for your
Linux flavor).  That's where I get my linux/limits.h from:

[EMAIL PROTECTED] asterisk-1.4.4]# rpm -q --whatprovides
/usr/include/linux/limits.h
kernel-headers-2.6.18-8.1.3.el5
[EMAIL PROTECTED] asterisk-1.4.4]#

Many default installs do not include the kernel headers - you either have to
choose a kernel development package bundle at install time or install them
manually after the fact.

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Log CODECS in CDR's

2007-05-11 Thread James FitzGibbon

On 5/11/07, Morgan Gilroy [EMAIL PROTECTED] wrote:


At the moment to find the codecs used I have to look though the sip
trace or show channels/show channel (annoying when you have 50+
channels).
Im just trying to find an easier and quicker way to keep track of the
codecs used to help with debug etc.

The closest variable iv found is, ${SIP_CODEC} Set the SIP codec for a
call
Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me
setting it though I don't think it will.

Iv looked all over and I cant find anything so it looks like I may have
to hack a ast_set_var into app_dial or chan_sip




1.4 has the CHANNEL function:

pbxlab-01*CLI show function CHANNEL
pbxlab-01*CLI
 -= Info about function 'CHANNEL' =-

[Syntax]
CHANNEL(item)

[Synopsis]
Gets/sets various pieces of information about the channel.

[Description]
Gets/set various pieces of information about the channel.
Standard items (provided by all channel technologies) are:
R/O audioreadformatformat currently being read
R/O audionativeformat  format used natively for audio
R/O audiowriteformat   format currently being written
R/W callgroup  call groups for call pickup
R/O channeltypetechnology used for channel
R/W language   language for sounds played
R/W musicclass class (from musiconhold.conf) for hold music
R/W rxgain set rxgain level on channel drivers that support
it
R/O state  state for channel
R/W tonezone   zone for indications played
R/W txgain set txgain level on channel drivers that support
it
R/O videonativeformat  format used natively for video

When I put this in a dialplan with NoOps and called channel macros, I can
kind of get what you're describing:

[from-external-pbxtel]
exten   = 491,1,NoOp(${CHANNEL(audioreadformat)})
exten   = 491,n,NoOp(${CHANNEL(audiowriteformat)})
exten   = 491,n,NoOp(${CHANNEL(audionativeformat)})
exten   = 491,n,Dial(SIP/491,20,M(logcodec))
exten   = 491,n,Hangup

[macro-logcodec]
exten = s,1,NoOp(${CHANNEL(audioreadformat)})
exten = s,n,NoOp(${CHANNEL(audiowriteformat)})
exten = s,n,NoOp(${CHANNEL(audionativeformat)})

Console output is:

   -- Executing [EMAIL PROTECTED]:1] NoOp(IAX2/pbxtel-01-5,
ulaw) in new stack
   -- Executing [EMAIL PROTECTED]:2] NoOp(IAX2/pbxtel-01-5,
ulaw) in new stack
   -- Executing [EMAIL PROTECTED]:3] NoOp(IAX2/pbxtel-01-5,
ulaw) in new stack
   -- Executing [EMAIL PROTECTED]:4] Dial(IAX2/pbxtel-01-5,
SIP/491|20|M(logcodec)) in new stack
   -- Called 491
   -- SIP/491-0a16d1c0 is ringing
   -- SIP/491-0a16d1c0 answered IAX2/pbxtel-01-5
   -- Executing [EMAIL PROTECTED]:1] NoOp(SIP/491-0a16d1c0, slin) in
new stack
   -- Executing [EMAIL PROTECTED]:2] NoOp(SIP/491-0a16d1c0, slin) in
new stack
   -- Executing [EMAIL PROTECTED]:3] NoOp(SIP/491-0a16d1c0, gsm) in new
stack
 == Spawn extension (from-external-pbxtel, 491, 4) exited non-zero on
'IAX2/pbxtel-01-5'
   -- Hungup 'IAX2/pbxtel-01-5'

This is a call coming in as ulaw over IAX2, then going to a SIP softphone
configured for only gsm.

Hope that helps.

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Sound files

2007-05-08 Thread James FitzGibbon

On 5/8/07, Pedro Silva [EMAIL PROTECTED] wrote:


Can i identify the sound files that are played in the asterisk
console? I defined the verbose to 100 but i can not see the sound
files that are played in some situations... :(
For example, I need to know what files are played for the message:
Extension xxx is unavailable
The goal is to translate that to Portuguese (pt_pt)...



Try this page:

http://www.nathanpralle.com/software/ast_masterlist.html

Not 100% up to date, but it covers most of the prompts I'd had to look up.

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Display Caller ID of called party

2007-05-01 Thread James FitzGibbon

On 5/1/07, Savoy, Kevin - Williston, ND [EMAIL PROTECTED] wrote:


 Not sure if this can be done or not, but I can't seem to find it anywhere
on the Wiki. When dialing interoffice with Asterisk 1.4.2, I would like to
have the caller id of the person I am dialing displayed and not the number I
just dialed. Is this possible? So, if extension 4023 is John Doe, and I dial
4023, my display should read John Doe and not 4023. I am using a Polycom 501
by the way in case that matters.



On a Grandstream GXP-2000, this happens when the dialed number is in the XML
phonebook that the phone sucks down from my provisioning server.  It might
work the same on the Polycom units.  Of course, you need to have some
process in place to keep the phonebook file up to date.

To do it in a generic way where the name is looked up by * and sent back to
your phone for display as part of the 100 Trying or 180 Ringing responses,
is an entirely different matter.  I suspect that the end-user experience
would vary wildly based on the equipment each user was using.  If this is
possible, I'm sure people more knowledgeable than me will chirp in.

The phonebook route might be the quickest bang for your buck though.  If I
recall from testing Polycom phones, you can have a central phonebook shared
by all phones and a per-phone phonebook that is uploaded by the phone to
your TFTP server so that even when re-provisioning from factory reset,
nothing is lost.  I didn't get far enough in the evaluation to set up a
provisionin server of my own.  The evaluation died in committee when an exec
reported that she didn't like the small buttons on the IP430.

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Softphone that supports central provisioning?

2007-04-25 Thread James FitzGibbon

On 4/25/07, Mike Lynchfield [EMAIL PROTECTED] wrote:


may i add , eyebeams confnig file is xml and could be generated , BUT, the
password is hashed in some way.. any idea on that ? its a pretty long hash



Two options:

- type in the passwords manually, shut down eyeBeam, and then cut/paste the
hash into your provisioning system (suggested earlier in this thread)

- say screw it and put the password in the XML in the clear and change the
attribute on the encrypted attribute from true to false.  That just
pushes the security concerns to the provisioning system and the workstation
filesystem, but you have much more flexibility in how you tackle that
problem than you get with the softphone itself.  Server side isn't really
any worse than most desk phones that need a config file with the password in
the clear on a TFTP server (i.e. Grandstream).  Client side you have to have
proper user-only creds on the Documents and Settings folder for each user
and have some way to ensure that your users don't give access to the
filesystem as them to someone else (i.e. forgetting to lock the screen).
But that's a PEBKAC[1] issue best addressed through the administration of a
Big Foam Cluebat(tm).

[1] Problem exists between keyboard and chair

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Softphone that supports central provisioning?

2007-04-23 Thread James FitzGibbon

On 4/20/07, Tzafrir Cohen [EMAIL PROTECTED] wrote:



I am not. The soft phone is not the only software on that computer that
needs cetral configuration.

How do you configure the networking on those computers? The mail
clients? How do you deploy updates?




The fundamental problem, as I explained in my first response, is that
X-Lite/eyeBeam will not search for it's configuration in the part of a
user's Documents and Settings folder that is part of a roaming profile.

I allow that I may just be a complete Windows admin neophyte, but my
understanding is that the Documents and Settings\username\Local Settings
folder is machine-specific.  X-Lite and eyeBeam store their configurations
in this folder, and it is not copied back to the server on logout nor pulled
from the server when the user logs into a different workstation.

It was my hope that it might look in the Local Settings folder, and if the
appropriate directory was not found then continue the search in the
Documents and Settings\username\Application Data folder, but this does not
appear to be the case.

So, it is more accurate to say that I want a softphone that I can configure
in an automated fashion (preferably via text or XML configs) from a central
server.  Whether that is part of a Windows user profile or whether it is
pulled via TFTP/FTP/HTTP is irrelevant to this discussion.  I merely stated
it because it is what SIP desk phones tend to support and I am trying to
build something analogous with a softphone without reinventing the wheel.

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Softphone that supports central provisioning?

2007-04-23 Thread James FitzGibbon

On 4/21/07, Senad Jordanovic [EMAIL PROTECTED] wrote:


What about creating a configuration file on server for each soft phone
extension automatically and then importing that file into the soft phone?

In another words, user receives a link to the setup program and the
configuration file in an email. That is how we are configuring our soft
phones :-)




This is essentially what I have done.  I've configured X-Lite for user #1,
then shut it down and copied the config folder to shared location named for
their windows logon.  Then I start up X-Lite, reconfigure for user #2, shut
it down and copy the config folder to a shared location named for their
windows logon.

The logon batch file looks for configs in the shared location and pulls them
to the local PC, overwriting the existing configuration.  This also provides
an escape hatch should the user bork the configuration of X-Lite - just
log out and back on again.

Workable, but inelegant.  And not without other problems - I have a mix of
different headsets in the office, and when an X-Lite configuration made with
one type of headset starts up on a PC with another type of headset, it tends
to reset it's configuration to point the headset speaker to the PC's
speakers.  Quite annoying, and made even more so by the aforementioned
escape hatch.

As I've mentioned, I'm just looking for a better way of doing this without
reinventing the wheel.  Along a timeline of the appropriate length, I can
make any of the suggested solutions work.

Anyone selling a timeline lengthener?  :)

--
j.
___
--Bandwidth and Colocation provided by Easynews.com --

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


  1   2   >