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