Re: [asterisk-users] Asterisk Voicemail changes

2017-09-01 Thread J Montoya or A J Stiles
On Friday 01 Sep 2017, Tim Turpin wrote:
> Is there a way that I can modify the source code for the voicemail
> application?  I need to change some of the options in the user’s interface
> to make it work like an existing system that I’m replacing.

$ vi /usr/src/asterisk-*/apps/app_voicemail.c

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Simplest way of executing a non-blocking (async) python AGI script?

2017-06-30 Thread J Montoya or A J Stiles
On Friday 30 Jun 2017, Jonathan H wrote:
> What's the simplest, easiest quickest least-code way of firing off an AGI
> with some variable, and then returning to the dialplan?

You have to use the "fork" command.  This starts a copy of the process with 
all the same internal state including variables and filehandles.  The command 
returns a non-zero value  (which is the PID of the child process; you may need 
this, if you plan to outlive your children and have to clear their entries 
from the process table)  to the parent process, and zero to the child process.  
So in the parent, you exit and return to the dialplan; and in the child, you 
close STDIN, STDOUT and STDERR  (so no process is waiting for you to produce 
output),  then just take your time doing what you have to.  The parent is 
already long dead by this time, so exiting goes nowhere.
 
> I've seen people talking about fastAGI, stasis, python ASYNC... all seems
> rather complicated. I feel I must be missing something embarrassingly
> obvious - isn't there just the equivalent of the unix shell's "&"?!

Yes, fork!  That is what the "&" operator is using "under the bonnet".

-- 
JKLM

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Autodialer - call simultaneously to both ends

2017-06-26 Thread J Montoya or A J Stiles
On Monday 26 Jun 2017, Harel wrote:
> Hello List,
> I'm working on an autodialer project.
> At the moment I use the Originate application then I "throw" it to an
> extension where I Dial() the other party and then both legs are bridged.
> The problem is that the Dial() will only run after the Originate finish
> its bit and I have lots of wasted time or even worse, the remote party
> hanging the call because instead of a human speaking to him the call setup
> to the 2nd leg only starts when remote answers. Is there a way to start
> calling both parties at the same time and bridge them when one answers
> (which will then hear the ringback tone until 2nd party answers)? Thank
> you

Our auto-dialler works as follows;

* Agent clicks number on screen in their web browser
* Agent's phone rings
* Agent picks up phone
* Far end party's phone rings
* Far end party answers
* Agent and far end party are bridged.

and is implemented using the truly ancient technology of callfiles.


All you need then is a Perl or PHP script, which accepts the destination 
number as a query parameter.  Your script then needs to identify the 
workstation by means of its IP address and determine the number of the nearest 
phone  (this does require proper configuration of DHCP server, but is worth 
it),  then write out a callfile.


Note:  There exists a race condition in Asterisk  (at least, when using the 
common Linux file systems, which update a folder's directory as soon as the 
*first* block of a file is written)  which means that if a callfile exceeds one 
block, Asterisk could end up reading only the first block and ignoring the 
rest.  If there is any danger that a callfile could exceed one block on your 
filesystem, you must write the callfile to a different folder, and then use the 
`mv` command to move it to /var/spool/asterisk/outgoing/ .  This sidesteps the 
race condition due to the behaviour of the mv command.  When moving *within* a 
filesystem, the whole file was already on the disk anyway when the directory is 
updated; when moving from one filesystem to another, it does not update the 
directory of the destination folder until the *last* block is written.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Is this the future of telephony?

2017-06-16 Thread J Montoya or A J Stiles
On Friday 16 Jun 2017, Christopher van de Sande wrote:
> So does anyone here think the traditional telephone company will go
> extinct, and voice communication will take place via email like (or
> equal to) sip uri's?

Hardly!

The job of the "traditional telephone company" has always been to connect a 
pair of wires at one end to a different pair of wires at the other end.  That 
isn't going away anytime soon.  There are more pairs of wires, with more and 
faster-changing signals travelling along them, that still need marshalling -- 
perhaps in more complicated ways than just one-to-one.

Whenever I am sending electrical impulses along wires and possibly via radio 
links, maybe even out into space and back, whether to someone in the same 
street or a different country, someone has to be making sure that those 
electrical impulses come out in the right place.

That is still the domain of telecommunications companies; they are just doing 
it with rather more bandwidth than the human voice.  The need for electrical 
impulses to be delivered to the correct destination still stands.  What has 
changed is, there are more ways than ever to make use of this "electronic 
logistics" service, and markets are emerging and evolving.

-- 
JM
Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] OT: Explain where mailing list bouncing comes from ?

2017-06-16 Thread J Montoya or A J Stiles
On Thursday 15 Jun 2017, Tim S wrote:
> Whatever has been done, if anything, isn't working effectively.  At this
> point I'd like to see some response from the mailing list admin about any
> root-cause efforts, AFAIC this is starting to smear the Digium/Asterisk
> brand's ability to handle IT related issues...  No response = no confidence
> vote.

It's hardly Digium's fault, if Google have decided that playing nicely with 
syntactically-valid messages doesn't fit their business model  (which is to 
know everything about everyone; purely in order to push them the "right" 
advertisements, in spite of whatever uses less other actors with less benign 
intentions might make of this information, of course).  

The cure is to pay for a proper e-mail hosting service.  "Free" services such 
as Gmail are overpriced.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Working around missing libmyodbc in Debian Stretch

2017-06-08 Thread J Montoya or A J Stiles
On Thursday 08 Jun 2017, Olivier wrote:
> Hello,
> 
> I'm building a new Asterisk system from source on Debian Stretch.
> My building script fails as package libmyodbc is currently missing from
> Debian Stretch repo.
> 
> Is there a work around this without leaving MySQL/MariaDB galaxy ?

This is why you should not use Debian testing for a server!  Testing is kept 
"always installable" by the crude method of REMOVING broken packages until a 
compatible version is ready.  This means you will occasionally find a package 
with no install candidate.

You will have to get the Source package for libmyodbc out of Sid, and see what 
you have to do to persuade it to build on your system.  And then maybe pass 
that information upstream to the package maintainers concerned.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] How to detect fake CallerID? (8xx?)

2017-05-11 Thread J Montoya or A J Stiles
On Wednesday 10 May 2017, Steve Edwards wrote:
> On Wed, 10 May 2017, J Montoya or A J Stiles wrote:
> > Presumably your staff carry mobile phones.  What about an app that gets
> > the ID of the cell tower to which it is connected, and passes it and the
> > SIM number in a HTTP request to a server you control?
> 
> The problem is that they are supposed to use the 'site landline' to
> confirm presence -- not their cell phone with the spoofed CID.

Yes; but the whole point is that the caller ID from the site landline is no 
longer reliable enough as evidence, by itself, that somebody is actually 
there.

A custom app could read the ID of the cell tower to which it was connected -- 
or even the phone's GPS co-ordinates -- and transmit that back to base over 
the Internet.  Preferrably with some sort of precautions to make the request 
harder to forge  (i.e., *not* just a plain HTTP GET with the MCC, MNC, LAC and 
CID in the query string).  If your app makes its connection via the site's wi-
fi  (which will require the co-operation of the client)  as opposed to the 
mobile network, so much the better, as there will be an IP address against 
which you can match.


If you insist to use the site landline for your authentication, you could 
extend the protocol to a full challenge-and-response as follows:  Play a 
series of digits down the line to the caller, return the call as soon as they 
hang up, and ask them to dial the same digits they just heard.  All this can 
be done in the dialplan  (you might need to record some announcements of your 
own, such as "Please memorise the following digits" and "Please dial the 
digits you heard in the last call").  

Intercepting incoming calls *to* a number is much harder  (usually requiring 
the co-operation of telcos, unless the interloper has access to some equipment 
through which they know that the call will be routed; that potentially 
includes your Asterisk, but any tampering there would be evident)  than 
falsifying outgoing calls *from* a number.  


It would be much more fun to mount a "sting" operation to catch the 
perpetrators red-handed   (say, falsely set off a fire alarm while you know 
they 
are slacking off down the pub instead of looking after the site like they are 
paid for)  .  but maybe I have just been watching too many detective 
dramas on TV!

-- 
JM

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] How to detect fake CallerID? (8xx?)

2017-05-10 Thread J Montoya or A J Stiles
On Wednesday 10 May 2017, Steve Edwards wrote:
> I have a 'time and attendance' application. Think janitorial or security
> kind of thing where an employee goes from location to location.
> 
> They're supposed to 'clock in' when they get to a site using a phone at
> that site to prove they're there.
> 
> Some employees have discovered 'fake caller ID' services can be used to
> say they're on site when they are not.

There are legitimate reasons for faking an ident.  For instance, if you are 
using multiple services in parallel to connect to the Outside World.  While we 
had such a setup, we arranged with our SIP provider to attach numbers 
associated with our ISDN-30 line to calls we were making.  And if you are 
providing something like a "transparent call recording" service, you need to 
lay the ident of the incoming call leg onto the outgoing call.

Unfortunately, as you've discovered, the service can be abused .

> How can I detect a fake CallerID? The INVITE looks the same to me.

You can't.  Only the first telephone company through which the call passes can 
tell for sure where a call is coming from.  The next company through whose 
equipment it is passing can alter it, and nobody downstream be any the wiser.

Remember, even although it's now packet-switched and multiple-redundantly-
routed underneath, the whole telephone network is still basically emulating an 
old-fashioned, circuit-switched network; where calls get connected from the 
originator's local exchange onto a trunk to pass on to another exchange, and 
all the next exchange downstream knows for sure is which approximate direction 
it came in from and where it's going to.  Information that would once have 
been implied by which pair of wires the signal was travelling down, is now 
sent separately, and subject to modification en passant.

> If I have the employees call an 8xx number, can I ask my SIP provider to
> include more headers to show the real ANI? What would that service be
> called?

Not really.  You need to backtrack a little and rethink.  Caller ID is just 
not something that you can rely on anymore.

Presumably your staff carry mobile phones.  What about an app that gets the ID 
of the cell tower to which it is connected, and passes it and the SIM number 
in a HTTP request to a server you control?  You'll obviously need to do some 
sort of authentication dance, otherwise anyone could just manually craft a URL 
representing any location.  (But since it's your app, you can effectively embed 
a different key into every copy; so in the worst case, anyone trying anything 
naughty is only able to spoof one handset.  An .apk file is basically a .zip 
archive; so you should be able to unzip it into a folder structure, use your 
favourite scripting language to regenerate the keyfile and zip it back up.  
This might even scale.)

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] app_jack unavailable

2017-05-10 Thread J Montoya or A J Stiles
On Wednesday 10 May 2017, andre castro wrote:
> Indeed. apt-get install libjack-dev libresample-dev were not installed.
> libjack-dev libresample-dev , so I installed.
> In the installation of libresample-dev apt-get selected
> 'libresample1-dev' instead of 'libresample-dev'. Not sure if that is a
> problem.
> Also installed libjack-jackd2-dev.

That's reasonable.  Sometimes a package name like foo-dev is just an alias for 
a package with a longer name like libfoo269-dev; or a dummy package with no 
files of its own but a dependency on another package.  So what actually gets 
installed might not exactly match what you asked for.

> But when I run menuselect in Applications, app_jack still is XXX
> mentioning jack and resample unmet dependencies.
> 
> Is there any extra step i need to do?

Did you rerun ./configure after installing the -dev packages and before 
rerunning make menuselect ?

The menuselect script relies on the configure script actually to tell it what 
is and is not installed on the system; so you need to rerun configure if you 
have added or removed any packages since the last time you ran it.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] app_jack unavailable

2017-05-10 Thread J Montoya or A J Stiles
On Wednesday 10 May 2017, andre castro wrote:
> Hello,
> I am new to Asterisk, so please bear with me.
> I have made a success installation from source of Asterisk 14.4.0 on
> Debian Jessie (8.7). And I am running the Asterisk server, with several
> extensions and dialplans, all working well.
> 
> However I am struggling to get app_jack to run.
> 
> In menuselect I can see that it is XXX due to dependencies on jack and
> resample, however both Debian packages: resample and jackd are installed
> in this machine.
> 
> Is there something that I am missing?

Most probably some -dev files.  (Come on, distro folks, it's 2017; bandwidth 
and storage are way cheaper than they were, back when the decision was first 
made to separate out files only needed by developers into their own packages, 
and now it's causing more grief than it is saving.)

> What do I need to do in order to have the jack module to run?

Probably just

# apt-get install libjack-dev libresample-dev

although it's possible that you might need some additional -dev packages.  But 
try the above first.


-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread J Montoya or A J Stiles
On Monday 08 May 2017, Frank Vanoni wrote:
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
> 
> Is there a better solution?

That's an .  interesting . way of doing things!

We would be thinking in terms of using a GLOBAL variable, or an ASTDB entry, 
to indicate whether or not the extra extension should be dialled.  This method 
ought to be extendable to serve multiple extensions, without the need to 
assemble the file from tiny snippets .


-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] log incoming calls without answering

2017-04-21 Thread J Montoya or A J Stiles
On Thursday 20 Apr 2017, Fabio Moretti wrote:
> Hi,
> 
> I've some analogic lines and I'm asked if it's possible to program an
> asterisk for "checking" the inbound calls without answering them, doing
> something like this:
> 
> analog line 1 -+-- asterisk
> 
>\__ analog phone
> 
> when a call enter, asterisk sense it and store its values (callerid, date
> and time, etc) somewhere, but nothing more, people will answer using the
> old analog phone. The goal is to have a log of the inbound calls without
> touching the old analog system (it's shared between different subjects).
> 
> I'm pretty sure it's something possible, but how to tell asterisk: "ok,
> call this AGI, and then don't answer and do nothing more".
> 
> Any idea?

You can get FXO cards, such as the TDM410P/E; which connect to an analogue 
line just like a telephone and then allow the line to be treated as a DAHDI 
channel.  (You would need an FXS card to connect to an analogue telephone; 
this has an additional power supply to generate the 48V DC line voltage and 
80V, 25 Hz ringing voltage.  Usually these cards have 4 or 8 slots for either 
FXO or FXS modules; make sure you buy the right ones.  Explaining to the 
vendor what you want it for may be the best way.)

So you could have Asterisk as an extension to your analogue line, and it could 
monitor incoming calls.  (You would not be able to monitor outgoing calls, 
though; unless you connected each analogue telephone to an FXS port, and used 
Asterisk as a simple PABX.)  

You do not need to Answer() the line to get the caller ID; it comes down the 
line  (either as 300 baud modem tones representing ASCII, or DTMF digit tones, 
depending on your telephone company)  between the polarity reversal and the 
first ring.  And there is no need to have Answer()ed before running an AGI  (in 
fact, you might have good reasons why you would want to have a pre-answer 
script, such as deciding which extension to ring, if you want to direct 
inbound callers straight back to the agent who called them earlier).

All your AGI need do is fork(), and now -- as far as you are concerned -- 
there are two parallel universes, each containing a full copy of the original 
process with the same variables and file handles.  In one, which is the parent, 
fork() returned a non-zero value  (which is the PID of the child process, and 
you might have to clear it out of the process table if it exits before you 
do);  so that process can just exit and return control to Asterisk.  In the 
child process, where the fork() call returned zero  (you don't need to know 
your parent process's PID, since any still-living grandparent will just take 
care of you),  you need just to close STDIN, STDOUT and STDERR  (which are 
still connected to Asterisk)  so it will no longer be waiting for your process 
to do anything -- now you are free!  :)  You then connect to some sort of 
database and run a query like

INSERT INTO call_history(date,source,dest) 
VALUES(NOW(),"${CALLERID(num)}","${EXTEN}"); 

except that ${CALLERID(num)} and ${EXTEN} will have to be passed into the AGI 
script as parameters.  

Then. back in extensions.conf, Dial() a local channel that does nothing but 
Wait() for long enough for the ringing to stop; either because the analogue 
phone has been picked up, or because the caller has stopped trying.  Asterisk 
should get a Hangup() event when the far end hangs up, at any rate.


If you buy a single-channel one of the cheap Chinese clone cards  (from The 
Usual Place),  it ought to last long enough and work well enough for you to 
experiment with; but DO NOT rely on these cheap cards for anything even 
remotely mission-critical.

-- 
JM

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Voicemail asking for login

2017-04-20 Thread J Montoya or A J Stiles
On Wednesday 19 Apr 2017, D'Arcy Cain wrote:
> Yes and  [using something like "1571"]  works just fine for us.  The problem
> is that we are trying
> to deal with the situation where someone calls themselves from another
> phone (internal or external) to pick up their messages.  In every other
> case it asks for their password (which is always numeric) and goes into
> the VM.  This one extension asks for a mailbox.

This is just screaming "configuration mismatch" -- or, possibly, "latent bug 
whereby things parsed in separate places should be treated the same, but are 
actually getting treated differently".

I think we are going to need to see your dialplan logic, and maybe your 
voicemail.conf, in order to work out what is different between this one user 
and all the others.  You might even need to use `hd` to examine the files, just 
in case there is a stray non-printing character spoiling things.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Voicemail asking for login

2017-04-19 Thread J Montoya or A J Stiles
On Wednesday 19 Apr 2017, D'Arcy Cain wrote:
> On 2017-04-19 02:39 AM, Pete Mundy wrote:
> > Hmm... Above my pay grade I'm afraid! Looking at your 'voicemail
> > 
>  > show users' I can't see why the vm_authenticate function is
>  > failing to read the username :(
> 
> I can answer that one.  It's because we can't enter 'stocktrans2' from a
> telephone so we just hang up.  The question is, why does it ask for the
> mailbox in the first place>

I fished this out of an old extensions.conf from a defunct project.  It might 
be relevant to your use case:

exten => 1571,1,NoOp(Call to 1571: voicemail retrieval)
exten => 1571,n,AGI(lookup_caller_id.agi,${CALLERID(num)})
exten => 1571,n,NoOp(CLID is ${clid})
exten => 1571,n,VoiceMailMain(${clid},s)

The AGI script  `lookup_caller_id.agi`  sets the variable  ${clid}  to the 
caller's extension number, after which their mailbox is named  (although there 
is no reason not to set another variable, such as ${mbox} to hold the mailbox 
if you want).  In the call to voicemailmail() we specify this mailbox, and 
also use the  `s`  option to skip password checking  (it was safe in this 
situation to assume that nobody had physical access to a phone who definitely 
should not have had access to its user's voicemail messages).

The upshot of this was, if you dialled 1571 from your own phone, then you got 
put straight through to your own voicemail, without logging in.  

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] PBX selection

2017-04-18 Thread J Montoya or A J Stiles
On Monday 17 Apr 2017, Speed Boy wrote:
>  Hi all, I'm new to VoIP, now we have a project that needs a
>  PBX with client APPs.
> In our team we have argument for choosing PBX. By so far, we
>  have following candidates:
> 
> A: Open source
> 
>  1) Asterisk PBX (http://www.asterisk.org) (with longest
>  history that almost every one knows it, now the last version using the
> PJSIP stack)
>  2) FreeSwitch (http://www.freeswitch.org) (A lot people
>  recommended it to us)
> 
> 
> B: Commercial
> 
> 1) Vodia PBX (http://www.vodia.com). It comes from SNOM, now
> acquired by a HongKong company now
> 2) PortSIP PBX (http://www.portsip.com/portsip-pbx). It
> also includes VoIP SDK, WebRTC and offer rebranding app for free.
> 
> My boss prefers the Open Source PBX since they are free,
> but our CTO prefers the commercial editions, according to
> whom the business PBX has better support, and the
> performance is good, and easy to use - considering our team
> all are new to VoIP/PBX.

Proponents of proprietary solutions always like to say "If an Open Source 
solution breaks, who can you call?"  The answer is, "Any sufficiently-competent 
programmer -- it may be broken, but we have all the pieces".  Whereas if you 
spend money on proprietary software and it breaks, then there is only *one* 
place you can call -- and you'd better hope they are interested to fix your 
problem.

On the other hand, if you could get full Source Code and Modification Rights  
(basically, "everything we could do with a GPL program except distribute 
copies"),  a proprietary solution might not be so bad after all.  But since 
the goal of most proprietary software vendors is to extract money from you and 
maintaining you in a state of perpetual helplessness is highly desirable in 
the course of this, do not expect to get such a deal in real life.
 
> We have did some searching of Asterisk, here are my questions:
> 
> 1. Does the last Asterisk using PJSIP stack ?

Yes.

> 2. Does there has the comparison of PJSIP and reSIProcate, sofia(using by
> FreeSwicth) ?

Not sure about this.  We're still using the original chan_sip driver.

> 3. Is it easy to compile and setup Asterisk?

It's about as easy as compiling anything from Source Code.  Harder than LAME 
MP3 encoder, but easier than the Linux kernel.  If you altered `monop` from 
the BSDgames package to make the streets match your local edition of the game, 
you will have no problem whatsoever with building Asterisk.

If you understand the process of what you are doing -- basically, setting up 
an automated process that will examine your server hardware and software 
configuration  (configure),  choosing which parts of Asterisk you want to 
include  (make menuselect),  compiling the selected human-readable Source Code 
into binary code that the computer can understand natively  (make)  and then 
moving the compiled binary code and configuration files from the Source Code 
folder to where the computer is expecting for them to be  (make install)  then 
you should not have too many problems.

It is always preferrable to compile your own Asterisk to fit your hardware and 
include just the bits you want, rather than rely on anyone else's pre-compiled 
package.

> 4. Which Asterisk version is recommended?

The latest one.

> And does Asterisk support Windows
> ?

You can certainly use Windows softphones to talk to Asterisk, but Asterisk 
itself requires a non-toy underlying operating system.  Ubuntu and CentOS are 
the best-supported Linux distributions.  Asterisk has also been seen working, 
to greater or lesser extents, on Solaris and the BSDs.  But Linux was the 
original development environment  (although one of the two original projects 
that ended up merging and becoming Asterisk, many years ago, was originally 
developed on FreeBSD),  and is what most Asterisk telephonistas know.

Any hardware which is capable of running Windows can, of course, run Linux; 
and usually better.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] restart system from extension

2017-04-07 Thread J Montoya or A J Stiles
On Thursday 06 Apr 2017, Atux Atux wrote:
> hi. i would like to be able to reboot the system from my extension. is that
> possible? if yes, how?

It's possible, with something this in extensions.conf;

exten => 99,1,NoOp(Restarting server now)
exten => 99,n,System(shutdown -r now)

Then dial 99.

NB this is UNTESTED, for obvious reasons!  You probably do not want this 
extension to be in a context that anyone besides you can access.  And if you 
are not running Asterisk as root, then you will need to write a C wrapper 
around the shutdown binary and make it setuid root.


But just because it is possible, does not mean it is not a really, really 
terrible idea.  The real question is, WHY are you wanting to be able to reboot 
your server from your extension?  Because there is almost certainly a better 
way of achieving whatever it is that you are hoping to achieve.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Alphabet character in destination number (CDR)

2017-03-31 Thread J Montoya or A J Stiles
On Thursday 30 Mar 2017, Ikka Tirtawidjaja wrote:
> Dear all,
> 
> I have PBX with asterisk 13.x
> 
> a couple of IPPhone that connect to that asterisk PBX send an alphanumeric
> dialed phone number.
> 
> for example, in my CDR table, field DST, it show dialed phone number like
> - 0C81318304632C  (it should be 081318304632)
> - 08D11157112 (it should be 0811157112).
> 
> Why it's happening ? and how can I prevent it to happen ?

A, B, C and D are actually valid DTMF digits  (they belong in a column to the 
right of 3, 6, 9 and # respectively, and have the "high" frequency 1633 Hz).  
TTBOMK they were never actually used for anything in practice, they just keep 
kicking around like a vestigial organ  (compare how computer software for the 
UK financial industry still includes code to deal with mediaeval pounds, 
shillings and pence).  

Is it possible for a 1633 Hz tone, loud enough to swamp the "high" frequency 
of a dialled digit, to be finding its way somehow into the microphone of the 
affected phone and confusing it when digits are dialled?


-- 
JM

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Something similar to Doxygen for standard dialplan?

2017-03-21 Thread J Montoya or A J Stiles
On Saturday 18 Mar 2017, Jonathan H wrote:
> Hi, thanks - that looks really good!
> 
> I was about to embark on some non-visual stuff using Ragic, but this
> looks great.
> 
> Is there a binary anywhere, or any instructions to compile? I've never
> compiled C# code before, and although a quick google suggests it
> shouldn't be too hard, I might need to know a few things like what
> version of .net it should be compiled with.

Most distributions ship an out-of-date version of mono, so you may need to 
compile that from Source Code first.

As a general rule, you should never, ever run any binary that was not compiled 
either by yourself or your distro -- and if anyone ever offers you a binary 
without the Source Code, walk as fast as you can in a different direction, 
because it is likely poisioned.

-- 
JM or AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] BUG or ???

2017-02-27 Thread A J Stiles
On Saturday 25 Feb 2017, Антон Сацкий wrote:
> Thanks U Richard
> i know about this solution
> but the main question why "${} substitution containing
> the SHELL is evaluated before anything else"

For the same reason why you do raising to powers before multiplications and 
divisions, and all those before you do additions and subtractions.  It's just 
a mathematical convention, agreed upon a long time ago and handed down 
verbatim from generation to generation ever since.

> Can U describe the rules   when and  why it happens?

The order goes something like this  (this is from memory; check docs for 
definitive version):

* ${} variable substitution / munging
* $[] expression evaluation
  - () round brackets
  - - arithmetical negation
  - * / % multiply and divide
  - + - add and subtract
  - < = > and =~ comparison
  - ! and ~ NOT
  - && and & AND
  - !! and | ^ OR and EOR
* ?: embedded IFELSE operator

Since ${} has a higher priority than ?: then the contents of the ${SHELL ...} 
expression will be evaluated *before* Asterisk decides whether to do the bit 
between the ? and the : or the bit after the : .  (And the most deepest 
embedded ${FROMEXTEN} needs to be evaluated before the shell can even be 
spawned to deal with the command).  Having performed the SHELL command and got 
a result for the ${}, it *then* begins dealing with the $[] expression. 
${CALLERID(num)} is compared against the target.  It's found to be false  
(empty string or numeric zero),  therefore the Set(var29=...) does *not* 
happen.  But, thanks to operator precedence, Asterisk has *already* evaluated 
what it would have set var29 to *before* it decides not to set it.

It is generally better to use a GotoIf() to skip past a step you don't want 
done, rather than embed it into an ExecIf() .  This is not the 1980s anymore, 
and the odd well-placed GOTO is perfectly OK  (and I'd reckon, actually *more* 
readable than the circumlocution necessary to avoid using it).

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Soft SIP phones that support TLS - Asterisk version 13.13.1

2017-02-16 Thread A J Stiles
On Thursday 16 Feb 2017, Max Grobecker wrote:
> I'm a big fan of PhonerLite.
> It's more poplar in Germany, but also available in English language.
> This client supports TLS, SRTP and ZRTP:
> http://phonerlite.de/features_en.htm
> 
> Yes, the GUI is not that much user friendly as Zoiper is - but at least a
> very good and stable client for testing purposes ;-)

It seems to be Windows-only, though, and does not appear to include any Source 
Code  (even although the licence allows you to distribute modified versions).  
Either of those could potentially be a show-stopper.

Linphone  ( http://www.linphone.org/technical-corner/linphone/overview )  
supports TLS -- and is both cross-platform and GPLv2.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] [OT] Downloading Recqual

2017-02-16 Thread A J Stiles
On Thursday 16 Feb 2017, Olivier wrote:
> Hello,
> 
> While googling, I've just discovered Recqual.
> If I'm not mistaken, project's sourceforge site [2] does not host any
> source or binary.

You need to follow the "code" link, copy the line that starts with
 "svn checkout ..."
and then just paste that straight into a terminal.  (You will need to have 
installed the "subversion" package before you start.)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Call List Campaign to an IVR

2017-02-02 Thread A J Stiles
On Thursday 02 Feb 2017, Amelye Chatila wrote:
> Hi,
> I need to make calls to a list of numbers one at a time and once the user
> pick the phone connects to an IVR where I can get few data, after  a call
> finishes the 2nd number get called and so forth.
> 
> I'm familiar with Asterisk/Elastix but the Campaign feature on Elastix does
> not seem to fill this need. I'm now looking GoAutodial & AsterCC.

It is possible to do everything you require with Dialplan and Bash scripting.  
It is also  (1)  highly illegal and  (2)  morally beneath contempt.  So, not 
out of any desire to avoid a charge of "conspiracy to misuse an electronic 
communications network" but in simple solidarity with everyone who has ever 
been pissed off by a machine-initiated spam marketing phone call at an 
inappropriate moment, I am not going to tell you how to do it.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Setup DID

2017-01-24 Thread A J Stiles
On Tuesday 24 Jan 2017, Zakir Mahomedy wrote:
> Hi I am trying to setup DDI for one of our servers
> Our Provider has given us one DDI for use for eg 080011.
> On my main server  A,  I use an IAX trunk to connect to Client Server
> B.When calls come in from the outside world on main server A for
> 080011In the dial plan, I pattern match and connect with IAX2 truck
> named 087XX eg) SERVER A DIALPLANexten => 080011,1, Verbose( 3, "
>  INCOMING CALLS  SERVER B )same => n,Dial(IAX2/087XX,,r) On
> server B I have an incoming context in which I have both a general IVR and
> the 080011 patternto route the DDI number to a particular extension.
> [incoming]
> exten =>080011.,1,Answer()same => n,Dial(PJSIP/200)same => n,Hangup()
> exten => s,1,Answer()same => n,Goto(main_ivr,,1)same => n,Hangup()
> I cant seem to get a match on 087, it always go to the s context in
> incomingAny ideas on how I can get DDI to work thanks Zakir

This probably is related to the format in which one server is presenting the 
extension to the other server, and your extension definition(s) not matching 
that format.  (For instance, something could be stripping the leading zero 
from the STD code.)  So you need to find out exactly what the far end is 
sending the number to you like, so you can make sure your extensions match.
 
In the "s" extension in your [incoming] context, put a line like
 
exten => s,n,NoOp(Dialled extension is "${EXTEN}")
 
Dial through to the first server, and watch the console on the second server to 
make sure the call comes through.  Note the format in which the extension is 
presented, and make sure your extension definitions match that.
 
 
Also, do not forget, "wildcard" extensions which can match more than one thing 
must begin with an underscore; e.g.
 
exten => _3xx,1,NoOp(Call to "${EXTEN}" on B site)
exten => _3xx,n,Dial(${BSITE}/${EXTEN})
exten => _3xx,n,Hangup()
 
Even although there be characters in the extension name which will mark it out 
as an obvious wildcard, Asterisk still expects for there to be an _ at the 
beginning in order to treat it as such.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Replacing PBX during a call in progress

2017-01-12 Thread A J Stiles
On Thursday 12 Jan 2017, Telium Technical Support wrote:
> This was asked many years ago but I thought I would check to see if things
> have changed.  Is it possible to take over a call in progress - using a
> replacement Asterisk server?
> 
> In other words, if 2 user agents are connected through an Asterisk PBX, and
> I tracked the call ID, IP of each UA (and anything else needed), could I
> remove the PBX and put a new one in its place (at the same IP address) and
> resume the call?  Somehow keeping the call up on the UA's and telling
> Asterisk to just resume a call given specified parameters (so the UA's
> wouldn't notice the change)?

I doubt there is any chance whatsoever of that working!  For a start, you 
can't have two machines on the same subnet with the same IP address.  It just 
does not work.  And there is all manner of internal state that would have to 
be replicated onto the new server.

When the clicky-clicky exchange in the village where I grew up was updated to 
System Y sometime in the early 1990s, all the phones went dead for about 30 
minutes and calls in progress were cut off.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Can't comile bundled PJSIP on CentOS 7

2017-01-10 Thread A J Stiles
*  THIS IS NOT WHERE YOUR REPLY BELONGS  *

On Tuesday 10 Jan 2017, Olivier wrote:
> Historically, I didn't use "install_prereq" but I also used it yesterday.
> 
> As make fails with "[LD] libasteriskpj.o -> libasteriskpj.so.2" which is
> the first of its "kind", I still wonder
> if issue comes from libsrtp somehow, or from a missing option in
> ./configure (such as --prefix).

You said earlier that installing Asterisk and CentOS worked with a VM box that 
you set up.  Were they the same architecture?  Were you using all the same 
versions of everything?  Have you still got the image?  Fire it up and see 
what's different between the two.  (You can find out your kernel version, and 
whether you are running 32- or 64-bit, with `uname -a`.  I think the command 
to list all installed packages on an RPM-based system is `rpm -q -a`, but it 
was awhile ago since I used one.)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Can't comile bundled PJSIP on CentOS 7

2017-01-10 Thread A J Stiles
On Tuesday 10 Jan 2017, Olivier wrote:
> Hello,
> 
> I'm setting up an Asterisk 13.13.1 cluster on two CentOS boxes.
> 
> I followed this:
> cd /usr/src
> wget  ... asterisk-13.13.1.tar.gz
> tar zxf asterisk-13.13.1.tar.gz
> cd asterisk-13.13.1
> ASTERISK_CONFIGURE="--libdir=/usr/lib64 --prefix=/usr"
> ./configure ${ASTERISK_CONFIGURE}  --with-pjproject-bundled
> make menuselect (shows res-srtp is available)
> make
> 
> latest make command fails with (see [1]:
> 
>[GENERATE] libasteriskpj.exports
>[LD] libasteriskpj.o -> libasteriskpj.so.2
> /bin/ld: cannot find -lsrtp-x86_64-unknown-linux-gnu

You probably need to install a package called something like "srtp-devel" or 
"libsrtp-devel".  (I'm not certain of the exact package name on a Fedora-like 
system, as I'm coming from Ubuntuland ;) )  Re-run the configure script after 
installing it.

Asterisk always used  (pre-10!)  to be distributed with a script called 
"install_prereq" which was meant to install all the necessary packages for a 
full install with everything, at least on a on Fedora-like or Debian-like 
distro; not sure if this is still included anymore, as it seemed a bit flaky.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] failing to start asterisk on centos7

2016-12-12 Thread A J Stiles
**  THIS IS NOT WHERE YOUR REPLY BELONGS  **

On Monday 12 Dec 2016, christopher kamutumwa wrote:
> Hello support,
> 
> Am not winning need your help. ive tried putting a different version of
> asterisk on centos 7 and here are below results, after make config;
> 
> [root@localhost asterisk-14.2.1]# make config
> [root@localhost asterisk-14.2.1]# sudo service asterisk start
> Starting asterisk (via systemctl): [  OK  ]
> [root@localhost asterisk-14.2.1]# asterisk -rvv
> bash: asterisk: command not found
> [root@localhost asterisk-14.2.1]# which asterisk
> /usr/bin/which: no asterisk in (/sbin:/bin:/usr/sbin:/usr/bin)
> [root@localhost asterisk-14.2.1]# asterisk c
> bash: asterisk: command not found

You don't appear to have finished the build process!

You need to run
$ make menuselect
$ make
$ sudo make install

(if `make` stops with errors, fix them and run that step again.)

There is no way that `sudo service asterisk start` should be able to start 
anything successfully if there isn't an asterisk binary in the path.  (But 
systemd is a law unto itself.)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] failing to start asterisk on centos7

2016-12-12 Thread A J Stiles
On Saturday 10 Dec 2016, christopher kamutumwa wrote:
> ive installed asterisk but below is what am getting proces gets
> killed.please help
> 

Make sure you have libncurses5 and its development files installed, otherwise 
this can cause crashes.

Also, how much RAM is in your box?  Check Asterisk is not being killed for 
running out of memory.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Asterisk compatibility with SMS services

2016-12-01 Thread A J Stiles
On Wednesday 30 Nov 2016, Emiliano Vazquez wrote:
> i'm using gammu[1] with a 3g dongle and my own chip with my preffer
> provider. It can send over 700 every our and receive to. I don't know if
> you need asterisk and sms in the same way but with this tool you can make
> everything. It has python tools to.
> [1] https://wammu.eu/gammu/

I've used that, with an old pre-smartphone mobile as a GSM modem.  It has the 
usual GUI frontend and scriptable backend.  But it is separate from Asterisk.


I have also used the OpenVox G400P/E in the past, which integrates beautifully 
with Asterisk  (incoming text messages, successfully sent outgoing messages 
and failed sent outgoing messages trigger extensions in the dialplan);  but 
this card has been "no longer recommended for new designs" for some time now  
(chan_extra won't even build against recent kernel or Asterisk versions).


Be aware that if you send too many text messages in too short a timespan, your 
telco might deem that to be in excess of their "fair use policy" -- although 
the exact dividing line between fair and unfair use seems to be a jealously-
guarded secret.  The only way to find out for sure is to cross it .


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] _FAX_. extension refuses to work !

2016-11-30 Thread A J Stiles
On Wednesday 30 Nov 2016, Michele Pinassi wrote:
>[stuff deleted]
> but on a call directed to, es. FAX_3700 i got:
> 
> [Nov 30 11:38:30] NOTICE[5462][C-0027]: chan_sip.c:26309
> handle_request_invite: Call from 'voip-trunk' (xxx:5060) to extension
> 'FAX_3700' rejected because extension not found in context 'from-voip'.
> [Nov 30 11:38:30] NOTICE[5462][C-0027]: chan_sip.c:26309
> handle_request_invite: Call from 'voip-trunk' (xxx:5060) to extension
> 'FAX_3700' rejected because extension not found in context 'from-voip'.
> 
> Other extension like _IVR_ or _VMR_ works perfeclty and are defined in
> the same manner.
> 
> Maybe _FAX was a reserved keyword ?

Almost.  The letter X is a reserved *character*; it gets translated internally 
to [0-9]. So your extension pattern
_FAX_.
actually matches the pattern
FA[0-9]_.
and something like "FAX_3700" is not going to match this pattern  (because 
there is now a letter X in the place where the extension pattern is expecting 
for there to be a digit 0-9).

Try a backslash before the X?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


[asterisk-users] Triggering an AGI script when a queued call is answered

2016-11-24 Thread A J Stiles
Many years ago, I used to have an AGI script that fired on an incoming call, 
did some database lookups and ended up raising a notification on the screen of 
the person whose phone was ringing, with the details looked up from the 
incoming caller ID.

All that fell by the wayside when Debian Squeeze introduced KDE4 and the 
notification system I had created stopped working.  And some time after that, 
we introduced queues instead of everyone having their own direct inbound 
number .

Now, some tie-wearer is dribbling on me to bring back the old system.


I am confident that I could write something that will work with the new cross-
desktop notification model  (and in any case, that is a matter for Elsewhere On 
The Internet).  However, I am going to need to hook it into Asterisk somehow.


What I think I need is for an event to fire when someone answers a queued call; 
then I can run an AGI script, or execute a script using the System() command.  
Within my script, I need the variable ${CALLERID(num)} to look up the caller's 
details from their number, and the answering extension to decide where to send 
the notification.

Is there a way of specifying in the dialplan or queue configuration that I want 
to execute a script when an agent answers?

So far, all I can think of is joining local channels into the queue instead of 
the actual phones, so I get to run a bit of dialplan where I can kick off the 
AGI script and then Dial() the actual extension; but that could get terribly 
unwieldy if not done extremely carefully.


(Of course, the manager in question also insists for me to implement all this 
without a moment's downtime.  Kids, this is what happens when your brain is 
deprived of oxygen .)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] info about DID.

2016-10-28 Thread A J Stiles
On Thursday 27 Oct 2016, KyD wrote:
> Hi!
> 
> I need to make a dialplan by DID.
> 
> where it gets the asterisk values did? from sip headers or ... ?
> 
> Thanks!

It will all be taken care of for you, so you don't have to do anything special 
for calls to a direct inbound number.  When a call comes into your Asterisk 
via a SIP trunk or ISDN line and hits the appropriate context in your 
dialplan, the destination number  (i.e., what the person on the other end 
dialled)  will be in the variable ${EXTEN}.  (But *note*, it may be in any one 
of several formats:  local number only; national number with STD  [town]  
code, with or without initial 0; international number with IDD  [country]  and 
STD  [town]  codes).  The same provider will always present the number in the 
same format, though; so if they include the STD code, they will -always- 
insert it, even for calls within the same town where the caller dialled only 
the local number.

If you define an "s" extension which displays the value of ${EXTEN} in the 
console, then dial one of your direct lines, you can work out how the number 
is being presented:

exten => s,1,NoOp(Incoming call for ${EXTEN})

Then you can write appropriate extension logic in your dialplan.  For 
instance, if one of the dialled numbers comes in as "206318", you just need to 
have an extension like this in your dialplan;

exten => 206318,1,DoSomething()

And when somebody dials that number, it will fire the appropriate extension in 
your dialplan.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Incoming Call by DID

2016-10-27 Thread A J Stiles
On Wednesday 26 Oct 2016, KyD wrote:
> Hi,
> 
> My sip provider gave me 2 numbers for the incoming call via pstn.
> 
> nro1 = 12341234
> nro2 = 45674567
> 
> I have a dialplan for each.
> if i put this on my dialplan:
> 
> exten => s,1,Dial(SIP/1001)
> exten => Hangup()
> 
> Works!
> 
> But if i put one of them:
> 
> exten => 12341234,1,Dial(SIP/1001)
> exten => _1234,1,Dial(SIP/1001)
> exten => 45674567,1,Dial(SIP/1001)
> exten => _4567,1,Dial(SIP/1001)
> 
> incoming calls do not arrive.
> 
> Any ideas?

The incoming call must be arriving with ${EXTEN} containing something that 
doesn't match  12341234, _1234, 45674567 or _4567, so it is 
not triggering any of the extensions in your dialplan.  Maybe it still has the 
STD code or even the IDD code prepended.  (Been caught this way once before 
.  our old ISDN-30 provider used to send just the local number, then we 
moved to a new ISDN-30 provider who send the number with STD code but no 
initial 0.  Cue frantic editing of dialplan before rest of staff arrived .)
 
So try this;
 
exten => s,1,NoOp(Incoming call for '${EXTEN}')
exten => s,n,Dial(SIP/1001)
exten => s,n,Hangup()
 
Run `# asterisk -vvvr`, dial one of your DDI numbers from 
a mobile phone and watch the messages scrolling past.
 
Now you will be seeing exactly what ${EXTEN} contains when a call comes in, so 
you should be able to work out what is going on, and craft your extension 
expressions to suit.  If in doubt, post an excerpt from your CLI output.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Hello again

2016-09-30 Thread A J Stiles
On Friday 30 Sep 2016, aaberga/gmail wrote:
> Hi,
> 
> after a long pause (Asterisk 1.8 times), I have started again playing with
> VOIP. A lot has changed since last time I did setup an Asterisk system!
> 
> So I am asking for some help.
[stuff deleted]
> [2102]
> type=endpoint
> context=internal
> ;disallow=all
> allow=ulaw
> allow=alaw
> allow=g729
> transport=transport-udp-nat
> auth=auth2102
> aors=2102
> rtp_symmetric=yes
> force_rport=yes
> ice_support=yes
> direct_media=no

You might want to comment out all references to g729  (which needs a special 
licence)  and just use alaw  (the native codec of the PSTN)  throughout.

If one of the phones is deciding to use g729 and your Asterisk doesn't have 
the relevant licence, then you might well get all manner of strange things 
happening.

Even if you have g729 licences, try and get it working with alaw first.  The 
fewer things there are that could go wrong, the better.  It's always best to 
get it working with the simplest possible setup first, and only then add 
sophistication.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] mysql phonebook

2016-09-15 Thread A J Stiles
On Thursday 15 Sep 2016, tux john wrote:
> hi. i am running asterisk 11 and i am using astdb to store all my contacts
> and their numbers. so everytime they call me, i can see their name on the
> screen of the phone. i am making use of the following to retrieve the name
> from the astdb exten =>
> WhatEverIsMyDID,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
> exten => WhatEverIsMyDID,n,Answer()
>  
> in the same machine i have mysql. i would like to make use of mysql to
> store and retrieve phonebook as well create blacklist of numbers. i
> thought of creating 2 databases
> -phonebook, will contain name, number
> -blacklist, will contain name, number
>  
> once i update all the database fiels how can i see the names whenever
> someone calls? regarding the blacklist, i would like to send them to hear
> a sound (eg tt-monkeys) or simply hangup. 

Write an AGI script that expects a phone number as its parameter, performs a 
database lookup on the number and sets some channel variables with the 
caller's name and whether or not they are blacklisted.  You probably need only 
one table, really; use VARCHAR() fields for the number and name and something 
like a TINYINT(1) for indicating whether or not the number is blacklisted.  
After the script exits, the dialplan will see any variables it set.  So you 
can do something like this;

exten => s,1,Set(from=${CALLERID(num)})
exten => s,n,(Incoming call from ${from})
exten => s,n,AGI(lookup_caller.agi,${from})
; /var/lib/asterisk/agi-bin/lookup_caller.agi sets variables `blocked` to true
; if the caller is blocked, and `callername` to the caller's name
exten => s,n,GotoIf(${blocked}?unwelcome:permitted)
exten => s,n(permitted),NoOp(This call is allowed)
exten => s,n,Set(CALLERID(name)=${callername})
; we can maybe do something else funky with callername here
exten => s,n,Dial(${ALL_EXTS})
exten => s,n,Hangup()
; tell unwanted callers where to stick that phone
exten => s,n(unwelcome),MP3player(/songs/kevin_bloody_wilson/dicktaphone.mp3)
exten => s,n,Hangup()


I used some simple example code to implement a little daemon on users' 
workstations; which listened on a UDP port, and created system notifications 
informing the user of an incoming call.  As this was all on the inside of a 
firewall, I also included the capability to open up a web page.  The AGI script 
was able not only to notified the workstation adjacent to the phone of the 
incoming call; but if the number was recognised as belonging to a user within 
our system, would bring up their details on screen  (all the work was done 
through a custom web application).

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Multiple phones when one is unregistered

2016-08-30 Thread A J Stiles
On Tuesday 30 Aug 2016, D'Arcy J.M. Cain wrote:
> I have an extension that looks like this:
> 
> exten => 55,1,Verbose(Door buzzer calling)
>   same => n,Dial(SIP/user1/user2/user3)
> 
> The idea is that any of the three users can answer the phone to let
> someone in.  The problem is that if, say, user2 unplugs his phone then
> the call immediately goes to his voice mail and the other two do not
> have the ability to open the door.

There is nothing in that dialplan snippet you provided that would send 
anything to voicemail.  In fact, if you used that snippet, it would give the 
exact behaviour you describe yourself as wanting!

Here's a protip for you:  It's *not* a massive corporate secret, which phone 
will ring when somebody dials what number.  Obfuscating your real dialplan 
like that just makes it harder for other people to help you.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Removing mailbox and password prompt for voicemail

2016-08-04 Thread A J Stiles
On Thursday 04 Aug 2016, Nabeel wrote:
> On 30 July 2016 at 19:32, D'Arcy J.M. Cain  wrote:
> > Not playing the prompt changes nothing.  If someone presses '*' while
> > listening to your answer message then they are in your mailbox.  You
> > better have a password that they need to enter to continue.
> 
> I have now tested the 'Unavailable' message by pressing "*" while listening
> to the recorded message. I can confirm that this does NOT directly enter to
> the called number's mailbox. It actually enter's the registered
> device's/caller's own mailbox. Therefore, this does not necessitate setting
> a password.
> 
> The problem is that the 'mailbox' prompt allows a way for accessing any
> other mailbox, which is not necessary in my case. If anyone knows a way to
> remove this 'mailbox' prompt, please let me know.
> 
> Nabeel

To get rid of the "Mailbox?" prompt, you need to supply a mailbox as a 
parameter to the VoicemailMain() command:

exten => ,y,VoicemailMail(${mbox})

This takes you straight to the mailbox specified by ${mbox} .  If mailboxes are 
simply the same as extension numbers, then you can just use ${CALLERID(num)} 
here.  Otherwise, you may need a script to look them up in a database.

If you also add the "s" option, like this:

exten => ,y,,VoicemailMail(${mbox},s)

Then this will also get rid of the "Password?" prompt  (and therefore presume 
you are already authenticated).  Therefore, this should *only* be used in one 
of the following situations:

(1)  In a small, intimate business environment, where there is full mutual 
trust between all personnel and nobody has any secrets from anybody else.

(2)  Where sufficient precautions have been taken to ensure that phones are 
physically secure against unwanted access.

The latter is the approach usually taken by telcos with their basic voicemail 
configuration; your messages can only be retrieved from your own phone, which 
normally is either behind a locked door  (if it is a land line)  or about your 
person  (if it is a mobile).

For instance, you might have something like this in your Dialplan.  
"get_mailbox.agi" is an AGI script  (not included)  for looking up the mailbox 
associated with a caller's number and populating a channel variable "mbox", or 
leaving it empty in the event of an error.  "ajs-vm_not_avail.wav" is a sound 
file  (also not included)  announcing that voicemail is not available.

exten => 1571,1,AGI(get_mailbox.agi,${CALLERID(num)})
exten => 1571,n,GotoIf($[${mbox}]?mbox_ok:mbox_err)
exten => 1571,n(mbox_ok),VoicemailMain(${mbox}, s)
exten => 1571,n,Hangup()
exten => 1571,n(mbox_ng),Playback(ajs-vm_not_avail)
exten => 1571,n,Hangup()

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] SIP trunk

2016-07-26 Thread A J Stiles
On Tuesday 26 Jul 2016, Jerry Geis wrote:
> It seems I am not getting any digits coming over a SIP trunk.
> 
> How can I match "anything" or "nothing" and start my extension.
> 
> Usually I have something like:
> exten => 55,1,Goto(,yyy,1)
> 
> but if 55 does not come across and it appears to be no digits
> coming across how do I match that that and just start.

Try using extension "s"  (for Start).  NB: Take care not to include another 
"s" extension into your context!

You can do something like
exten => s,1,NoOp(${EXTEN})
which will display in the console, whatever Asterisk thinks was dialled on the 
far end.  If a SIP trunk really is not sending any digits, it can only be used 
for a single incoming line; the calling party will have to send DTMF to select 
an extension once your Asterisk answers.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] No Sangoma ISDN BRI cards detected by goautodial

2016-07-20 Thread A J Stiles
On Wednesday 20 Jul 2016, Yves biganiro wrote:
> Hi all
> 
> Hi,I'm facing a strange  issue where by SANGOMA not detected  by goautodial
> system , 

Is this some kind of one-stop, pre-prepared distribution with Linux, Asterisk, 
DAHDI, a web server and some custom scripts, that all installs from one place?

We really need to know your Asterisk and DAHDI versions.

Type in a root terminal,

# asterisk -V

and note the version number displayed  (it will be on the first line).  Then 
enter

*CLI> dahdi show version

and note the DAHDI version displayed.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] VoiceMail and SMS

2016-07-18 Thread A J Stiles
On Friday 15 Jul 2016, Joaquin Alzola wrote:
> Hi Guys
> 
> I am asking too many questions because we would like to use Asterisk first
> as a proof of Concept and check from there were it goes.
> 
> - Does the Voicemail have the option of SMS notification on new drop
> messages (we have an SMSC so we will use that one). 

Asterisk Voicemail can certainly send an e-mail when a message is left.  By 
cunning use of a procmail recipe, this can be used to send an SMS or do 
anything else.

> - What is the best Linux OS to install Asterisk in?

The one with which you are most familiar.

> - What throughput does it stand 1 machine with about 8GB Ram and 4 CPUs? We
> plan to add  couple but just checking for a single one.

I've seen boxes with 2 cores, 4 GB RAM, 8 outside lines, all calls recorded 
using MixMonitor and no swapping; 4 cores, 8 GB RAM, 20 outside lines on an 
ISDN30 and more via SIP trunks, MixMonitor recording and again no swapping.

> - Does it hava a max capacity?

Probably, but good luck trying to find it  :)  


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] VoiceMail Audio playing

2016-07-15 Thread A J Stiles
On Friday 15 Jul 2016, Joaquin Alzola wrote:
> Hi Madushan
> 
> Maybe I was not clear …. After SIP negotiation and SDP set up on the
> VoiceMail Server ….
> 
> Is there  a file to specify a MGw (the machine that deliver RTP packages to
> end user)?

No.  The VoiceMail server takes care of all that itself; it delivers the 
broadcast and records the messages.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

Re: [asterisk-users] PJSIP defaults for endpoints when using realtime

2016-07-14 Thread A J Stiles
On Thursday 14 Jul 2016, Joshua Colp wrote:
> Carlos Chavez wrote:
> > Until Asterisk 11 I could use sip.conf to set defaults for all phones
> > (language, dtmf, vmexten, etc) and just leave many fields in the
> > database as NULL. What would be the proper way to do this for Asterisk
> > 13 and PJSIP?
> 
> Kia ora,
> 
> PJSIP doesn't have the ability in it to override built-in defaults for
> everything. You have to specify it yourself for realtime. If using
> config files then config file templates can be used to do this.

If the database you are using is MariaDB or MySQL, then you should be able to 
set default values for columns in the table definition.  Then when you do an 
INSERT into only some columns, the rest will be populated with the default 
values.

To alter the structure of an already-created table, use something like

ALTER TABLE stuff CHANGE COLUMN foo foo VARCHAR(20) NOT NULL DEFAULT "wibble";

(Yes, the column name should be there twice: you might want to rename it, so 
you have to specify an old and a new name even if the two are the same.)

You will then need to use something like

UPDATE stuff SET foo="wibble" WHERE foo IS NULL;

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Function SHELL not registered

2016-07-06 Thread A J Stiles
On Wednesday 06 Jul 2016, Michael Jepson wrote:
> Adding live_dangerously did the trick. Thanks! But how dangerous is
> Asterisk living now ?

I must admit, still using an ancient Asterisk version, I didn't know about 
live_dangerously.  But it sort of makes sense.
 

It is somewhat dangerous to have a function that can execute arbitrary system 
commands, especially as root.  Just how dangerous depends on what commands can 
end up being executed.  For instance, it probably would -not- be a good idea 
to include something like

exten => 666,1,NoOp(${SHELL(/sbin/init 0)})

in a dialplan on a production server .


Just be careful what commands you execute and what parameters you feed to 
them.  You might even want to use a wrapper script around anything that could 
misbehave if given a wrong parameter  (especially if the paramters depend on 
anything user-settable);  do a quick sanity-check in the script itself, and 
only execute the "real" command if everything is within the range you expect.


And don't think that blocking SHELL() makes your Asterisk server magically 
safe.  You can still run dangerous system commands from within an AGI script.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] rasberry pi

2016-07-06 Thread A J Stiles
On Wednesday 06 Jul 2016, John Novack wrote:
> AstLinux can be remotely managed with the GUI,
> which unlike other Asterisk GUI's the conf files are not modified by the
> GUI and can be edited "by the book" AstLinux will NOT work with a Pi
> though. It is not for the ARM processor.

What stops it from building properly on armhf architecture?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Function SHELL not registered

2016-07-04 Thread A J Stiles
On Monday 04 Jul 2016, Michael Jepson wrote:
> Hi all,
> 
> I am getting the following error when starting asterisk:
> pbx_functions.c: Function SHELL not registered
> 
> Some of my conf files use a SHELL command, which used to work with an older
> version of asterisk, but now with version 13.9.1 I see this warning in the
> error log. How can I register the SHELL function? From what I can find in
> the wiki's, it should just be available?
> 
> Best regards,
> 
> Michael Jepson

Did you include func_shell in your Asterisk build?

Fortunately, it's no biggie to build a missing module, because the "make" 
command explicitly keeps track of everything it has already done and does not 
need to do again.  Just cd into the folder with your Asterisk source, run 
`make menuselect` and select "func_shell"  (under dialplan functions).  Then 
run `make` and finally `make install`.  

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread A J Stiles
On Monday 06 Jun 2016, Markus wrote:
> Hi AJ,
> Am 06.06.2016 um 10:14 schrieb A J Stiles:
> > But why not call an AGI script, have this check the caller ID against a
> > MySQL database and return a status -- blocked or not -- in a variable? 
> > Then you can manage individual number blocking in a much cleaner, more
> > extensible fashion.
> .  stuff deleted  .
> you're right, it would be the better solution! But I'm simply too lazy
> to implement that. :D

Are you lazy enough to edit a text file and reload your dialplan, *every single 
time* someone calls you, that you don't want to have to speak to ever again?

Not sure about you, but that sounds way too much like hard work for me!  :)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread A J Stiles
On Saturday 04 Jun 2016, Markus wrote:
> Hi list,
> 
> n00b question, but I can't figure it out:
> 
> [callthrough]
> exten => _+X.,1,NoOp(nothing here)
> #include "blockedall.conf"
> exten => _+X.,n(hangup),Hangup
> exten => _+X.,n(nohangup),GotoIf($["${CALLERID(num)}" =
> "anonymous"]?nocli:cli)
> ... more stuff that is handling the call ...
> 
> I'm putting CLIs that I don't want to be able to call my system into
> blockedall.conf:
> 
> exten => _+X.,n,GotoIf($["${CALLERID(num)}" =
> "+493456789"]?hangup:nohangup) exten => _+X.,n,GotoIf($["${CALLERID(num)}"
> = "+492345678"]?hangup:nohangup) exten =>
> _+X.,n,GotoIf($["${CALLERID(num)}" = "+491234567"]?hangup:nohangup)
> 
> But it never moves to "hangup" when I call from any of those CLIs :-(
> 
> BUT, if I include it directly in extensions.conf, it works:
> 
> [callthrough]
> exten => _+X.,1,NoOp(nothing here)
> exten => _+X.,n,GotoIf($["${CALLERID(num)}" =
> "+493456789"]?hangup:nohangup) exten => _+X.,n(hangup),Hangup
> exten => _+X.,n(nohangup),GotoIf($["${CALLERID(num)}" =
> "anonymous"]?nocli:cli)
> ... more stuff that is handling the call ...
> 
> I made sure that "blockedall.conf" actually gets included by executing
> "dialplan show callthrough".
> 
> What am I missing?

You missed that you were jumping past the second and subsequent tests, if the 
first one failed.  But that's already been pointed out.

But why not call an AGI script, have this check the caller ID against a MySQL 
database and return a status -- blocked or not -- in a variable?  Then you can 
manage individual number blocking in a much cleaner, more extensible fashion.

Feel free to ignore me if it sounds like I'm suggesting you walk all the way 
to the tool shed to fetch a chisel, when you know the screwdriver in your 
drawer is already up to the job :)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Questions... connecting Asterisk to the World

2016-05-16 Thread A J Stiles
On Saturday 14 May 2016, Stefan Becker wrote:
> Greetings,
> 
> asterisk list and community,
> 
> I have a problem in how our telefon switch (Siemens HiCOM)
> "talks" with my new configured Asterisk server (V.11.18.0)
> 
> without my Asterisks server in the middle
> 
>  <--> Siemens HiCOM <-ISDN-> NTBA <-...-> PBX Telekom
> 
> A phone connected to the switch requests an "Outgoing" line
> by dialing "0". The party is connected via ISDN to
> the carrier (deutsche Telekom) where the party preceeds
> to dial numbers... and the call is connected
> 
> What I can see while I am dialing is that with every
> digit I press it is being displayed on my phone.
> Further more, these digits are being processed by the
> carrier. The call goes through, rings, immediately on
> completion on the number or is rejected if busy.
> 
> 
> WITH my Asterisks server in the middle of the exchange...
> 
> A phone connected to the switch requests an "Outgoing" line
> by dialing "0". -->  Asterisks recieves incoming call on "s".
> The dialed digits are collected. The dial plan is
> executed accordingly but the "caller" recieves no
> more information about the dialed number. The number is
> not placed in the "dialed" numbers simple functions like
> "redial" do not work anymore.
> 
> Does anybody know what I am doing wrong here. Is there a
> way to teach asterisk to behave exactly as if it were the
> PBX (deutsche Telekom).
> So, as to say, act in a way that NO ONE will rightly know
> the differance between having asterisk taking over the
> function of the ISDN PBX.
> 
> What do I need?  A better dial plan to somehow better simulate
> the way the switch normaly behaves?
> Is hardware the problem?
> 
> 
> My ISDN card in the server is:
> "QuadBRI ISDN Digium Wildcard b410P"
> 
> Most everything else functionly works. incoming and outgoing calls
> from and to ISDN, VoIP and other equipment work fine.
> 
> Just that the phones and switch don't recieve the "collected"
> number sequence the was dialed.
> 
> Any help or ideas anyone might have would be greatly appreciated.


Your problem is that you are still thinking in terms of old-fashioned, clicky-
clicky mechanical telephone exchanges.  Instead of "dialling 0 to request an 
outside line", you need to let Asterisk accept all the digits and then 
determine for itself whether the call is going to be an inside or outside one.

- If the user dials 3 digits  (or however long your internal numbers are),  
treat it as an internal number.
- If the user dials 6 digits  (or however long numbers are on your local 
exchange),  treat it as an external, local number.
- If the user dials 11 digits starting with 0  (or however long a number is in 
your country, including the STD code),  treat it as an external, STD number.
- If the number dials 9 or more digits starting with 00, treat it as an 
external, IDD number.


It will make your dialplan a little more complicated; but if it is too simple, 
you won't be taking full advantage of the power of Asterisk.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Switching between Music on Hold streams. [13.8.2]

2016-05-09 Thread A J Stiles
On Monday 09 May 2016, Jonathan H wrote:
> . {stuff deleted} .
> [streamdemo]
> exten => s,1,Answer
> exten => s,2,BackGround(menu)
> exten => s,3,WaitExten
> exten => s,4,Goto(s,2)
> exten =>
> _[2,3,4,5],1,Dial(Local/${EXTEN}@play-radio,,G(play-radio^${EXTEN}^2))
> exten => _[2,3,4,5],2,Goto(s,2)

You have an error in your dialplan!  The pattern _[2,3,4,5] will match any of 
2, a comma, 3, a comma  (again), 4, a comma or 5.

I think you might mean  _[2345]  which will match any of 2, 3, 4 or 5  (but 
not a comma),  and contains no tautologies.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] click2call for conferencing two mobile numbers

2016-05-06 Thread A J Stiles
On Friday 06 May 2016, Alok Srivastava wrote:
> Dear List
> wanna configure click2call in such a manner that my asterisk box call two
> mobile numbers and connect both numbers to talk. I have configured voip
> gateway, my internal and external calls are working fine.
> please help ,

You ought to be able to do this just using call files.

All you have to do is inject a callfile  (format is explained on the Wiki)  
into the folder /var/spool/asterisk/outgoing/ .  You have to do this within a 
CGI script, so you can pass the two end numbers to that script when the button 
is clicked.

Note that depending on the block size used on the underlying device, you 
probably should first create the file in some temporary location and then mv it 
to ...outgoing/ .  Otherwise there is a danger of Asterisk reading an 
incomplete file and doing nothing.  Only if you know the entire file is 
definitely going to be smaller than one block, can you get away with creating 
it in place.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Compatibilty between agi for asterisk 13.8.0 and php5.6

2016-05-04 Thread A J Stiles
On Wednesday 04 May 2016, Mamadou NGOM wrote:
> Hello everybody,
> When I call my extension  the  agi script don't work well. when I look at
> the cli, that is what I have:
>  [stuff deleted] 
> AGI Tx >> agi_arg_1: 56
> AGI Tx >>
> AGI Rx << SET VARIABLE ** 2
> AGI Tx >> 510 Invalid or unknown command
>  -- AGI Script ***.php completed, returning 0
> I looked on the Internet but I saw a clear answer
> it is sure that it is for the compatibility between php5.6 and agi. if
> somebody can help me.

It looks as though something might be going wrong in the AGI script itself.  
Did you use a "proper" AGI library, or a quick-and-dirty homebrew solution?  
(There is little virtue in walking all the way to the tool shed to fetch a 
chisel, if you know the screwdriver you already have in your drawer can be 
used for the job.  On the other hand, breaking your screwdriver by 
inappropriately using it as a chisel does not look too good either.  Knowing 
the difference is one of the qualities of a great programmer.)

SET VARIABLE is a legitimate enough command, but ** probably is not a 
valid variable name.  Maybe there was a forbidden character in there before 
you redacted it?


I would try to isolate the problem, by writing an AGI script that *just* sets 
a variable to some fixed value and exits; and having a corresponding extension 
that *just* calls the AGI script, displays the variable's value in the CLI 
with a NoOp() statement and then hangs up.  When you know you can do that, and 
successfully read back the value from within your dialplan, *then* you can 
make it decide what value to put in that variable.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] my dahdi dont'n start

2016-04-29 Thread A J Stiles
***  THIS IS NOT WHERE YOUR REPLY BELONGS  ***

On Friday 29 Apr 2016, Mamadou NGOM wrote:
> Hello,
> I have not resolved my problem.I renamed my  dahdi file  "mv dahdi.bash
> dahdi " in the directory /etc/init.d, but it doesn'nt work yet. the same
> error after the command  /etc/init.d/dahdi start
> -bash: /etc/init.d/dahdi: /bin/sh^M: bad interpreter: No such file or
> directory serveurvoix:~#
> thank for your help.
> best regards

No.  "mv dahdi.bash dahdi" was the whole command to rename the file.  The file 
needs just to be called "dahdi"  (without the speech marks)  in the folder 
"/etc/init.d"  (without the speech marks).

If you have copied the file through Windows, the line endings may have become 
corrupted  (I noticed a ^M in your error report).  If so, you should run

# hd dahdi | grep 0d

to check.  If you get any output, this indicates that Windows-style line-
endings are present.  To fix this, you can use

# mv dahdi dahdi.0
# tr -d "\015" < dahdi.0 > dahdi
# rm dahdi.0

after which sequence of commands, you should find that running

# hd dahdi | grep 0d

produces no output.  And then when you type

# service dahdi start

then you should find DAHDI starting up.  If so, then don't forget to run

# update-rc.d dahdi defaults

to ensure DAHDI gets started at bootup from next time onwards.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] "Follow me" with Asterisk that detects cellphone voicemail and similar announcements

2016-04-28 Thread A J Stiles
On Thursday 28 Apr 2016, Robin Kipp wrote:
> Hi all,
> 
> sorry if the subject is a bit confusing, but I just couldn’t think of a
> good way of better describing the situation…
> 
> Basically, I travel a lot and have several SIM cards for my phone from
> local carriers. What I’d like to do now is to setup Asterisk, so that
> people who want to reach me just have to dial one number which forwards
> the call to all my cellphone numbers in turn. I’m still pretty new to
> Asterisk, so I’m unsure which method would be most suitable for this
> scenario.
> 
> Theoretically, I could use the dial function to call one number, then wait
> a few seconds and then dial another number. In practice, this won’t work
> because as soon as a call is answered by the mobile carrier’s voicemail
> the caller would be connected to that, no other numbers would be called.
> So here’s my question: how can I possibly avoid this situation? Is there a
> way for Asterisk to detect such situations and distinguish them from me
> actually trying to answer the call when the correct number is called? Not
> sure if this is technically possible, but figured I’d ask just in case
> there is any sort of solution. I’m aware that it would be best to simply
> use SIP and a SIP client on my phone in order to take the call, but due to
> most carriers blocking SIP traffic on their mobile data networks this
> wouldn’t work as soon as I’m not connected to any WiFi. So, in case
> there’s any solution to this problem I’d greatly appreciate if you could
> share that with me! Many thanks and best wishes,
> Robin

There is no reliable way to distinguish whether a phone was answered by a 
human being or a machine.  

If you can't just disable voicemail on all your SIMs then you will need to find 
out how long each carrier will wait before diverting to voicemail, and then 
make sure the timeouts in your Dial() statements are short enough not to 
trigger the carrier's voicemail.  Then use Asterisk's VoiceMail() application 
to record any message your caller might leave.

You can just chain a whole bunch of Dial() statements one after another within 
an extension because once the first one has been answered, execution will 
proceed to the "h" extension.

If you install ConnectBot on your mobile phone, you should be able to login to 
your Asterisk server each time you swap in a new SIM card, and edit your 
dialplan so the phone you are using today gets tried first.  This could even be 
automated, but talk of such may not be appropriate for a non-commercial list.

Out of politeness to the caller, play them a recorded announcement before your 
bank of Dial() statements, so they know to wait while your Asterisk box 
searches for you.

Finally, remember:  You will be tying up two channels -- and therefore maybe 
two DAHDI spans, depending how the calls are coming into and out of your 
Asterisk box -- with this.  

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] my dahdi dont'n start

2016-04-28 Thread A J Stiles
On Thursday 28 Apr 2016, Mamadou NGOM wrote:
> Hello,
>  it doesn't work my dahdi yet .for information, i use debian 8 .
> I put the file dahdi.bash   in /etc/init.d and I gave it the permission 755
> but i have  the same error: bash: /etc/init.d/dahdi: No such file or
> directory

You need to name the file just "dahdi", not "dahdi.bash"; because the command 
"service dahdi start" is looking for a file just called "dahdi".  If you run
# mv /etc/init.d/dahdi.bash /etc/init.d/dahdi
then
# service dahdi start
should work.

You probably also need to run
# update-rc.d dahdi defaults
to ensure it starts up everytime the computer is booted up.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] my dahdi dont'n start

2016-04-26 Thread A J Stiles
On Tuesday 26 Apr 2016, Mamadou NGOM wrote:
> Hello,
> 
> Having installed DAHDI to be able to use the meetme() application , when I
> start the dahdi service it generates me the following error: -bash:
> /etc/init.d/dahdi: No such file or directory
> I need help please.

You are using a distribution that needs an  (old-style)  initscript to start 
dahdi, but don't appear to have the initscript present.

When you type something like
# service foo start
what happens is dependent on what kind of startup system you are using.  With 
"old-fashioned" initscripts, the computer looks in /etc/init.d for a file 
called "foo" and then tries to execute that file with the parameter(s) you 
supplied  (here "start").  Since there is no file called /etc/init.d/dahdi on 
your machine, then the command is failing.

For your convenience, I've attached the relevant initscript from an older 
DAHDI version  (2.6.1)  but it probably should work OK with yours.  Save it as
/etc/init.d/dahdi
and then run
# chmod 755 /etc/init.d/dahdi
so any user can read and execute it, but only root can write it.

Then it should work.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .


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

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

Re: [asterisk-users] recreating extensions.conf from live dialplan ?

2016-04-14 Thread A J Stiles
On Wednesday 13 Apr 2016, Jeremy Kister wrote:
> On 4/13/16 11:57 AM, A J Stiles wrote:
> > You could try
> > *CLI> dialplan show
> 
> Between my older backup and dialplan show, I guess that's my best shot.
> 
> Thanks :D

I'll have a go this lunchtime at knocking up a Perl script  {for that is my 
language of choice}  to try to recreate an extensions.conf file from the 
`dialplan show` CLI output.  All the necessary stuff seems to be there, even 
labels for GoTo statements .

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] recreating extensions.conf from live dialplan ?

2016-04-13 Thread A J Stiles
On Wednesday 13 Apr 2016, Jeremy Kister wrote:
> with the slip of a finger, i destroyed by extensions.conf (grep -i >
> extensions.conf)
> 
> I have a backup that is dozens of hours of code old.
> 
> is there a way i can use the asterisk cli (or some other asterisky
> method) to recreate that extensions.conf ?

You could try
*CLI> dialplan show
The output from this is not the same format as an extensions.conf file, but it 
will have all the relevant information in it; and it seems to include all the 
relevant infiormation.  So it could be made to look like an extensions.conf 
file, if you really have nothing else -- desperate situations call for 
desperate remedies, and all that .

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Best timing source?

2016-04-06 Thread A J Stiles
On Tuesday 05 Apr 2016, Mamadou NGOM wrote:
> Hello,
> I am doing a configuration for connecting my server asterisk to a SIP
> provider. I ask if somebody can give me a basic code or a link to begin
> well; Thanks 

Rule One:  Start your own topics -- don't jump in on someone else's, unless 
it's actually relevant.

Rule Two:  Type your reply *after* the thing you are replying to.


Your SIP trunk provider will know how to connect an Asterisk box to them.  
That, after all, is what most people are going to be connecting.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Doing asteriksk with a sip trunk

2016-03-31 Thread A J Stiles
On Thursday 31 Mar 2016, Mamadou NGOM wrote:
> Hello !
> I ask if it is necessary to install DAHDI and LIBPRI if we want to connect
> our asterisk to an operator SIP (trunk SIP). Someone for helping me.
> thanks !!!

No.

DAHDI is a library for hardware interfaces to POTS, ISDN and mobile lines.  
LibPRI is a library specifically for primary rate ISDN interfaces  (one Primary 
Rate ISDN = 30 lines).

If you are connecting only SIP phones to your Asterisk server, and it is 
talking to the outside world only via a SIP trunk, then you do not need DAHDI 
or LibPRI.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Is possible to use FXO Digium card like a Fax modem?

2016-03-30 Thread A J Stiles
On Wednesday 30 Mar 2016, Vitor Mazuco wrote:
> Humm thanks for your reply,
> 
> Do you know whats is step for I can transform this card link a fax modem?

Start with the specification document for the modulation scheme you want to 
implement, and the DAHDI Source Code for the card you want to use.

But if you have to ask how to do it, it's probably too hard for you .


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Is possible to use FXO Digium card like a Fax modem?

2016-03-30 Thread A J Stiles
On Wednesday 30 Mar 2016, Vitor Mazuco wrote:
> Hi!
> 
> Is possible to use X100p TDM400P, Tdm410p, Tdm400, A400p, Ax400p or
> any others digium card FXO for use Fax modem?

Yes, in theory it is entirely possible to use an FXO card driven by software 
as a modem  (and indeed, this is exactly what Winmodems do);  although you 
will have to do all the hard work of generating the outgoing tones, and 
decoding the incoming tones, yourself.  This is a highly non-trivial task, and 
there is almost certain to be a better way than this of achieving whatever you 
want.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Phone Number Validation

2016-03-29 Thread A J Stiles
On Tuesday 29 Mar 2016, Rizwan H Qureshi wrote:
> Hi Everyone,
> I need to develop a service which tells me whether a given phone number is
> in service and is valid or not. It can be international number. This is
> basically to clean the list of leads we have. Is there any service which
> can give me the required information?
> 
> I currently have an international numbering plan database which only tells
> me if the given phone number is in valid format up to a certain area code.
> But I need to know whether it will ring or not. Any help will be
> appreciated.

There is exactly one way to find out whether or not a given telephone number 
will answer:  Dial it.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Mobiles not detecting as BUSY until Dial() timeout completes

2016-03-24 Thread A J Stiles
On Thursday 24 Mar 2016, Tony Mountifield wrote:
> In article <201603241343.24128.asterisk_l...@earthshod.co.uk>,
> A J Stiles <asterisk_l...@earthshod.co.uk> wrote:
> > When placing a call over a SIP channel to a mobile phone, if the phone is
> > engaged, it does not return a BUSY status straightaway.  Rather, I get a
> > ringing-out tone for the timeout duration specified in the Dial()
> > statement; *then* I get ${DIALSTATUS}=BUSY.
> Sounds like the mobile line has Call Waiting enabled, and the waiting call
> has been ignored by the recipient until it times out.

Yes, that was what I was suspecting.  Although, the handset I'm using didn't 
appear to acknowledge the second call.

Anyway, at least you gave me somewhere to dig .

Querying with *#43#  (same as BT landline)  brought up a message that Call 
Waiting was deactivated.  I turned it on with *43# and was then able to switch 
back and forth between two callers.

Then I asked someone else, who noticed I was using the "r" option in my Dial() 
statement and suggested removing this.  I turned Call Waiting off again with 
#43# and tried again.  The handset from which I was calling still gave a 
ringing-out tone.  But once this was answered, a further call stopped short at 
the Dial() statement and went straight to the h extension, instead of moving 
onto the next step  (here just a NoOp to display the value of ${DIALSTATUS})  
as though the call had been answered.


Is there something I am missing, or should I be looking towards the telco?


N.B.  I'm actually using realtime config to get the dialplan from a database; 
but this is what it would look like if it was written directly in 
extensions.conf.  The AGI script at step 2 is required because when the call 
comes from a mobile phone, the telco are actually sending the originating SIM 
ID  (the long number that begins with 8944.)  in ${CALLERID(num)}, not the 
actual mobile phone number.  And the Dial() also should be directed to the 
destination SIM ID.

1,NoOp(Call from ${CALLERID(num)})
2,AGI(lookup_caller_id.agi,${CALLERID(num)})
3,NoOp(Caller ID should be ${clid})
4,Set(CALLERID(num)=${clid})
5,Macro(record-on)
6,Dial(${TELCO}/${DEST_SIM_ID},45)
7,ExecIf($["${DIALSTATUS}"="BUSY"]?VoiceMail(${EXTEN},b):VoiceMail(${EXTEN},u))
8,HangUp()


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Updating Asterisk

2016-03-24 Thread A J Stiles
On Thursday 24 Mar 2016, Mamadou NGOM wrote:
> Hello,
> I am asking if it is possible to left from a version to another one  of
> asterisk without reinstalling it. I would like to say for example  is
> there a linux command which allows us to left version 12 to 13. Passage
> from a version to an other one by a sample command.Else, you must install
> it do a migration for a new version. Help me please if you know. Thanks

If your Linux distribution includes pre-compiled Asterisk packages, then you 
can just use your package manager.  Likewise if some third party has created 
pre-compiled packages  (and you trust them).

However, you usually are best off installing Asterisk from Source Code anyway, 
as you can then omit all the bits you don't need  (and it's not hard, if you 
miss a bit you later found you needed after all; just turn it on in menuconfig 
and repeat the make command).


Of course it is possible, when you build Asterisk, to do so as though you were 
building a .deb or .rpm to distribute.  For this you will require another 
computer of the same architecture and running  (a fairly minimal installation 
of, so you can be sure of the dependencies)  the same OS as your Asterisk 
server, and the relevant developer documentation from your distro's homepage.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


[asterisk-users] Mobiles not detecting as BUSY until Dial() timeout completes

2016-03-24 Thread A J Stiles
I'm not sure if this is an Asterisk thing, a handset thing or a telco thing, 
so please be gentle with me if this is not the right place to ask .

When placing a call over a SIP channel to a mobile phone, if the phone is 
engaged, it does not return a BUSY status straightaway.  Rather, I get a 
ringing-out tone for the timeout duration specified in the Dial() statement; 
*then* I get ${DIALSTATUS}=BUSY.

Now, given how far we have moved on since the days of clicky-clicky exchanges, 
it is entirely possible that the mobile phone implicitly supports multiple 
"lines", so you can put an existing caller on hold, talk to the new caller and 
then switch between them as long as they stay on the line .  in which 
case, this behaviour is pretty much what should be expected -- Asterisk 
doesn't know for sure that the remote party really is engaged, because they 
retain the option to put their call on hold and answer you, so it lets the 
timeout run; then, since they were already on a call at the time the first 
signalling message was sent, it sets the dialstatus to BUSY.


Where should I be looking, if I want to reproduce the "old-fashioned" 
behaviour and return an engaged signal straight away?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] How to recognize a name spelled letter by letter ?

2016-03-23 Thread A J Stiles
On Wednesday 23 Mar 2016, Olivier wrote:
> I'm thinking about something to delegate provisionning to end users:
> a new employee joins the company, the system I'm after let him enter his
> own name himself, once for all.

This is generally good, because it means less work for you  :)  Just be 
careful not to automate away so much of your job that you end up writing out 
your own P45 .

> Typing letters through numerical dialpad is not very convenient.
> Using Speech Recognition could be interesting if applicable.

Not so long ago, we all used to use the number pad for writing out text 
messages -- up to 160 characters at a time .

But remember there is almost certain to be a computer next to the phone 
anyway; so you could use a CGI script which injects entries into a database, 
and a cron job  (running as root on the Asterisk server)  to check the 
database every few minutes and do the necessary.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] How to recognize a name spelled letter by letter ?

2016-03-23 Thread A J Stiles
On Wednesday 23 Mar 2016, Olivier wrote:
> Hello,
> 
> I'm wonddering if it is possible, with Asterisk and any third party module
> or service, to build the following feature:
> 
> - caller dials a given extension dedicated to a given language (german,
> english, ...)
> - Asterisk plays a welcome audio prompt
> - caller spells his or her first name letter by letter (for example, caller
> spell "A", "L", "I", ...)
> - Asterisk repeats spelled letters to caller.
> 
> If possible, which module is needed ?
> 
> Best regards

Well, I'd do the whole thing in Dialplan  (it's fairly computationally-
complete per Church and Turing),  but I'm a masochist like that :p

What you need to do is have an inner loop; in which you use WaitExten() with a 
short timeout to read a digit.  If a digit is pressed within the timeout, you 
will get directed to another extension.  There you need to compare the digit 
just pressed against the last digit pressed; and if it is the same, then you 
select the next letter on that key.  Otherwise you announce the last letter 
selected, append it to the name so far, and select the first letter on that 
key.  If you timeout, then you announce the currently selected letter, append 
it to the name so far and set no letter selected.  (This is needed, because 
you may have two letters in succession on the same key; so you must allow it 
to timeout before you can enter the next letter.)  If you timeout with no 
letter selected, you increase a counter; and if this gets to some critical 
number, you repeat the prompt:  Background() the original announcement to 
spell their name, and announce the letters entered so far.  If the 1 key is 
pressed once, backspace  (and after the timeout, announce the remaining 
letters);  two presses within timeout clears the name entered so far and 
starts again from scratch.


So, for example, someone might enter:
2 [set current letter to "A"]
(user waits for timeout) [Store and say "A". Set current letter to ""]
5 [Set current letter to "J"]
5 [set current letter to "K"]
5 [set current letter to "L"]
4 [4 != 5, so store and say "L". Set current letter to "G"]
4 [set current letter to "H"]
4 [set current letter to "I"]
7 [7 != 4, so store and say "I". Set current letter to "P"]
7 [set current letter to "Q"]
7 [set current letter to "R"]
7 [set current letter to "S"]
6 [6 != 7, so store and say "S". Set current letter to "M"]
6 [set current letter to "N"]
6 [set current letter to "O"]
(User waits for timeout) [Store and say "O". Set current letter to ""]
6 [set current letter to "M"]
6 [set current letter to "N"]
* [store and say "N". We now have "ALISON". Go to next context]

For the sake of your own sanity  (or that of your unlucky successor),  use 
maningful labels in your GoToIf() statements; and be sure to comment the 
resulting code liberally, so it looks a little bit less of an unwholesome 
mess.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] One phone, many names / Was: Loss of devices registration (pjsip)

2016-03-22 Thread A J Stiles
On Monday 21 Mar 2016, somsad khan wrote:
> Hello guys,
> 
> I need some help.
> 
> I have a client coming who wants to assign 5 different numbers to one
> virtual employee SIP phone at his desk or softphone (Zoiper).
> 
> which I can assign for the incoming or outgoing both.
> 
> but the problem is which I might not understanding enough, that,
> 
> e.g. when line 1 calls the virtual employee will answer “hello this is xyz
> company how can I help you”
> 
> when line 2 calls the virtual employee will answer “hello this is abc
> company how can I help you”
> 
> So it is important the employee can recognize which line is calling as they
> cannot say the wrong company name by mistake!
> 
> please let me know if there is any possible ways.

Dead easy!  Done this before, in a very similar situation  (agent has to 
answer with a different name, depending on the number the customer dialled).

All you need to do -- as long as the phone you are using is modern enough to 
support it -- is have in your dialplan, before the Dial() instruction to the 
agent's phone, an instruction like
Set(CALLERID(name)=something)
where "something" depends on ${EXTEN}.

For example, if the numbers for the virtual companies are 731615, 701289 and 
718182, and the extension to ring is 301, you might do

[from_pstn]
; 731615 is company ABC
exten => 731615,1,NoOp(Call to 731615)
exten => 731615,n,Set(CALLERID(name)=Company ABC)
exten => 731615,n,Dial(301)
exten => 731615,n,HangUp()

; 701289 is company XYZ
exten => 701289,1,NoOp(Call to 701289)
exten => 701289,n,Set(CALLERID(name)=Company XYZ)
exten => 701289,n,Dial(301)
exten => 701289,n,HangUp()

; 718182 is company PQR
exten => 718182,1,NoOp(Call to 718182)
exten => 718182,n,Set(CALLERID(name)=Company PQR)
exten => 718182,n,Dial(301)
exten => 718182,n,HangUp()


For the agent to be able to dial out presenting different caller ID numbers, 
use prefixes such as 16, 17, 18 to indicate dialling out as different 
companies; 
strip out the prefix using ${EXTEN:2} to recover the number by skipping two 
digits from the beginning, and Set(CALLERID(num)=) as appropriate.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

[asterisk-users] *SOLVED* Re: Dialplan question: Variables in GoTo() ?

2016-03-10 Thread A J Stiles
On Thursday 10 Mar 2016, Joshua Colp wrote:
> I wrote:
> > I can't seem to find a definitive answer on this, and I really don't want
> > to risk breaking a production server to find out; so I am going to try
> > asking this here, and maybe anyone else in the same situation searching
> > the archives sometime in future will find the answer I get.
> > 
> > Can you use variables in the target of a GoTo() statement?
> > 
> > What I am specifically thinking of is this;
> > 
> > [from_some_source]
> > exten =>  s,1,AGI(look_up_stuff.agi,${CALLERID(num)},${EXTEN})
> > ; this AGI script sets variables: next_context, next_ext, next_step
> > exten =>  s,n,GoTo(${next_context},${next_ext},${next_step})
> > 
> > Will this work?  Does Asterisk evaluate expressions like this, or does it
> > expect literals?
> 
> It most certainly will work. It evaluates on use.

Thanks very much.  I tried it, and it worked beautifully.  Exactly as I 
expected.  

There is something a little bit "ZX Spectrum BASIC" about an evaluated GOTO, 
but sometimes it's the least messy way of accomplishing something.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


[asterisk-users] Dialplan question: Variables in GoTo() ?

2016-03-10 Thread A J Stiles
I can't seem to find a definitive answer on this, and I really don't want to 
risk breaking a production server to find out; so I am going to try asking this 
here, and maybe anyone else in the same situation searching the archives 
sometime in future will find the answer I get.

Can you use variables in the target of a GoTo() statement?

What I am specifically thinking of is this;

[from_some_source]
exten => s,1,AGI(look_up_stuff.agi,${CALLERID(num)},${EXTEN})
; this AGI script sets variables: next_context, next_ext, next_step
exten => s,n,GoTo(${next_context},${next_ext},${next_step})

Will this work?  Does Asterisk evaluate expressions like this, or does it 
expect literals?


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Dial your phone and contact phone from within outlook?

2016-03-03 Thread A J Stiles
On Wednesday 02 Mar 2016, Ryan, Travis wrote:
> I am wondering what the best solution is for initiating a call from Outlook
> Contacts. I imagine something that would start the call from the outlook
> card (or similar) and then dial the user's extension and the contact's
> phone number and place them in a bridge.
> 
> Anyone use something like this?

I'm not familiar with Outlook; but I imagine it must have the ability to run 
external helper programs, substituting placeholders in the command line with 
fields from the contact's database record, to perform actions such as dialling 
numbers.

Here, we use Kontact  (part of KDE)  which definitely has such an ability.  So 
I configured it to use wget to fire off a request to a CGI script which 
generates 
a call file; then you just click to dial a contact's number, your phone begins 
to ring, you answer it and the remote contact's phone begins to ring.

The backend script is fairly simple.  We can determine the extension number 
nearest to the user from their IP address  (the DHCP server is configured 
always to offer the same IP address to the same hardware address, so 
workstations effectively have static IP addresses),  which will be passed to 
the script by the Apache server.

If you can fire off a wget request when clicking on a number, you should be 
good 
to go.  (You can request a non-existent script at first; the request will show 
up in /var/log/apache2/error.log .)  If you need help with the script, ask 
again  :)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Asterisk 13.6.0/The simplest TCP configuration does not work

2016-02-17 Thread A J Stiles
On Wednesday 17 Feb 2016, Sonny Rajagopalan wrote:
> OK. Let me ask this. Is anything else necessary, except choosing TCP as the
> preferred protocol on the client, to make TCP w Asterisk work? At the
> moment, I have only changed one line in pjsip.conf from my working UDP
> setup:
> 
> [transport-tcp]
> type=transport
> protocol=tcp ; <--- only this line was changed.

Presumably you have firewall rules in action. Did you enable TCP on port 5060?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] SIP URI set 'telephone-context='

2016-02-17 Thread A J Stiles
On Wednesday 17 Feb 2016, imperium broadcast wrote:
> I kinda have it working with chan_sip.
> 
> Dial(SIP/+${EXTEN}\;phone-context=+44@10.10.10.10;user=phone)
> But it doesn't include the user=phone at the end when dialling out.
> 
> "To: ".
> 
> even adding
> usereqphone=yes
> to the sip.conf doesn't add the user=phone to the end unless I remove the
> the sip uri stuff out of the dial string.
> 
> Ideally I would like it to look like this
> INVITE sip:118099;phone-context=+44@10.10.10.10:5060;user=phone
> Or
> INVITE sip: 118099@10.10.10.10:5060; user=phone; phone-context=+44
> 
> It doesn't matter which way I do it I can only include one extra parameter
> and not the two (user=phone;phone-context) as Asterisk ignores the second
> one.

That's because in the Asterisk dialplan, a semicolon is used to denote a 
comment  (on account of the comment mark being a valid DTMF digit).  So you 
will have to insert a backslash before the semicolon before user=phone .

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] 1000 analogue lines with asterisk

2016-02-17 Thread A J Stiles
On Wednesday 17 Feb 2016, Goke Aruna wrote:
> Hello all,
> Can someone recommend what hardware to use for a 1000 analogue line
> capacity asterisk PABX?
> 
> Regards

A PCI express card with four primary rate ISDN ports, each linked up to a 
channel bank, will give you 120 analogue lines.  So you will need nine such 
cards; and for reasons of simple numbers of slots on a motherboard, they will 
have to be split among three or more servers, linked to a gigabit switch.

You might end up getting a better deal if you bought 1000 hardware SIP phones.  
(You also would probably increase your personal indispensability factor, into 
the bargain .)

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] sql schema without alembic

2016-02-04 Thread A J Stiles
On Thursday 04 Feb 2016, Marek Červenka wrote:
> hi,
> 
> is there way to get SQL schema for Asterisk 13.7.0 without alembic?
> thanks

Assuming you already have Asterisk up and running, you can just use

$ mysqldump -d -uroot DATABASE TABLE1 TABLE2 TABLE3 ...

will print  (on STDOUT, so you can just use > to write it to a new file, >> to 
join onot an existing file or | to pass it through a program)  the SQL 
statements required to recreate the given tables in the given database.  (If 
you don't specify any tables, it will assume you mean all of them.)

The -d means "don't dump any data", so it will dump just the CREATE statements 
and not the INSERT statements that would actually populate the database.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

Re: [asterisk-users] asterisk 13 mixmonitor - random missing syllables

2016-01-27 Thread A J Stiles
On Wednesday 27 Jan 2016, Marek Červenka wrote:
> Dne 27.1.2016 v 13:14 A J Stiles napsal(a):
> > On Wednesday 27 Jan 2016, Marek Červenka wrote:
> >> hi,
> >> 
> >> i have strange problem with asterisk 13 mixmonitor, recording to wav
> >> (centos6)
> >> when the system is under load, there are sometimes missing syllable
> >> 
> >> there arent BIG spikes on cpus
> >> recordings are to ramdisk (/dev/shm)
> >> 
> >> any hints?
> > 
> > First, try recording to a real disk  (preferrably a separate drive, so
> > nothing else will be seeking the heads about; and connected by SATA, not
> > USB, for full speed).  Does that work any better?
> 
> i tried before. IO is not the problem

Are you saying that it records fine when you use a real disk, but not with a 
ramdisk?

And why are you using a ramdisk for your mixmonitor recordings?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

Re: [asterisk-users] PJSIP Stun/ICE

2016-01-27 Thread A J Stiles
On Wednesday 27 Jan 2016, James Cloos wrote:

> I gave up switching my edge asterisk to pjsip at least twice because I
> couldn't figure out how to configure it properly for a dynamic ip.  And
> I sent a note to one of the lists at least on the 2nd attempt.
> 
> That install doesn't need nat for sip/rtp since it runs on the router,
> but it does need to handle dynamic ip.

Why does it need to handle dynamic IP?

If you are paying for a business-grade Internet connection, you should get a 
static IP address -- or a block of them -- as standard.  Maybe you need to 
change your ISP?


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] asterisk 13 mixmonitor - random missing syllables

2016-01-27 Thread A J Stiles
On Wednesday 27 Jan 2016, Marek Červenka wrote:
> hi,
> 
> i have strange problem with asterisk 13 mixmonitor, recording to wav
> (centos6)
> when the system is under load, there are sometimes missing syllable
> 
> there arent BIG spikes on cpus
> recordings are to ramdisk (/dev/shm)
> 
> any hints?

First, try recording to a real disk  (preferrably a separate drive, so nothing 
else will be seeking the heads about; and connected by SATA, not USB, for full 
speed).  Does that work any better?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

Re: [asterisk-users] asterisk-users Digest, Vol 138, Issue 19

2016-01-26 Thread A J Stiles
On Monday 25 Jan 2016, waqas.mehmood90 wrote:
> I am working on asterisk ivr .i am facing problrm in crontab.when i run
> example it give bash 5:command not found then i check and found that no
> crontab for root user kindly guide me please

Hello, is that the vet?  One of my animals is poorly.  What should I do?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] is there some blocking in 11.21.0

2016-01-22 Thread A J Stiles
On Thursday 21 Jan 2016, Jerry Geis wrote:
> >Not really. Very little info to go on so far. You need to give us
> >more detail of what you are doing with AGI and AMI.
> 
> Sorry - let me try again...
> 
> 
> I am basically doing the following:
> 1) calling a phone SIP/401 upon answer run an AGI for voice prompts etc...
> to select AUDIO groups
> 2) when done setup to return to the dialplan - exit AGI
> 3) issue AGI that calls those groups selected (SIP/430 & SIP/431) at the
> moment to bring into a conference.
> 4) Wait 10 seconds
> 5) jump SIP/401 into conference
> 6) speak live to endpoints.
> 
> However my issue is such that step 3 above "seems" to block until after
> step 5.
> 
> My Manager AMI connection reports success in step 3:
> 21-Jan-16 01:02 pm asterisk_pa_list() manager_str Action: Originate[CR ][LF
> ]Async: Yes[CR ][LF ]Channel: SIP/430[CR ][LF ] (truncated)
> 21-Jan-16 01:02 pm asterisk_pa_list() manager_str return Response:
> Success[CR ][LF ]Message: Originate successfully queued[CR ][LF ][CR ][LF ]
> 
> I was expecting the jump into conference from step 3 to go ahead and do the
> request - not wait till after step 5.
> 
> Does this help? What am I not doing right so the calls in step 3 happen WAY
> before the 10 seconds is complete?

It's not *that* helpful, because you are playing your cards way too close to 
your chest; we don't even know what language you are using for your AGI.  So 
the following may be no help at all to you, but is included anyway for the 
benefit of anyone else searching the archives a few years down the line.


AGI scripts that do not need to interact with the dialplan anymore should 
fork() and then, in the parent process, exit(0).  The child process must then 
close STDIN, STDOUT and STDERR as soon as possible; the dialplan will carry on 
executing when they are closed, and the child process is free to carry on 
doing its own stuff independently.


In Perl, do *not* do it like this:

fork && exit 0;
close STDIN;
close STDOUT;
close STDERR;

in case fork fails and returns an undefined value; the "child process" will 
continue under the parent's PID.  Do it properly:

if ($child_pid = fork) {  #  parent process
exit 0;
}
elsif (defined $child_pid) {  #  child process
close STDIN;
close STDOUT;
close STDERR;
#  carry on doing stuff
}
else {  #  fork failed
die "Could not fork";
#  tidy up mess as best we can
};


PHP's pcntl_fork() returns -1 if it fails  (process numbers are always 
positive).  So the equivalent code in PHP would be:

$child_pid = pcntl_fork();
if ($child_pid < 0) {  //  fork failed
die("Could not fork");
}
elseif ($child_pid) {  //  parent process
exit(0);
}
else {  //  child process
fclose(STDIN);
fclose(STDOUT);
fclose(STDERR);
//  carry on doing stuff
};

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] is there some blocking in 11.21.0

2016-01-21 Thread A J Stiles
On Thursday 21 Jan 2016, Jerry Geis wrote:
> I am using the AMI interface to start calls.
> 
> At one point I have a 10 second delay "Wait(10)" in the dialplan...
> During this time it "seems" that if I then connect with the manager
> interface
> and place a call that nothing happens till the 10 seconds is done...
> 
> I am requesting Async yes...
> manager_str Action: Originate[CR ][LF ]Async: Yes[CR ][LF ]Channel:
> SIP/430[CR ][LF] (this is the first part of the AMI string)
> 
> How can I get past that... I want the other call to happen right away.

Use Priority: to begin at the dialplan step after the Wait() command.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] 488 Not acceptable here

2016-01-20 Thread A J Stiles
On Wednesday 20 Jan 2016, bilal ghayyad wrote:
> Hello List;
> I am facing a trouble with a sip trunk on asterisk 1.4 and asterisk 1.8 and
> I am getting the following debug, can someone advise me about the
> solution: <--- SIP read from Provider_IP_Address:5083 --->INVITE
> . [stuff deleted] .
> [Jan 18 10:52:37] VERBOSE[2421] logger.c: [Jan 18 10:52:37]<---
> Reliably Transmitting (no NAT) to Provider_IP_Address:5083 --->SIP/2.0 488
> Not acceptable here Via: SIP/2.0/UDP
> Provider_IP_Address:5083;branch=z9hG4bKn1va9h109091cms8h5a0.1;received=Pro
> vider_IP_Address From: "1828444" ;tag=rrZpHF51Z7a6D To:
> ;tag=as5d16dbaf Call-ID:
> 6bba7f72-3874-1234-0b95-0090fb3d96e0-UASession-CX9lUh8LWc-UASession-kOSBFq
> loi5 CSeq: 1 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL,
> OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported:
> replaces Content-Length: 0 <>

"488 Not acceptable here" usually means that negotiation failed for want of 
any mutually-supported codec.  Make sure that you have "alaw", which is the 
native format used by the PSTN in civilised countries  (and therefore, there 
is little need to use anything else unless you know you will never want PSTN 
connectivity),  enabled at your end.


Can you run this command and post the output?  (It should all be on one line, 
but my mail client or yours may have eaten it)

$ awk '/[[]|allow/&&!/^[ \t]*;/{printf "%6d:%s\n",NR, $0}' 
/etc/asterisk/sip.conf

This will look for [section headers] in square brackets and lines containing 
"allow" (which also will catch "disallow") that are not commented out, in your 
SIP configuration, and print them out with line numbers.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Segmentation Fault Asterisk 13.7.0-rc2 (libmysqlclient?)

2016-01-19 Thread A J Stiles
On Monday 18 Jan 2016, Matthew Murphy wrote:
> Hi everyone,
> 
> I am getting a segmentation fault (seems to occur randomly) using Asterisk
> 13.7.0-rc2 with PJProject 2.4.5. It appears to be something that
> libmysqlclient is complaining about when doing a query in
> ps_endpoint_id_ips. We are using Asterisk Realtime. This also seems to
> occur in Asterisk 13.5.0.

Which bits did you compile from Source Code yourself, and which bits  (if any)  
are precompiled by your distribution?  What is your libmysqlclient version?

If you are using some sort of Ubuntu / Debian-based distribution, could it 
possibly have done a sneaky `apt-get upgrade` behind your back?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] asterisk-users Digest, Vol 138, Issue 8

2016-01-13 Thread A J Stiles
On Wednesday 13 Jan 2016, waqas.mehmood90 wrote:
> How to get user extention no in agi php scrip from which he's calling on
> ivr i am using cid and able to get his name but not his extention no
> please help me

Within the dialplan, what you are looking for would be ${CALLERID(num)} .  So 
you could just pass this as a parameter to your AGI script.  BUT, it may well 
be already there as an environment variable within the script.

Try writing a "dummy" AGI script that simply dumps the environment array to a 
temporary file and then returns to the dialplan.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] no ringing tone with Dial option r

2015-11-04 Thread A J Stiles
On Tuesday 03 Nov 2015, sean darcy wrote:
> On 11/01/2015 12:38 PM, sean darcy wrote:
> > I'm not getting any ringing when I use option r with Dial:
> > 
> > Dial("DAHDI/1-1", "motif/8447/+1@voice.google.com,,rTt") in
> > new stack
> > 
> > Otherwise all works. The call goes through, good audio.
> > 
> > sean
> 
> FWIW, 11.18.0 on Fedora 22.
> 
> sean

Make sure you have an Answer(), or some command that does an implicit 
Answer(), somewhere in the dialplan before the Dial() statement with the r 
option.  Been bitten that way before .

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


[asterisk-users] OpenVox G400P / G400E -- a warning

2015-10-12 Thread A J Stiles
I recently had a nightmare building up some servers with these OpenVox cards.

Although I have used them successfully in the past, the chan_extra driver 
building process has always been highly temperamental  (although to be fair, 
they have always worked fine once any necessary tweaking was done).

However, chan_extra will not build against the latest DAHDI; and older DAHDI 
versions will not build against the stock kernels in Debian Jessie or Ubuntu 
Precise.  I was just fortunate that the motherboards worked with Debian 
Wheezy.

OpenVox have advised that the G400P/E is an end-of-life product and as such, 
updating its drivers is not a priority for them.  And I am not sufficiently 
qualified in low-level programming to fix this myself.  They recommend their 
GSM 
gateways  (which I have not yet evaluated)  instead.


If anyone is thinking of using these cards for a project in the near future, 
make sure the motherboard that you are about to use will boot an old kernel  
(Wheezy has 3.2.0-4)  in order to be able to use sufficiently old versions of 
Asterisk and DAHDI  (1.8.22 and 2.7.0 + 2.7.0 definitely work with chan_extra 
2.0.8; I grabbed the .tar.gz files straight out of /usr/src on a similar 
machine I built earlier).  And it probably wouldn't be the best idea to have 
the machine facing the public Internet while it's running such obsolete 
software.  Fortunately, these ones will be safely on the inside of a firewall.


See also here:  http://www.openvox.cn/forum/gsm-wcdma-series/2910-g400e-
chan_extra-2-0-8-needs-old-software.html


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] caller id spoofing/setting on analog

2015-09-28 Thread A J Stiles
On Friday 25 Sep 2015, Ryan, Travis wrote:
> I've not used analog for quite some time. It seems it's not possible in
> asterisk to spoof a phone number/name on an analog call?

Probably not if you are using an analogue FXO connection to the exchange; 
because there is no standardised way of communicating supervisory information 
over such a link.

In any case, changing the caller identity information is a telco-dependent 
feature.  Not all telephone companies support changing it; and even the ones 
that do, may well restrict you to using only numbers that belong to you.


Of course, if you have an analogue telephone plugged into your Asterisk 
machine with an FXS adaptor, then *you* are the telco -- and can send whatever 
ident you like to phones thus connected.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Asterisk app_mp4 problem

2015-09-10 Thread A J Stiles
On Thursday 10 Sep 2015, 陳伯濤 wrote:
> Hi,
> 
> I install Asterisk app_mp4, and use mp4save to record mp4 video file, then
> we can play the recorded mp4 file by using mp4play. But the recorded mp4
> file can not be played by MS media player or Quick Time Player. And we
> download mp4 file from internet, it can not be played by app_mp4. What’s
> the problem?

A misconfiguration somewhere.


I'm afraid that's as much of an answer as anyone will be able give you without 
further information.  So, it is time to get out your magnifier and deerstalker 
hat :)

Can you play the mp4 recordings you have made from app_mp4 using ffmpeg / 
avconv?
What does ffprobe / avprobe make of the downloaded mp4 files that app_mp4 won't 
play?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

Re: [asterisk-users] Single SIP User on multiple location

2015-09-02 Thread A J Stiles
On Wednesday 02 Sep 2015, Avanish Shahi wrote:
> Now I’m trying to solve following problem. I have a requirement that
> each employee should have SIP phone at home, SIP phone in office,
> cell phone with same user.
> 
> 
> I want all those 3 phones to be “one extension”. So, if someone calls
> our company number and dials my extension - I’d like 3 phones to ring
> at the same time.
> 
> 
> e.g. Extension 555 for all the places and when anyone dial the
> extension 555 then it should ring at all the places simultaneously and
> user can pick any extension as desired.


exten => 555,Dial(SIP/555/7555/G1/07x)
will dial 555 and 7555 on the SIP trunk, and 07x via a hardware 
telephony card, until one of them answers.

You probably will want to use an AGI script to look up in a database the 
mobile number associated with the extension number; it will keep the dialplan 
sane.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

Re: [asterisk-users] Call Queues : linear strategy WITH priority

2015-08-12 Thread A J Stiles
On Wednesday 12 Aug 2015, Jonas Kellens wrote:
 Hello
 
 I was wondering of it is possible to have Queue Agents with the same
 priority (penalty) but with a certain order ?
 
 So I have 20 Agents.
 
 Agent 1 till Agent 10 has penalty 1.
 
 Agent 11 till Agent 15 has penalty 2.
 (only contacted if 1 - 10 are busy)
 
 Agent 16 till Agent 20 has penalty 3.
 (only contacted if 1 - 10 and 11 - 15 are busy)
 
 Within the range of Agent 1 till Agent 10, can I have a certain order in
 these Agents in which they are rung ?? Like Agent 1 - Agent 5 - Agent
 2  3  4 - Agent 6 - Agent 7 - Agent 8  9  10.

What's wrong with giving agent 1 penalty 1; agent 5 penalty 2; agents 2, 3 and 
4 penalty 3; agent 6 penalty 4, agent 7 penalty 5, and so forth?

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] How many Asterisk deployments?

2015-08-07 Thread A J Stiles
On Friday 07 Aug 2015, Tech Support wrote:
 All;
 
 I know that there is no way to determine an exact number, or even a
 close number, but does anyone know a ballpark figure of how many Asterisk
 deployments are out there worldwide? How about the percentage of Asterisk
 PBX's compared to the total number of PBX's out there? Do our friends at
 Digium ever think about things like this?


Well, I'd guess everyone who administers or co-administers an Asterisk PBX at 
work probably also has one at home for experimenting on  (whether or not it's 
patched through to their office system);  perhaps even with some antique 
telephones plugged into it via an FXS card .


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] PTT push to talk solution

2015-08-06 Thread A J Stiles
On Thursday 06 Aug 2015, Jerry Geis wrote:
 I am looking for a push to talk solution does anyone know of a good
 PTT phone one that works with asterisk.

Um .  Asterisk supports full-duplex telephony, so there's no need for any 
of that over to you, roger and out business -- you can actually talk in both 
directions at once  (assuming your voices are pitched far enough apart for 
each of you to be able to understand what the other is saying).

You could try wiring the normally-closed contact of a change-over switch 
across the microphone in the handset of any compatible phone .  that 
should silence it until the switch is pressed.

-- 
AJS

The best programming language is 63% tin, 37% lead.

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

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


Re: [asterisk-users] Looking for PRI Card with automatic fail over

2015-08-04 Thread A J Stiles
On Monday 03 Aug 2015, Eric Klein wrote:
 Hi all,
 
 Strange request, I have a customer where we are putting an Asterisk PBX in
 front of a legacy (non-VoIP) PBX. One of the requirements it that the
 Asterisk PBX have 2 PRI ports (on towards the legacy PBX and one towards
 the carrier) with the ability to go to pass through should the Asterisk PBX
 (software or hardware level) fail.
 
 I did not see this feature in the Digium, Sangoma, Allo, or OpenVox cards.
 
 Does anyone know of a card that will do this? I know that Digium has an
 external box (the r850) that does something similar for 2 PBXs making them
 high availability, but in this case I only have the 1 Asterisk box acting
 as a gateway and passing some calls out over SIP and IAX2.
 
 Any suggestions would be appreciated.

Use a 4-pole change-over relay to switch the PRI connection either to the 
Asterisk box if it gets some sort of heartbeat signal from the computer  
(say, toggling one of the lines of a printer port, if the motherboard still 
has one),  or the old PABX?

You might have to do some mean, down and dirty low-level programming, to embed 
your heartbeat-generating code in Asterisk's idle loop; but the Source Code is 
out there, if you fancy the challenge .

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Call Center

2015-08-03 Thread A J Stiles
On Saturday 01 Aug 2015, Murthy Gandikota wrote:
 Hi All
 
 Has anyone used Asterisk for a Call Center operation? What I mean is: given
 a list of phone numbers, can Asterisk dial each number, play a message and
 accept some DTMF?

Yes it can, very easily.  But before you go too far, you need to know there 
are laws against exactly that sort of thing.  You need a human being on the 
end of the phone.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Windows Asterisk Help

2015-07-31 Thread A J Stiles
On Wednesday 29 Jul 2015, Murthy Gandikota wrote:
 Hi All,As
 Downloaded latest version of Asterisk from www.asteriskwin32.com and
 installed on Windows 7.

Why?

Trying to get Asterisk to run on Windows is like trying to teach a gerbil to 
bark.  It's an extraordinary effort, and the result is unlikely to do anything 
other than disappoint.


* Asterisk was designed from the outset to run on Unix-like systems, and has 
certain design decisions baked into it that preclude it from building on 
legacy systems such as Windows without serious modifications.  Any version of 
Asterisk that has been persuaded to run on Windows will be behind the curve, 
and missing the latest and greatest features.

* Asterisk, even on its native Linux platform where all the bits work 
properly, is harder to use than Linux.  The supposed advantage of not 
needing to learn to use Linux is negated by the steeper learning curve of 
Asterisk.

* Asterisk doesn't make too many demands of hardware, except for preferring to 
have its hardware all to itself.  You can try it out on a scrap PC  (available 
free almost anywhere)  at first and then, if you like it, install it on a 
dedicated machine.  If you don't need dedicated PCI / PCI express hardware, 
then you can even run Asterisk on something like a Raspberry Pi.


If you want to run Asterisk, then you might as well bite the bullet and run it 
on Linux.   Also, forget about pre-compiled packages, just build it from 
Source Code.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] How to enable group call

2015-07-16 Thread A J Stiles
On Thursday 16 Jul 2015, Thyda ENG wrote:
 I would like to see how can we config the asterisk to enable calling to
 multiple SIP number at the same time?

If you want to have a number that will call several phones when dialled, you 
can do it in the Dial() command.  The following example refers to an office 
where the numbers are in the range 201 - 208.  You can call any staff member by 
dialling their extenson number; or if you just want someone, anyone from that 
office, you can ring all available extensions in the office by dialling 200.  
The 
office manager has a company-issued mobile phone, for when she is away from her 
desk; we want this to ring whenever her desk phone is called, but *not* from a 
call to 200, since the latter case -- a call to any available member of 
technical staff -- is likely to be a call for help, and we want someone who is 
able to attend.

We also have a direct line to the manager's mobile on 209.

[b_building]

; 201 is B building technical office manager
exten = 201,1,NoOp(Call to 201)
; call her desk  (via SIP)  and her company mobile  (via GSM card)
; NB: timeout here *must* be shorter than the mobile company's voicemail
; timeout -- otherwise this, and not our voicemail, will always answer the
; call. Which is not what we want.
exten = 201,n,Dial(SIP/201${GSM}/${LOZ_MOBE},30)
; this step will never be executed, if the call was answered
exten = 201,n,VoiceMail(201,u)
exten = 201,n,Hangup()

; 202 to 208 are the rest of phones in tech office in B Building
exten = 20[2-8],1,NoOp(internal call to ${EXTEN})
exten = 20[2-8],n,Dial(SIP/${EXTEN},60)
exten = 20[2-8],n,VoiceMail(${EXTEN},u)
exten = 20[2-8],n,Hangup()

; 209 calls the tech office manager's mobile
exten = 209,1,NoOp(call to tech office manager)
exten = 209,n,Dial(${GSM}/${LOZ_MOBE},60)
exten = 209,n,VoiceMail(201,u)
exten = 209,n,Hangup()

; 200 calls *all* phones in B Building tech office
exten = 200,1,NoOp(internal call to 200)
; Mark this call as special
exten = 200,n,Set(CALLERID(name)=SUPPORT CALL)
; Don't bother calling Lauren's mobile; if she is not in the office,she probably
; can't do much anyway
exten = 
200,n,Dial(SIP/201SIP/202SIP/203SIP/204SIP/205SIP/206SIP/207SIP/208,60)
; if nobody answered within a minute, divert back to Lauren's answerphone
exten = 200,n,VoiceMail(201,u)
exten = 200,n,Hangup()

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Problem no voice

2015-07-16 Thread A J Stiles
On Wednesday 15 Jul 2015, Luca Bertoncello wrote:
 But it seems, that I found the problem, adding:
 
 disallow=all
 allow=g729
 
 to the configuration of the peer for this number...

You need the following;

disallow=all
allow=alaw

in the configuration for *every* device.  There is literally no point using any 
other codec for calls which will be connected to the PSTN; because the PSTN 
itself uses a-law, and probably will force *you* to do the transcoding your 
end, as punishment for daring to be different.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Asterisk SMS

2015-07-10 Thread A J Stiles
On Friday 10 Jul 2015, Thyda ENG wrote:
 Dear Sir,
 
 Does the asterisk support SMS feature ?
 If it does how can we config that ?
 I am waiting for your reply,Thank.

You need a suitable GSM card.  We have used the OpenVox G400P / E400E series.  
This has a facility for sending SMS directly via the Asterisk CLI  (and hence, 
any programming language that can issue a system() command).  It can be 
obtained with up to four GSM modules, which are also available separately if 
you need to upgrade a card with only one, two or three.

Note that whilst every telco will promise you unlimited text messages on 
their SIM-only, pay-monthly contracts, in practice, they will cut you off for 
bogarting bandwidth in a heartbeat if you send too many messages too quickly 
for too long at a stretch.  What that actual limit is, seems to be a secret 
more jealously guarded than the Windows Source Code; and the easiest way to 
find out seems to be to exceed it.


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] Call Return

2015-07-09 Thread A J Stiles
On Wednesday 08 Jul 2015, Andrew Colin wrote:
 Hi Guys
 
 
 
 I am trying to write a macro for a call return so for example
 
 Anyone in the company transfers a call to another extension and it is not
 answered etc it must return to the person who did the transfer
 
 I have got it working but if the call originates externally for example
 someone calls in to the switchboard and they transfer it then it tries to
 return to the outside caller.
 
 As doing a return to ${EXTEN}) wont work as that is the external party.
 
 How do I declare a variable from the extension dialed?
 So for example when 200 dials 201 I can capture the calling party(in this
 case 200) and declare it as a variable?

You need to set a variable quite early in your extension logic, using a Set 
command;

Set(dialled=${EXTEN})

and then later you can retrieve it as ${dialled} .  This variable will persist 
across context jumps, even although ${EXTEN} may have changed.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


Re: [asterisk-users] How to handle multiple lines call

2015-07-08 Thread A J Stiles
On Wednesday 08 Jul 2015, Thyda ENG wrote:
 Hi,
 
 I am new to asterisk, I have set up the asterisk server and successfully I
 could make the dialplan between 2 SIPs but when there are more than two
 sips calling each other, my dialplan seems doing the wrong routing to the
 sip. Do i need to config anything additionally to asterisk to handle this?
 
 Example:
 we have 6 sips
 -sip 1 is calling to sip 2
 -sip 3 is calling to sip 4
 -sip 5 is calling to sip 6
 
 Here is my configuration,
 exten = _.,1,Dial(SIP/${EXTEN})

That looks about right, but it's not quite enough information.

Your sip.conf should have the SIP device descriptions in sections labelled [1] 
, [2] , [3] , [4] , [5] and [6] , since the bit between the square brackets is 
what gets matched against the SIP/ bit in the Dial() statement.

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


  1   2   3   4   5   6   >