Re: [asterisk-users] Voicemail: saycid without prefix

2015-07-07 Thread A J Stiles
On Monday 06 Jul 2015, Luca Bertoncello wrote:
> John Kiniston  schrieb:
> > The easiest solution may be to strip the leading zero's off your caller
> > ID before your caller enters the Voicemail app to leave you a message.
> > 
> > 
> > ExecIf(REGEX("^[0][0]."
> > ${CALLERID(NUM)})?Set(CALLERID(num)=${CALLERID(NUM):2}))
> 
> Thanks!
> 
> I already had this idea and implemented it.
> It works...

Even better, if the first 4 digits are "0049", you could replace them with "0" 
as though it was an inland call:

ExecIf(REGEX("^0049." 
${CALLERID(NUM)})?Set(CALLERID(num)=0${CALLERID(NUM):4}))

-- 
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] Choosing codecs

2015-07-06 Thread A J Stiles
On Monday 06 Jul 2015, Luca Bertoncello wrote:
> Zitat von A J Stiles :
> > Yes.  You should definitely be using A-law for calls to the Outside
> > World.
> 
> Well, I wanted to change these settings, but I'm not sure, where I
> have to do that...
> I think in the users.conf, but I think, the "allow" keywords is for
> the network...
> 
> How can I change this setting?

It will be in the /etc/asterisk/*.conf file for the appropriate calling 
technology.  So if the calls are going over a SIP trunk, it will be in 
sip.conf .  You want

disallow=all
allow=alaw

There probably will be some other allow= lines; just stick a semicolon in 
front of the ones you do *not* want, to comment them out.  Then issue

core reload

in Asterisk CLI, and all your calls should be A-law from now on.

-- 
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] Choosing codecs

2015-07-06 Thread A J Stiles
On Monday 06 Jul 2015, Luca Bertoncello wrote:
> So, I think, I should try to force the using of alaw for this phone,
> is it right?
> Usually we don't call mobile phones from our landline...

Yes.  You should definitely be using A-law for calls to the Outside World.

If you use a different codec, then your telephone company will either transcode 
it for you  (if it is one they understand)  or just block the call  (if not).  
Even if you are trying to use A-law to call a mobile phone, the transcoding to 
GSM for the final leg to and from the handset will be taken care of by the 
mobile company's equipment.

-- 
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] Choosing codecs

2015-07-06 Thread A J Stiles
On Monday 06 Jul 2015, Luca Bertoncello wrote:
> Well, but for voice quality, which codec is better?
> alaw or gsm?

A-law is better for voice quality  (sorry, thought my original explanation was 
obvious).  But note that if the destination is a mobile phone, GSM will be 
used anyway, at least for the link between the final cell tower and the 
handset.

-- 
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] Choosing codecs

2015-07-06 Thread A J Stiles
On Sunday 05 Jul 2015, Luca Bertoncello wrote:
> Hi list!
> 
> I noticed that when the phone of my wife calls the gsm codec will be used,
> but if someone calls the phone, alaw will be used:

> Could someone explain me why?
> Second question: I think, ulaw/alaw are better then gsm, isn't it?
> If so, how can I change it?

GSM is the native codec used for calls to mobile phones; it uses lossy 
compression to achieve a low bit rate.

A-law is the native codec used by physical exchanges on the land line network  
(PSTN and ISDN).  It is non-lossy.  It works by arranging the "steps" closer 
together near the zero line, and further apart away from it; so the difference 
between the actual signal and the nearest digital representation is small in 
proportion to the signal.

To force the use of a-law, you need something like

disallow=all
allow=alaw

at the top of the configuration file for the calling technology in question  
(sip.conf for SIP, chan_dahdi.conf for DAHDI, &c.).  If you want to force a 
specific device to use a specific codec, then put an allow in the section for 
that device.

-- 
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 11 and pulseaudio setup as local user

2015-07-03 Thread A J Stiles
On Friday 03 Jul 2015, Jerry Geis wrote:
> Ok digging deaper... I was always trying to run the session as
> su myuser -c "asterisk -fn"
> 
> This does not seem to work.
> 
> If I login as myuser and run "asterisk fn" it worked... I got a lot of
> crackly noise that I normally dont have
> but it worked.
> 
> Any thoughts on why I cannot run the command as 'su myuser -c "asterisk
> -fn"' ?

This sounds as though you are running afoul of SELinux permissions.

-- 
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 email to fax

2015-06-25 Thread A J Stiles
On Wednesday 24 Jun 2015, tux john wrote:
> hello everyone.
> i am using asterisk 11.16 in my home office and i am using fax to email
> with it. i am quite happy with the way it works, no problems at all. when
> a fax arrives in a particular DID then the system sends it with mailutils
> to my email address as pdf. there is not any email address setup in the
> system, simply mailutils. 

> i would like to add email to fax functionality to the system. could someone
> point me to the right direction to see how please?

Beware!  This is an exercise fraught with pitfalls for the unwary.  Your users 
will expect to be able to e-mail any proprietary format and have it appear on 
the remote fax machine exactly as though it would on their own printer; and 
will blame you when it doesn't work because nothing else can read the files 
produced by an ancient piece of closed-source software that worked only with 
one particular obsolete version of Windows.

The correct procedure if some pointy-haired type asks you to do this, is to 
run away as fast as possible.

-- 
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 FAX

2015-06-24 Thread A J Stiles
On Wednesday 24 Jun 2015, Ivan Demkovitch wrote:
> Hello team!
> 
> I’m planning to add fax functionality to my PBX. From research it seems
> that there is 2 options: spandsp and Digium. I lean towards Digium app,
> licensing is fine. However, they don’t have download for v13 Should I just
> download their version for v12 Asterisk?

Listen to RMS, and do not touch *anything* that doesn't come with full Source 
Code and modification rights.

The important thing to remember about any piece of proprietary technology is 
that you already managed just fine before it was invented.  Do not make a 
decision you *will* regret some years down the line.

-- 
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] Calling multiple phones at once

2015-06-22 Thread A J Stiles
On Friday 19 Jun 2015, Ivan Demkovitch wrote:
> Hi again!
> 
> Also, given my setup below, how do I send caller id to my cell?
> SIP/83@callcentric is my cell, when I get incoming call when someone dials
> into Asterisk - I just see public calcentric’s DID number. I want to send
> a number of who CALLED IN into the Asterisk and possibly add couple
> numbers upfront or something like this to signal me that this call comes
> through the PBX and not directly to my cell?

This is entirely dependent on your telco.  Not everyone supports sending an 
ident that you don't own, as it kind of defeats the purpose of caller ID if 
anyone can just pretend that they are calling from any number.  

If you use
Set(CALLERID(num-pres)=allowed)
followed by
Set(CALLERID(num)=${from_number})
and it doesn't work, the chances are that callcentric are actively preventing 
caller ID spoofing.

-- 
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] Run script action when Dahdi phone goes off-hook?

2015-06-22 Thread A J Stiles
On Friday 19 Jun 2015, asterisk wrote:
> Hi,
> 
> Long story short - I have an ancient Britsh Telecom phone attached to my
> Asterisk PBX via Dahdi. It works beautifully, receiving calls, and the
> call quality is excellent. However, dialling out is impossible, as
> Asterisk consistently mis-reads the number of pulses the dial sends (it
> could be a squiffy dial, I'm not sure). Not to mention the fact that, in
> today's modern "want it now" age, waiting up to 3 seconds between digits
> whilst the rotary dial does its thing gets old very quickly...

I have a GPO 746 working beautifully on my home machine, with one of the cheap 
TDM410P clones you can buy from eBay  (it's hardly a production environment).  
Your problem most likely is indeed the dial mechanism  (you could prove it by 
seeing how your card behaves with a push-button, pulse-dialling phone).

These dials are built to industrial standards.  They respond well to field-
stripping and re-lubrication, and there are guides on the Internet explaining 
how to do this  (including the old GPO documentation).

My own solution to the slow dialling issue was just to put some entries with 
short extension numbers in the relevant context of my extensions.conf linked 
to my most frequently-called destinations; so, for example, I can call my 
parents by dialling their old 4-digit number from back in the clicky-clicky 
exchange days.

> Can I run a script (either in extensions.conf, or ael, or whatever) when
> that is detected? If so, I will create a small app which allows me to
> type a telephone number on my computer, I can then lift the phone & the
> script will go find the number I typed, and dial it for me.

You can; but personally, I'd just use a CGI script to generate a call file.  
Tthe script does its thing, and my phone rings; then when I answer it, the 
other person's phone starts ringing and I hear ringing-out tones.

Kontact  (and probably other PIM software)  can even run a command when you 
click onto a phone number, and embed the clicked-on number into the command; 
so I used this facility to do a wget on my make_call.cgi 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] setting outbound caller ID

2015-06-19 Thread A J Stiles
On Thursday 18 Jun 2015, Greg Woods wrote:
> I have found several places where it is explained how to do this, and I
> have got the following setup, but it is not working (the provider claims
> they are not getting a proper caller ID setting from me).
> 
> I have a number of extensions that are shorthand, that I will use one of as
> an example (real number hidden):
> 
> exten => 2473,1,Macro(callout,##)
> 
> Then this (actual number hidden again):
> 
> [macro-callout]
> exten => s,1,Set(CALLERID(num)=##)
> exten => s,2,Set(CALLERID(name)=##)
> exten => s,3,Set(CALLERID(all)="##" <##>)
> exten => s,4,Dial(${PROVIDER}/"1${ARG1}",30,tr)
> exten => s,n,Hangup()
> 
> 
> I have also tried setting only the number with the same results:
> 
> exten => s,1,Set(CALLERID(num)=##)
> exten => s,2,Dial .
> 
> When I dial that extension, the call goes through, but the caller ID is not
> correct at the destination.
> 
> Does this look right?
> 
> My provider claims that I am somehow sending an old number that doesn't
> appear anywhere in my /etc/asterisk directory where the config files are
> kept. I think they are screwed up somehow, but I wanted to see if anyone
> can see anything obviously wrong with what I am doing here, because unless
> I can find something wrong with my Asterisk configuration, I am probably
> going to have to change providers and port my number again (I just moved
> from a POTS provider Century Link to a VOIP provider).
> 
> Thank you,
> --Greg

Did you try

exten => s,1,Set(CALLERID(num-pres)=allowed)
  before your
exten => s,n,Set(CALLERID(num)=##)
  ?

Also, note that some providers expect you to supply the full STD code 
including the leading zero; some providers expect you to omit the leading 0; 
while other providers expect you to use the 44  (or equivalent, inbound code 
for whatever country you live in; in which case you must always omit the 
leading 0 from the STD code, as though you were calling home from abroad).

Begin by sending your ident in the same format that your telco use for 
incoming calls, but don't be surprised for a moment if they expect something 
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] small homebrew pbx

2015-06-15 Thread A J Stiles
On Monday 15 Jun 2015, lu...@sulweb.org wrote:
> Hello all,
> 
> I'm new here and I'm interested in building a small PBX with asterisk at
> home. I have one single PSTN line and ethernet cabling in place. I
> already have fairly decent PC that I can use (AMD FX 8350 16GB of RAM
> and RAID 10 SATA disks). I make and receive 10 calls a day on average. I
> want 4 IP phones connected to the ethernet network. When there is a
> incoming call, all phones must ring and the first that takes the call
> makes the others stop ringing, but lets them available for internal
> calls.
> 
> Given the requirements above, what's a cheap but working PCIe card / USB
> adapter I could buy for this kind of PBX? Do I need things like echo
> cancellation? Do I need FXS ports?
> 
> Thanks in advance,
> Lucio.

You need an FXO port for each exchange line, and an FXS port for each analogue 
telephone you want to connect to the PABX.  (If you want to use proper 
hardware SIP phones, then you don't need FXS ports.)

You can get inexpensive PCI / PCIe cards which accept up to 4 modules, either 
FXO or FXS, from the usual place online.  They are drop-in compatible with 
Digium cards.  I would never use one of those in a mission-critical, 
production environment, but they are fine just for experimenting with.

-- 
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] Calling multiple phones at ones

2015-06-15 Thread A J Stiles
On Monday 15 Jun 2015, Ivan Demkovitch wrote:
> Hello group!
> 
> I’m new to Asterisk but got one running finally :)
> 
> Now I’m trying to solve following problem. I have company Automated
> Attendant and each employee have SIP phone at home, SIP phone in office,
> cell phone.
> 
> I want all those 3 phones to be “one”. So, if someone calls our company
> number and dials my extension - I’d like 3 phones to ring at the same
> time.
> 
> What is this feature and where should I look for samples, etc? I’m going by
> “Asterisk: The definite guide” book and pretty confident with those
> concepts described but not sure how to achieve what I described above.
> 
> Thank you,
> Ivan

You can ring multiple phones with a single Dial() statement, separating them 
with "and" signs:  Dial(TECH1/EXT1&TECH2/EXT2&TECH3/EXT3& .)

Suppose my desk phone at work is SIP/403, my desk phone at home  (which, by 
cunning use of VPN, actually appears on an address in the Company Intranet)  
is SIP/703  and my mobile is 07xx726.  Then in the dialplan, I would have 
something like

exten => 403,1,NoOp(Trying three different ways to call AJS)
exten => 403,2,Dial(SIP/403&SIP/703&${GSM_GW}/07xx726,60)
exten => 403,3,VoiceMail(403,u)
exten => 403,4,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] asterisk & google contacts

2015-06-11 Thread A J Stiles
On Thursday 11 Jun 2015, tux john wrote:
> Hello everyone. i am running an asterisk server and i would like to have
> the contacts from google. so every inbound call with fetch the caller ID
> from google contacts and present it to my screen.

This is really three problems, as follows:

(1)  Accessing the Google Contacts API to retrieve someone's details based on 
their phone number.
(2)  Passing the incoming caller's number to an AGI script.
(3)  Displaying the details retrieved from Google on your screen.


Presuming you already know how to write a program to look up a Google 
contact's details from their phone number, you just need to turn that into an 
AGI script.  Then, in your dialplan, pass the incoming number to that script.

If you want Asterisk itself to have anything to do with the Google data, you 
will have to return them by setting channel variables within the script.  Or 
if you are going to use some external means to pass the data to the user, then 
you can have your script fork itself, detach and return 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] Allowing calls - maybe I'm just stupid...

2015-06-11 Thread A J Stiles
On Thursday 11 Jun 2015, Luca Bertoncello wrote:
> Well, I decided to do that, since I have my Asterisk reachable from
> Internet just for my cellphone and I want to avoid that someone guess
> my password (random and long, but it's of course possible to guess
> with a brute force attack) and call using my Asterisk...

Really?  How weak are your passwords, for you to be worried about brute-force 
attacks?

If you configure fail2ban so as to block IP addresses after a set number of 
false attempts and then unblock after  (say)  15 minutes, you can drastically 
limit the rate at which such attempts can be made without running the risk of 
locking *yourself* out.


> Since I'll use rarely my Asterisk from Internet (maybe just if I'm in
> holiday), I find this limitation meaningful.

Well, Asterisk doesn't!

Did your mother ever tell you when you were younger and just beginning to 
expand your horizons, "Always tell a grown-up where you are going, before you 
go out" ?  Well, that is essentially the purpose of SIP peer registration -- 
so your mother Asterisk knows where to find you, if an emergency arises a phone 
call comes in.

You always need a username and password to make a call anyway.  Introducing a 
restriction, for you to have to be registered  (using the *same* username and 
password)  before you can even make a call, will *not* make that any more 
secure.  Because an attacker who is guessing passwords still needs some way to 
check them; and it's a fair bet that they will use the guessed passwords in 
registration attempts.  Which means that by the time they come to try to make 
a call using those credentials, they will already be registered anyway!


If you are going to need occasionally to make possibly expensive phone calls 
from random IP addresses, then you might consider using some form of out-of-
band authentication.  For instance, have a web page on your Asterisk server, 
protected by a *different* password, that must be visited to allow that IP 
address a window of 15 minutes to connect to port 5060.  (This in itself can 
be problematic, if you are not extremely careful -- you absolutely do *not* 
want to create a situation which can lead to arbitary remote command execution 
as root.  Anytime I have had to do root stuff from within a CGI script, I have 
written to a file, not the actual commands but enough information to construct 
them; meanwhile a root cron job run every minute reads the file, does a regexp 
match on the content, maybe performs the relevant commands and then wipes out 
the file.  The downside of this is a delay before anything happens; but you can 
use a bit of AJAX in the script output to check every ten seconds whether 
anything has happened yet.  No doubt others will have their own suggestions.)


It's good that you are thinking deeply about security, but beware not to get 
drawn down blind alleys.  For instance, if you have a door with a large, 
single-glazed pane of 6 mm. glass, then there is little point fitting it with 
an expensive, hard-to-pick lock.


-- 
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] Allowing calls - maybe I'm just stupid...

2015-06-11 Thread A J Stiles
On Thursday 11 Jun 2015, Luca Bertoncello wrote:
> Now my problem is to check in my dialplan if the peer, that originate
> the call, is reachable, and if not, to give an error...
> 
> Is there any function to know if the peer is reachable?

The peer that *originated* the call *must* be reachable, by definition .

-- 
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] Am I cracked?

2015-06-10 Thread A J Stiles
On Wednesday 10 Jun 2015, Luca Bertoncello wrote:
> I'm very sorry to write that, but these answers are really NOT helpful...
> I searched two days long how can I check it and didn't found anything
> useful...
> 
> Could someone suggest me a way to check if my Asterisk is an "Open
> Relay" that accept connections from every peer?

Someone on this list is bound to have the wherewithal to be able to do that.  
All they will need to know is the IP address of your Asterisk server.

I suggest that if anyone offers to help you by remotely penetration-testing 
your system, you post "on-list" that you'll contact them "off-list" to give 
them the server IP.  That way, everyone gets to know that a deal has been 
established, but only the directly-concerned parties have all the necessary 
information.

-- 
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] Connecting peer if the peer is already connected

2015-06-10 Thread A J Stiles
On Tuesday 09 Jun 2015, Luca Bertoncello wrote:

> Now, I tried to register the user of my cellphone using a PC, as my
> cellphone was already registered.
> And Asterisk accepted this registration... :(

Did you actually reboot the server, as opposed to simply reloading your 
firewall configuration and stopping and restarting asterisk?  I've known some 
moderate to severe weirdnesses that seemed to be caused by the kernel 
remembering out-of-date routing details.

(I'm sure there is a simple command that will flush and rebuild the kernel's 
routing information without needing the big red switch, but that was nearer 
.)

> Unfortunately, I didn't found any option to restrict this try...
> How can I do it? And, very important, how can I trigger an event
> (Shell-Script) if someone tries to register as a peer, that is already
> registered or if the login was NOT successful, or even if my cellphone
> successfully registered (for example, to send me an E-Mail)?

Take a look at fail2ban.  It monitors log files for error messages, and can add 
firewall rules to disconnect IP addresses involved in suspicious activity.

-- 
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] Almost solved: using my Asterisk from Internet

2015-06-08 Thread A J Stiles
On Monday 08 Jun 2015, Luca Bertoncello wrote:
> Hi again, list!
> 
> I know, I'm really annoying the list... :)

Everyone has to start somewhere; and at least you aren't asking hundreds of 
questions in one go, including some which come under the heading of "Don't 
even think about trying to set this up until you have got X working", then 
ignoring every answer you received and doing something totally different.  
That's "annoying the list".

> If I call a phone at home using my cellphone it works and the quality
> is perfect!
> If a phone at home call my cellphone, however, the quality on my
> cellphone is very poor, but on the other phone is perfect...
> 
> I think, it is something by the codecs, but I don't know what...

Codecs would be the first thing I would be looking at.

The "native" codec used by the PSTN throughout Europe is G.711 A-law, or just 
alaw for short; and if you are making a system which connects with the PSTN, 
there is rarely a good reason to use anything else; since something, somewhere 
-- and most probably *your* Asterisk server -- is going to wind up having to 
translate from one codec to another.  That is going to  (1)  take a finite 
amount of time and  (2)  introduce distortion.

Try, in the top section of your sip.conf file,

disallow=all
allow=alaw

And that ought to fix it.

If in any doubt, add NoOp() statements at strategic points within your 
dialplan so as to show the value of the channel variable ${SIP_CODEC} .  


-- 
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] Forward loop protection...

2015-06-03 Thread A J Stiles
On Tuesday 02 Jun 2015, Carlos Chavez wrote:
>  Ia had a server overload today because someone did a call forward
> to their own extension.  To do a call forward I write a key called CFWD
> with the extensión number and number to dial .  The main script tests if
> the key/value exists and dials the number stored in the database.  What
> is an easy way to prevent dumb people from creating a loop?

There currently is no easy way to prevent an infinite forwarding loop.  If you 
come up with one, then you might well earn yourself a Nobel Prize for solving 
the Halting Problem .

The obvious bodge is to set a hard limit on depth of recursion; if an actual 
real, live person is not reached within, say, five hops then the call should go 
to  (the originally-called party's)  voicemail.

-- 
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] Recommendations for IMAP Voicemail

2015-05-13 Thread A J Stiles
On Wednesday 13 May 2015, Olivier wrote:
> 2015-05-06 17:51 GMT+02:00 Tech Support :
> > I believe that when you choose to store voicemails using IMAP, it applies
> > to all of your users which may not be what you want to do.
> 
> Yes.
> These days, voicemail storage type is still a compilation time option, that
> apply to all users.
> 
> Maybe, those attending to Astricon Dev sessions could explain us if
> voicemail storage customization could be introduced in a future version.

I'd be tempted to have a script, invoked by cron, to trawl through 
/var/spool/asterisk/voicemail/ and IMAP-ify messages just for those users who 
need that functionality.  

The nature of voicemail is such that it doesn't matter too much in the great 
scheme of things if the recipient winds up getting it a little bit late.

-- 
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] DPMA - Asterisk Realtime

2015-05-01 Thread A J Stiles
On Friday 01 May 2015, Robert Broyles wrote:
> We love our Digium phones and DPMA - but we really need it to work on
> our Realtime Platform. Otherwise we lose all the cool features and they
> are just standard SIP phones.
> 
> Anyone working on a solution for this? Or anyone from Digium see this on
> the roadmap?

The best solution would be a compatible, GPL-ed replacement for DPMA, and I'm 
really surprised nobody has attempted this yet.  We surely cannot be the only 
company out there for whom absence of Source Code is a deal-breaker?

-- 
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] Ubuntu Asterisk 11.17.1 - segfault ERROR 4

2015-04-22 Thread A J Stiles
On Wednesday 22 Apr 2015, pankaj pandey wrote:
> Hi All,
> I am running Asterisk 11.17.1 on Ubuntu 11.10 and i am getting segfault
> error very frequently. Due to this my asterisk server dies and i am
> getting the following following error in /var/log/kern.log ,
> 
> Apr 22 14:21:03 pp  kernel: [  369.264497] asterisk[1267]: segfault at
> 986e000 ip b7689ad7 sp b47e32ac error 6 in libc-2.13.so[b760f000+17c000]
> Apr 22 14:21:38 pp  kernel: [  404.258595] asterisk[4136]: segfault at
> 69657461 ip b4623b19 sp b4a2523c error 4 in libgcc_s.so.1[b460e000+1c000]
> Apr 22 14:52:38 pp  kernel: [ 2263.683388] asterisk[4545]: segfault at 8
> ip b7638551 sp b46702f0 error 6 in libc-2.13.so[b75c5000+17c000]
> 
> Any suggestions ...

Did you build your Asterisk yourself, or was it downloaded from Ubuntu or a 
PPA?

-- 
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] TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34

2015-03-25 Thread A J Stiles
** THIS IS NOT WHERE YOUR REPLY BELONGS **

On Wednesday 25 Mar 2015, Salaheddine Elharit wrote:
> tnaks for your response but the number dialed exist and i can call this
> number when i configure the trunk directly in x-lite and i call call also
> this number from my cell phone .
> any help
> thanks and regards

Make sure you are sending the number in the correct format, when you Dial() 
via your trunk.  Some providers want you to omit the leading zero from the STD 
code.  Others want you to include it.  Others still want you to include the 
IDD code  (and then definitely leave out the 0, just like you were phoning home 
from abroad).

My home phone number is (01332) XX.  To call it, you might have to Dial() 
any of the following  (assuming OUTSIDE is defined elsewhere):

Dial(${OUTSIDE}/01332XX, 60); with leading 0
Dial(${OUTSIDE}/1332XX, 60) ; without leading 0
Dial(${OUTSIDE}/441332XX, 60)   ; with IDD code

If you don't know what format your telco are expecting and have to determine 
by experiment, it probably would be easiest to set up an extension which just 
makes a call to one fixed number -- your own mobile is as good as anything 
else.

To remove the leading 0 from ${EXTEN} , you can use ${EXTEN:1} which omits one 
digit from the beginning.  

-- 
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] PRI Callerid Passthrough

2015-03-18 Thread A J Stiles
On Wednesday 18 Mar 2015, Rizwan H Qureshi wrote:
> Hi All,
> I have to forward incoming call on PRI back out to PRI but I need the
> original Callerid to passthrough. Is it possible with DAHDI PRI cards
> without involving the service provider?
> 
> Thanks

It depends who your service provider is!

Any PRI card can send the commands down the D-channel to set any caller ID you 
like, but it's still up to the telco whether or not they will honour your 
request.  I know the hard way that BT will only let you identify with a number 
you're entitled to use.

Also, remember if you have a call coming in on a PRI line and going out on 
another PRI line, that's eating two of your thirty lines .

-- 
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 from SIP to Skype..or not

2015-03-12 Thread A J Stiles
On Thursday 12 Mar 2015, Thufir wrote:
> I'm testing Asterisk at home, crummy connection.  Skype works fine for
> me, but every SIP client, even without using Asterisk, fails to connect.
> That's ok.
> 
> Is swapping out SIP for Skype a big deal?

Stay away from Skype!  It is a toxic, proprietary product.  The lack of 
interoperability by design is the antithesis of what a telecommunication 
system should be about -- and the extent to which they have gone to thwart any 
attempt at interoperability is truly shocking.

For connecting two Asterisk installations to each other over the Internet, IAX 
is better than SIP -- that's what it was designed for.

-- 
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] Regarding Text To Speech conversion

2015-03-10 Thread A J Stiles
On Tuesday 10 Mar 2015, janani m wrote:
> Thank You .
> 
> But now i get solved with that error since I had some mistakes in
> installing googletts.agi
> 
> Now when calling from my softphone i have written dialplan with an AGI
> script to convert from text to speech.
> 
> It get executed without error but there is no sound getting played.
> 
> My output,

[stuff deleted] 
 
> How could I solve this error??

Plain old-fashioned hacking!

First, try running the AGI script manually.  Do a trace on it, so you can see 
how parameters get passed to the script; then middle-click-paste the data 
straight into the terminal.  Make sure it really does what you're expecting it 
to do.  If your asterisk runs as a non-privileged user, make sure that it 
works even when the script is invoked as that user -- if not, check and 
double-check file and device permissions.

In the worst case, you will have to modify your AGI script by inserting 
statements at strategic points to write to syslog, or a file somewhere under 
/tmp/ so you can get an idea what is happening.

-- 
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] Regarding Text To Speech conversion

2015-03-09 Thread A J Stiles
On Monday 09 Mar 2015, janani m wrote:
> The Error Which I face I have attached.
> I need a clarification of Why I face this error and how to overcome this.
> Anybody know Please help..

That's a very common error and what it means is, the AGI script 
"/var/lib/asterisk/agi-bin/googletts.agi"  either has an incorrect #! line, or 
needs chmod +x run on it.

What do you get if you run
 # ls -l /var/lib/asterisk/agi-bin/googletts.agi
and
 # head -n1 /var/lib/asterisk/agi-bin/googletts.agi
respectively?

-- 
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] Problems with the voice quality under load

2015-03-02 Thread A J Stiles
On Monday 02 Mar 2015, Mordechay Kaganer wrote:
> When a particular server gets about 500 concurrent calls, the sound quality
> begins to degrade, the sound plays slowly and with clicks. As far as i
> understand, it's because asterisk is unable to send the voice stream in
> time i.e. the server is overloaded.
> 
> What i don't understand is, at the time that the server appears to be
> overloaded and the audio quality is bad, actual server's load is no more
> than 30-40% (60-70% idle CPU on average). IMHO, this indicates that for
> some reason the server is unable to use it's CPU capacity efficiently. May
> be because of some kind of thread contention inside asterisk?
> 
> Do you have any advice for me (other than purchasing more servers ;-) ?

Perhaps it's not CPU that is blocking things, but I/O?  It should be visually 
and audibly obvious if this is the case -- the disk activity lights will be 
illuminated, and the HDDs will be making noises.

If you can spare the RAM, consider setting up a tmpfs to hold your IVR prompts 
in 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 --
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] situation with ivr and four-channel gateway

2015-03-02 Thread A J Stiles
On Friday 27 Feb 2015, ricky gutierrez wrote:
> the problem is that my pbx all incoming calls using only the channel
> gsm 1 , the idea is that an incoming call to channel 1 is passed to
> channel 2

Ah.  *Incoming* calls are not something that is within your control; they have 
already been routed onto a line by your telco.  So you will need to speak to 
someone at your telco about doing this.

As a temporary measure, you could try setting up divert-on-busy so SIM1 
diverts to SIM2, SIM2 diverts to SIM3, SIM3 diverts to SIM4 and SIM4 diverts 
to SIM1.  You can do this with specially-crafted Dial() statements, or by 
temporarily inserting the SIMs in an old mobile phone.  See your telco's 
website for details of setting up call diversion.


-- 
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] situation with ivr and four-channel gateway

2015-02-27 Thread A J Stiles
On Thursday 26 Feb 2015, ricky gutierrez wrote:
> Hi A J , I have a sangoma gsm gateway "4"channels  , not use chan dahdi

O.K.  So what does your existing Dial() statement in extensions.conf look 
like?


-- 
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] situation with ivr and four-channel gateway

2015-02-26 Thread A J Stiles
On Wednesday 25 Feb 2015, ricky gutierrez wrote:
> I have a gw  wiht 4 port gsm , my provider gives me 4 lines and one of
> them is the main , the problem is that all my incoming calls using
> this number and is always busy , and the other three are always free,
> it is possible that the call is transferred to another channel?
> 
> Channel 1 : XXX1 "Main Number"
> Channel 2 : XXX2 "other"
> Channel 3 : XXX3 "other"
> Channel 4 : XXX4 "other"

You just need to use call groups.

In your chan_extra.conf  (if it's an OpenVox)  or chan_dahdi.conf, add 
something like
  group=1
to the definition for each span.

Now in the  [globals]  section of your dialplah, have something like
  MOBILE=EXTRA/r1
for an OpenVox card, or
  MOBILE=DAHDI/r1
for other makes.  Now you need your Dial() statements to be something like
  Dial(${MOBILE}/${EXTEN},180

Calls will then be made by trying each span in turn until an available one is 
found.  So if you have an incoming call on span 1, Asterisk will try spans 2, 
3 and 4 in turn before giving up.  It also will remember which span it used 
last, and start with the next one next time; so the calls should be 
distributed roughly evenly across your SIMs.

For more information about this  (and some other modes you can use which do 
slightly different things than "r"),  see
  http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels
(yes, it refers to Zaptel; but the syntax is the same for DAHDI and EXTRA 
channels).

-- 
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] [OT] switches

2015-02-25 Thread A J Stiles
On Wednesday 25 Feb 2015, Thufir wrote:
> On Fri, 20 Feb 2015 13:05:56 -0700, Harry McGregor wrote:
>
> Hypothetical:  lag, choppy connection, dropped calls.  Of course, I'd
> start with checking logs.  How would I establish that the problem is that
> (some) of the ports aren't gigabit?

Any port with a hardware SIP phone plugged into it almost certainly won't be 
gigabit  :)  Anyway, an uncompressed  (A-law or micro-law)  voice connection 
is only using 64 000 bits per second.  Compressed formats use even less 
bandwidth.  The SIP signalling adds a bit of an overhead, but not much.  
That's probably why most SIP phones have only 100 or even 10 meg ports.

> Small office, about five agents.

To be honest, you'll probably be fine with a £9.99, 8-port TP-link switch -- 
but then you'll need power packs on all your phones  (we power ours this way, 
and find it helps to reinforce the concept of the phones being unlike analogue 
POTS phones).  There will already be mains there for the computers and 
monitors.


If you want a PoE switch specifically to remove the need for a power pack on 
each phone, just add up your requirements for power and ports; double them, to 
allow for the future; then find switches that meet these minimum requirements, 
and buy the cheapest-but-one.


The limiting factor with a switch carrying IP telephony traffic is not 
bandwidth, but routing table entries; and even cheap switches nowadays will 
usually take 1024 entries, if not 4096.


-- 
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] Callfile problem - Unable to find codec translation path from (nothing)

2015-02-17 Thread A J Stiles
On Tuesday 17 Feb 2015, Justin Killen wrote:
> Hi,
> 
> I copied a setup from an older 1.8.5 installation to an 11.15 installation,
> and I'm having problems getting call files to work.
 . stuff deleted .
> Whenever I try to copy this callfile into /var/spool/asterisk/outgoing/ I
> get these 3 lines repeating over and over  (I'm not 100% sure which entry
> is first):
> 
> [2015-02-16 16:56:02] WARNING[9737][C-f8a7]: channel.c:5353 set_format:
> Unable to find a codec translation path from (nothing) to (slin)
> [2015-02-16 16:56:02] WARNING[9737][C-f8a7]: file.c:1017
> ast_streamfile: Unable to open AAA/check_ip_failure (format (nothing)):
> Function not implemented [2015-02-16 16:56:02] WARNING[9737][C-f8a7]:
> app_playback.c:484 playback_exec: ast_streamfile failed on
> OutgoingSpoolFailed for AAA/check_ip_failure [2015-02-16 16:56:02]
/\ /\ /\ /\ /\ /\ THIS IS THE PROBLEM /\ /\ /\ /\ /\
 . stuff deleted . 
> Is there something special I need to do to trick the translation into doing
> the right thing?
> 
> -Justin

You need to have the sound file saved in the correct place, and Asterisk has to 
be able to read it.  Double-check, triple-check and check for a fourth time 
that the file is really where you think it is and its permissions, and those of 
the containing folder, are correct.

Whenever I need to use a custom sound file or files, then I usually set up a 
test extension which just plays my wanted sound file(s) and calls Hangup() .  
Then I call this and test that my custom sounds 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 .

-- 
_
-- 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] IAX2 problem for WAN connections

2015-02-05 Thread A J Stiles
On Thursday 05 Feb 2015, jg wrote:
> Calling from ServerB to ServerA works, but not vice versa. The only odd
> thing that appears to me is the different perceived port on ServerA.
> 
> ServerA*CLI> iax2 show registry
> Host  dnsmgr  Username PerceivedRefresh  State
> 80.152.xxx.xxx:4569   N   ServerA 79.233.yyy.yyy:45697  60 
> Registered
> 
> ServerB*CLI> iax2 show registry
> Host  dnsmgr  Username Perceived   Refresh  State
> 79.233.yyy.yyy:4569   N   ServerB 79.233.yyy.yyy:4569  60  Request
> Sent
> 
> Does someone have an idea at what to look in detail?


Look in /etc/asterisk/iax.conf in the first instance.

-- 
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] IAX2 trunk with on demand Internet link

2015-02-02 Thread A J Stiles
On Monday 02 Feb 2015, spartan1...@hushmail.com wrote:
> Hi, I'm connecting 2 Asterisk servers with an IAX2 trunk. Trunk works
> fine in testing, no problems there but the Internet at server-A is an
> "on-demand" system that is based on the amount of http/https traffic
> going through it (or if the link is brought up manually/via scripting
> interface). As such there will be times that the link is
> downworkflow-wise this is not an issue (trunk for a specific
> purpose) but are there any issues with how IAX2 will behave?
> Specifically, when the link comes up will the IAX2 trunk reconnect
> automatically? If so, how long will it take for the trunk to reconnect
> (high-speed, low-latency link)? If it won't come up reliably, does
> anyone have suggestions on methods to force an IAX2 reload, etc.?

It should all just work fine.  We have two machines linked by an IAX2 trunk, 
one of which is a bit temperamental and keeps needing rebooting -- but it 
works fine, just coming up as and when it needs to.

-- 
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] subscriber absent

2015-01-29 Thread A J Stiles
On Wednesday 28 Jan 2015, Ethy H. Brito wrote:
> Hi all
> 
> WE have some users that turns off their phones when they are not at home.
> 
> We see the warning message:
> 
>   Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
> 
> just after the Dial() command and a
> 
>   Everyone is busy/congested at this time
> 
> message.
> 
> Where is this "unable - cause 20" status available in the dialplan?

This means the SIP endpoint is defined in sip.conf, but no device is 
registered; which is consistent with phones being turned off.

> Which variable holds this?
> 
> We'd like to play something to the caller in case the user is absent.

It should be ${HANGUPCAUSE} .  So you can use something like

Gotoif($[${HANGUPCAUSE}=20]?subs_absent)

in your dialplan, and it will go to the label (subs_absent) if the Dial() 
fails for "cause 20 - Subscriber Absent".  Then you can play a recorded 
announcement, or send them to voicemail.


-- 
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] Dialing from phonebook, and hiding the dialed number from the user.

2015-01-27 Thread A J Stiles
On Monday 26 Jan 2015, Antonio Gómez Soto wrote:
> Hi,
> 
> does anyone have a recommendation for a SIP phone, which
> allows dialing from a phonebook, and hiding the dialed number
> from the end users? Also from the call history of course.
> 
> It seems Mitel can do this, and I have a use case where this is
> a requirement.

If I have this right, you want to make sure the number can *only* be called 
through your Asterisk system  (so the call gets recorded)  and *not* directly 
from an agent's mobile phone or similar  (so they cannot make off-the-record 
calls).

Why not just use Asterisk itself to give the number an alias?  So the end user 
dials some number that connects them to the destination, but of course it 
won't work from anywhere else besides your configured Asterisk system.


My home Asterisk installation  (yes, some people are crazy enough to play with 
phones for entertainment :) )  includes aliases to call people in the village 
where I grew up, using their old 4-digit phone numbers  (even though those 
numbers have now grown to 6 digits, and I have moved across an STD code 
boundary).  Also I have a friend whose mobile number ended with 911, so it was 
too delicious to avoid using that as an alias;


exten => 911,1,Dial(${GSM}/07xx911)
exten => 911,n,Hangup()

exten => _[23]XXX,1,Dial(${GSM}/0128373${EXTEN})
exten => _[23]XXX,n,Hangup()


If you need many aliases and this is going to look messy in your dialplan, you 
could always use an AGI script to look up the number in a 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] SEMI-OFFTOPIC openvox

2015-01-20 Thread A J Stiles
On Monday 19 Jan 2015, ricky gutierrez wrote:
> Hi list, I write on the list looking for help, buy a openvox gw gsm
> for four channels and I'm a little disappointed with the support
> openvox, for some reason , The call doesn´t get trough
> 
> support tells me it was my asterisk server, but does not really work
> me and my internal calls are working perfectly, I tested with another
> sangoma FXO gateway and works perfectly.
> 
> the problem is that support openvox is Chinese and the difference in
> time zone is high.
> 
>  my trunk is connected
> 
> 5001/5001X.X.X.X   D  Yes
>   Yes5060
> 
> Monitored: 1 online, 4 offline Unmonitored: 0 online, 0 offline]
> 
> I follow this guide , but not work
> 
> http://www.lojamundi.com.br/download/gateways-gsm/openvox/Quickstart_Guide_
> of_OpenVox_GSM_Gateway_VS-GW2120_Series_Connect_with_Asterisk_Server.pdf

I've had some experience with OpenVox GSM cards and chan_extra.  Their support 
isn't great; they like if you can give them ssh access to your box, and you 
will need to ask questions afterwards to find out what they did in there, but 
they did manage to sort out an obscure problem for me and explained enough for 
me to work out what had been the matter in the first place.

As far as I can work out, their GSM gateway appliances seem to be some kind of 
server motherboard with GSM cards and a pre-installed Linux, Asterisk and 
chan_extra; but I've not had direct experience of them, having built my own 
boxes using G400P and/or G400E cards in my favourite supplier's motherboards.

Oh, and finally, if you're using any kind of GSM gateway, be careful!  
Otherwise, you will end up incurring the wrath of your telco -- "unlimited" 
often does not really mean unlimited, and the only way to find out what the 
limit actually is is 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] Asterisk executable suddenly about 40KB larger - modules not working

2015-01-07 Thread A J Stiles
On Wednesday 07 Jan 2015, Stefan Viljoen wrote:
> Hi all
> 
> I have a strange issue with 1.8.11.0 on a production Asterisk machine at
> our head office, and the same issue with a production machine at a branch
> office.
> 
> Every now and then, on the head office machine, ODBC CEL and CDR logging
> will stop working. On examination in the CLI, Asterisk behaves as if the
> config files for ODBC in the /etc directory are just gone.
> 
> Repeated tests have then proved that the config files
> (/etc/asterisk/res_odbc.conf, /etc/asterisk/res_pgsql.conf, etc.) ARE in
> /etc/asterisk folder and are readable and have the correct contents, and
> are NOT gone.
> 
> Checking further, I discovered that in both situations, the asterisk
> executable in /usr/sbin grew by about 40KB compared to its size just after
> being compiled...

This sounds suspiciously as though you have some kind of rootkit-like 
infection.  Which probably is trying to make calls at your expense, and 
without even doing you the courtesy of recording the fact of them being made 
in the usual database.

You are going to need to get your hands dirty, tracing system operations .  
You want to look for a write to /usr/sbin/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] Passing literals with commas to subroutine [SOLVED]

2014-12-11 Thread A J Stiles
On Tuesday 09 Dec 2014, Daniel Gonzalez wrote:
> Hi,
> 
> Let's say I do:
> 
> Set(data=xxx,yyy)
> Gosub(my-sub,s,1(${data}))
> 
> My subroutine will only receive "xxx" for ARG1. How can I pass a literal
> with a comma to a single argument in a subroutine?
> 
> (The point is: when calling the subroutine I do not know if the variable
> has a comma or not.)

O.K.  I've managed to set myself up a temporary Asterisk box, so I was able to 
do some testing without risking bringing down a production server  :)  And I 
have managed to put together a solution, if you can call it that.

If you put speech marks around the argument, like so:
 Gosub(my-sub,s,1("${data}"))
then what actually comes through in ${ARG1} is
 "xxx,yyy"
(complete with the speech marks).  But at least that comma is protected.  So 
then within my-sub, you just need to evaluate ${ARG1:1:-1}, ${ARG2:1:-1} &c. 
to strip off the first and last characters  (skip one, show all but one).  


It's a bit ugly -- but so is a lot of stuff written in the Dialplan.  Just 
because a language is Turing-complete, doesn't mean any code written in it is 
going to be pretty.  But you might be able to mitigate some of the ugliness 
with comments  (introduced with a semicolon in Dialplan, because the comment 
mark is a valid "digit").

-- 
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] Passing literals with commas to subroutine

2014-12-09 Thread A J Stiles
On Tuesday 09 Dec 2014, Daniel Gonzalez wrote:
> Hi,
> 
> Let's say I do:
> 
> Set(data=xxx,yyy)
> Gosub(my-sub,s,1(${data}))
> 
> My subroutine will only receive "xxx" for ARG1. How can I pass a literal
> with a comma to a single argument in a subroutine?
> 
> (The point is: when calling the subroutine I do not know if the variable
> has a comma or not.)

What happens if you use speech marks around the variable, like so: "${data}" ?

-- 
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] day night service toggle

2014-11-28 Thread A J Stiles
On Thursday 27 Nov 2014, Control Oye wrote:
> Hi,
> 
> I need dialplan to set INCOMING call forwarding during lunch break to my
> secretary.
> 
> I want that I can set call forwarding by dialing an extension number to
> turn it ON or OFF.
> 
> I am using asterisk 11.

What you need to do is, set a global variable from within your dialplan, to 
indicate whether you are at your desk  (meaning calls to your number should go 
to your phone)  or on lunch  (meaning calls to your number should go somewhere 
else).

And note that this really should be done by dialling separate numbers for "in" 
and "out", because toggle actions are annoying as hell in practice -- it's 
easier to remember two different numbers, than to remember what state you are 
currently in.


If 101 is you and 102 is the person who fields your calls while you are on 
lunch, you need something like this;

;  extension 101
exten => 101,1,GotoIf($[${ON_LUNCH}] ? on_lunch : at_desk)
exten => 101,n(at_desk),Dial(SIP/101)
exten => 101,n,Hangup()
exten => 101,n(on_lunch),Dial(SIP/102)
exten => 101,n,Hangup()



; These extensions should be in some context which is only callable from 101

; extension 771 sets "on lunch"
exten => 771,1,Set(GLOBAL(ON_LUNCH)=1)
exten => 771,n,Playback(ajs-set_on_lunch)
exten => 771,n,Hangup()

; extension 770 sets "at desk"
exten => 770,1,Set(GLOBAL(ON_LUNCH)=)
exten => 770,n,Playback(ajs-set_at_desk)
exten => 770,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] Strange Issue: asterisk deleted

2014-11-27 Thread A J Stiles
On Wednesday 26 Nov 2014, Antoine Megalla wrote:
> Hi,
> 
> I looked for asterisk in /usr/sbin using the commands ls and find and
> whereis and it was not there.
> 
> I know that the process is killed because when I start asterisk using the
> command asterisk -c it starts and then it exits and the word killed is
> wrote on the console.
> 
> Ever time I copy a new executable to /usr/sbin either using cp command or
> make install it gets deleted too.
> 
> Now I used the strace command on asterisk and I can clearly see at the end
> of the strace the line : killed by SIGKILL This means that something or
> someone is actually and purposely killing asterisk but I do not know what
> or who is doing that also I know that I am the only user on the system.
> 
> Again any indicators to solve this very weird issue are welcomed.

It sounds as though your server might have been compromised.

Get another machine of the same bit architecture and perform a fresh install 
of exactly the same OS as your Asterisk box on that.  Install busybox too  
(it's usually there anyway, as it's required for building the initial RAMdisks 
used by most distros for booting).  Using a USB stick  (preferrably one that 
can be set read-only),  copy at least the `ls`, `ps`, `netstat`, `w`, 
`lsattr`, `md5sum`, `cat`, `diff` and `busybox` binaries over  (to somewhere 
that isn't /usr/bin/).  Use both the existing installed and the newly-copied 
md5sum and diff to check each system binary against the known-good ones.  You 
can use busybox to replicate commands you haven't copied  (but note that 
busybox versions are rather cut-down as compared to the GNU tools you know and 
love.  Come to think of it, they're cut-down as compared to the BSD tools 
everyone replaces with GNU versions once they have a C compiler up and 
running).

Compare /etc/inittab between the two machines.

Many rootkits mess with ext[2-4]fs attributes, presumably to stop you 
overwriting their overwritten system binaries; so use a known good lsattr to 
check the attributes of everything in /bin/, /sbin/, /usr/bin/ and /usr/sbin/ 
-- watch out for anything set immutable.  


Getting rid of the compromise fortunately is reasonably easy, especially if 
your /home folder is on its own partition.  Just ignore that partition during 
reinstallation, edit your /etc/fstab afterwards and reboot -- your original 
/home will be preserved intact.  If not, use systemrescuecd or something 
similar to boot a known-good system.  Use mv to rename /home to a new name. 
Shrink a disk partition and create a new small partition.  Use that for your 
/home during the reinstall.  Then again edit /etc/fstab, unmount /home, mv 
your old /home back to /home and reboot.

-- 
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 way audio internal

2014-11-21 Thread A J Stiles
On Friday 21 Nov 2014, Andrew Colin wrote:
> I am using the free g729
> 

OK, so there shouldn't be any licencing problems  (unless for some reason your 
Asterisk is wanting to use the paid-for g.729 aot the Free one.  Look at the 
CLI output very, very carefully to see if this might be happening).

Did it ever work properly?  If your kernel, C library or some other 
fundamental system component has been updated since you installed g.729, then 
it might have been broken by the upgrade.  Navigating to the folder with the 
Source Code and re-running `make` followed by `make install` ought to fix it.


But why are you using g.729 anyway?  What special reason have you for doing it 
differently than the rest of the world?


-- 
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 way audio internal

2014-11-21 Thread A J Stiles
On Friday 21 Nov 2014, Andrew Colin wrote:
> Hi All
> 
> We have a strange issue with our hosted asterisk server running on Debian
> Internal calls btween extensions using g729 give one way audio
> As soon as we change the codec to ALAW the issues goes away.
> 
> Any ideas how to fix this?
> 
> Outbound calls via a trunk work fine with g729

Unless you have serious bandwidth issues, just forget about g.729 and change 
to a-law throughout.  A-law is what the PSTN  (in civilised countries)  uses 
anyway, so you won't need to transcode  (which chews up processor resources 
and risks compromising quality)  for calls to and from the outside world.  

If you really need to use g.729 and are outside the USA  (therefore, beyond 
the reach of software patents),  there is a free version that you can use -- 
and this one, better than Digium's offering, comes with the Source Code so you 
can be sure it isn't doing anything nasty behind the scenes.

But to be honest, you probably are better off just sticking with a-law.

-- 
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] Upgraded to 13 and now "Mailbox" is empty in sip show peers

2014-11-21 Thread A J Stiles
On Thursday 20 Nov 2014, Jayson Baker wrote:
> Mailbox continues to be missing most times.  Touching (or rm'ing) the file
> in /var/spool/asterisk/voicemail does nothing until a "core restart now"
> then as soon as the phone registers the light is sync'ed.   MySQL or CURL,
> doesn't matter, anything realtime.  Seems so odd to have this issue on 6
> installations, 3 different versions, and nobody knows.  We've even stripped
> it down barebones, loading only about 7 modules and clean config files.

It's not clear from your descriptions; but if you have at least one machine 
where it's working properly, then you need to work out what is different 
between that "working" and your "non-working" installations.

The fact of it not responding to realtime changes certainly suggests a 
misconfiguration somewhere; one or more modules is not expecting things to 
change, and so picking up on it when they do.  So the question now becomes:  
What is the minimum you need to do, to persuade your Asterisk to accept the 
new configuration?

"core restart now" is a pretty big sledgehammer to be using to crack the nut 
of a configuration file not being reread.  Try "core reload" or even "voicemail 
reload".  And then once you've found the module whose config you need to reload 
explicitly, that is where the misconfiguration most probably resides.  


-- 
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] Upgraded to 13 and now "Mailbox" is empty in sip show peers

2014-11-20 Thread A J Stiles
**  THIS IS NOT WHERE YOUR REPLY BELONGS  **

On Thursday 20 Nov 2014, Jayson Baker wrote:
> On Thu, Nov 20, 2014 at 9:56 AM, A J Stiles 
> 
> wrote:
> > **  THIS IS NOT WHERE YOUR REPLY BELONGS  **
> > 
> > Which part of "THIS IS NOT WHERE YOUR REPLY BELONGS" do you not
> > understand?
> Well exactly where are we supposed to reply then?  Via US Mail?

You are supposed to reply *after* the thing you are replying to.  Like this.  
So the conversation flows neatly.


-- 
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] Upgraded to 13 and now "Mailbox" is empty in sip show peers

2014-11-20 Thread A J Stiles
**  THIS IS NOT WHERE YOUR REPLY BELONGS  **

Which part of "THIS IS NOT WHERE YOUR REPLY BELONGS" do you not understand?


-- 
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] Upgraded to 13 and now "Mailbox" is empty in sip show peers

2014-11-20 Thread A J Stiles
**  THIS IS NOT WHERE YOUR REPLY BELONGS  **

On Wednesday 19 Nov 2014, Jayson Baker wrote:
> On Wed, Nov 19, 2014 at 3:31 PM, Steve Edwards 
> 
> wrote:
> > Please don't top-post.
> > 
> > On Wed, 19 Nov 2014, Jayson Baker wrote:
> >  This same issue has happened on 1.8 as well.  And so far on all 6 of our
> >  
> >> systems we upgraded to 13.  It must be something simple?  How can we
> >> diagnose it?
> > 
> > Coming late to the party, but...
> > 
> > I'd run tcpdump ('sudo tcpdump -A -s 0 port 3306') and see:
> > 
> > 1) Are packets flowing back and forth like you'd expect.
> > 
> > 2) Can you capture an insert statement so you can apply it in the MySQL
> > command line client? You may get a meaningful error message or observe
> > something funky in one of the columns.
> > 
> As the MySQL DB is on the same servers as the Asterisk software, I'm afraid
> a tcpdump won't show much.  We have looked at the SQL traffic and all we
> see is the usual "SELECT * FROM sip_buddies WHERE..." -- well that doesn't
> do much good, as we know the "mailbox" column is being returned properly
> during a SQL SELECT.
> 
> It seems like Asterisk is just throwing that field away.  But not always.
> Sometimes after a sip reload a few SIP registrations will have the Mailbox
> field populated.
> 
> Looking at debug in Asterisk doesn't show anything other than that Asterisk
> found the SQL fields (including "mailbox") and what SQL SELECT statements
> it's running.
> 
> This just seems so simple!  Has to be something we have contextually wrong
> somewhere or something.  Thanks for the help.

First try this;

mysql> SHOW VARIABLES LIKE "general_log%" ;
+--+---+
| Variable_name| Value |
+--+---+
| general_log  | OFF   |
| general_log_file | /var/lib/mysql/debian.log |
+--+---+
2 rows in set (0.00 sec)

Note the value for "general_log_file".  Now enter

mysql> SET GLOBAL general_log = 1;

Exit out of mysql  (if you're not using screen, or multiple tabs in your 
terminal emulator)  and run

$ tail -fn0 /var/lib/mysql/debian.log

(or whatever the log file is called).  Now you will get every SQL query 
executed on the server scroling past, and you might get a clue from this what 
might be the matter.  



-- 
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] Query on connecting 3G MSC with Asterisk PBX Server via SIP Interface.

2014-10-29 Thread A J Stiles
On Tuesday 28 Oct 2014, NACHIAPPAN, SUBBAIAH (SUBBAIAH) wrote:
> Hello,
> 
> I am new to Asterisk forum :).
> 
> I have a requirement of terminating  3G Mobile originated calls (coming
> through 3G-MSC)  to EPBX Phones via Asterisk PBX.
> 
> Setup:
> 
> Mobile  > Mobile Switching Center ( 3G)-SIP interface--->Asterisk
> PBX--->SIP Phone.
> 
> I wanted to know if I require SIP licenses to integrate 3G MSC with my
> Asterisk server.

Of course not  :)  SIP is an Open technology, anybody is free to implement it.

Imagine what would have happened to the human race if Ugg the Caveman decided 
not to share the secret of making fire with everyone freely, but instead went 
around demanding shiny beads with menaces from anyone who just wanted to keep 
themselves warm .

> I know there is a wealth of information in wiki link, but I am unable to
> locate the  required configuration document which will help me in
> integrating MSC with Asterisk EPBX via SIP interface.

You need to contact, in the first instance, the company who are providing your 
SIP interface.  They will have the necessary interoperability documents you 
require.


-- 
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 GOIP Outgoing Callerid not working

2014-10-16 Thread A J Stiles
On Thursday 16 Oct 2014, Stephan Alz wrote:
> Hello
> 
> I have a simple 1 channel goip gateway
> (http://www.voip-info.org/wiki/view/GoIP).
> 
> The incoming and outgoing calls work with Asterisk except the caller ID for
> the outgoing calls. I think I have exhausted all possible options
> regarding setting a caller ID and it still doesn't work. The recipients
> will get "private number". The incomings caller ids are work just fine.


First thing to check:  Are you sure that your mobile telco actually let you 
set your own ident on outgoing calls?


Just because Asterisk requests a particular caller ID, does not mean that the 
equipment downstream is necessarily going to honour that request  (or even 
have any way to do so; Asterisk won't protest if you Set(CALLERID(num)=...) 
and then Dial() out through an analogue line).  With many telcos, you can only 
ident as a number you are entitled to use.  If you request a number that isn't 
yours, the call will be made anonymously, in accordance with  (someone's idea 
of)  the Principle of Least Surprise.

And with a very few legitimate exceptions, this is entirely Right and Proper.  
Subscribers have a reasonable expectation for the number shown on the phone to 
be the actual number from which they are being called.  If it was any 
different, we would have unwanted callers spoofing caller ID right, left and 
centre.

-- 
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] Ubuntu 12.04 LTS / Asterisk / apt-get upgrade / exclude packages

2014-10-10 Thread A J Stiles
On Friday 10 Oct 2014, Thorsten Göllner wrote:
> Hi,
> 
> I have Asterisk 11 with DAHDI (Sangoma E1-Card) running on Ubuntu 12.04
> LTS. Asterisk and DAHDI-Drivers are installed from source.
> 
> When doing an "apt-get upgrade" the system packages will be update but
> sometimes Asterisk is broken. Which packages do I have to exclude when I
> do not have time to recompile Asterisk/Dahdi each time? libc?
> Kernel-Packages?
> 
> Thanks so far!
> -Thorsten-

DAHDI is basically a set of kernel modules, which *by design* work only with 
the exact kernel for which they were compiled; so avoid any upgrade to the 
kernel if you don't have time to rebuild DAHDI.

C library changes potentially could require anything to be recompiled; but in 
practice almost invariably don't, precisely because of how much breakage would 
potentially be caused.  If a C library update requires recompilation of other 
packages then either there has been a Flag Day  (and not the sort where mean 
people stay indoors!)  or you're running Gentoo.

I believe there is a way in Debian, and therefore probably Ubuntu, to have 
some script execute automatically following a kernel update.  So you might 
even be able to have DAHDI self-rebuild following a kernel update.

-- 
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] Playback/background audio from MySQL BLOB

2014-09-24 Thread A J Stiles
On Tuesday 23 Sep 2014, Steve Edwards wrote:
> For some applications, storing recorded audio (prompts and caller
> recordings) as a BLOB in MySQL has advantages.
> 
> So, once I have the audio in the database, how can I play it?
> 
> Creating temporary files seems so tacky.
> 
> Is there another way to playback or background audio either by specifying
> a URL or from a memory buffer (either C or PHP)?

Depending how many messages you have, you could use a named pipe  (FIFO)  or a 
Unix-domain socket for each one; and have the individual backend processes 
interrogate the database and dump the contents of the relevant field down it.  
As far as Asterisk is concerned, the socket / FIFO looks just like a file; it 
doesn't care much that the data in it is really coming from a process on the 
other end.  This obviously suffers from the problem of decreasing 
manageability, the more message "files" you have.

But personally, I'd just store the filenames in the database; and rely on the 
unix filesystem for storing the actual file contents.  After all, that's what a 
filesystem is for.

-- 
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] read digits from the user through php agi script

2014-09-24 Thread A J Stiles
On Tuesday 23 Sep 2014, Brahim Abidar wrote:
> hi everyone,
> actually i want to release an IVR system using PHPAGI API , in this IVR i
> want to get value from the user.
> I already used get_data defined in phpagi but they are not able to get the
> value given by the user and store it in a php variable.
> i tested this :
> $result = $agi->get_data('beep', 3000, 20);
> $keys = $result['result'];
> 
> but every time i found in $keys variable 0.
> 
> please any help or suggestions
> thank you for spending your valuable time for me.


Why do you want to do this in an AGI?  It's easy enough to do in the dialplan.  
Here's how I did it; you'll need to substitute your own sound bytes, 
obviously, but I've added comments showing what they say:


[get_pin]
exten => s,1,Set(pin=)
exten => s,n,Set(PINLENGTH=4)
;  "Enter your PIN. If you make a mistake, press STAR."
exten => s,n(prompt),Background(ajs-enter_pin)
;  Build up the PIN digit by digit.  The WaitExten() will be cut short by any
;  keystroke, so we can use a quite longish timeout.
exten => s,n(nextdigit),WaitExten(30)
;  "Sorry, I didn't get that."
exten => s,n,Playback(ajs-sorry_didnt_get)
exten => s,n,GoToIf($[${LEN(${pin})}<1]?prompt:saysofar)
;  "The digits entered so far are:"
exten => s,n(saysofar),Playback(ajs-digits_so_far)
exten => s,n,SayDigits(${pin})
exten => s,n,Goto(nextdigit)

;  This context needs to have a "h" extension; because we may well be
;  placing a call from here, if the PIN was correct.

exten => h,1,NoOp(Clearing up)
;  .  carry on tidying up after ourselves

;  "PIN cleared.  Start again from the beginning."
exten => *,1,Playback(ajs-start_again)
exten => *,2,GoTo(get_pin,s,1)

exten => #,1,Hangup()

exten => _X,1,Set(pin=${pin}${EXTEN:0:1})
exten => _X,n,NoOp(PIN so far is ${pin})
exten => _X,n,GoToIf($[${LEN(${pin})}>=${PINLENGTH}]?got_all:need_more)
exten => _X,n(need_more),GoTo(get_pin,s,nextdigit)
;  We have all 4 digits .
exten => _X,n(got_all),NoOp(PIN is ${pin})
;  .  and we continue from here with the PIN in ${pin}


-- 
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] MixMonitor with b option recording all calls

2014-09-22 Thread A J Stiles
 THIS IS NOT WHERE YOUR REPLY BELONGS 

On Monday 22 Sep 2014, Yuriy Gorlichenko wrote:
> 2014-09-22 12:12 GMT+04:00 A J Stiles :
> > On Monday 22 Sep 2014, Yuriy Gorlichenko wrote:
> > > Hello I have an issue wit MixMonitor. I need to record only answered
> > > calls,
> > > so I set "b" option for this but calls still recording even call no
> > > answered My asterisk version 12.5.1, at my other servers with older
> > > versions of asterisk (11.8 for example) MixMonitor works fine.
> > 
> > What technology are you using for your outgoing calls?  SIP trunk, IAX
> > trunk,
> > ISDN, mobile or analogue phone lines?
>
> SIP trunks

Well, SIP certainly allows for full supervisory information  (analogue 
doesn't, and all calls are deemed answered if the exchange line was 
available).  What have you got in your sip.conf ?  And what does your SIP 
trunk provider have to say on the matter?  (It wouldn't be totally unknown for 
a dodgy telco to provide not-entirely-truthful supe.)

-- 
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] MixMonitor with b option recording all calls

2014-09-22 Thread A J Stiles
On Monday 22 Sep 2014, Yuriy Gorlichenko wrote:
> Hello I have an issue wit MixMonitor. I need to record only answered calls,
> so I set "b" option for this but calls still recording even call no
> answered My asterisk version 12.5.1, at my other servers with older
> versions of asterisk (11.8 for example) MixMonitor works fine.

What technology are you using for your outgoing calls?  SIP trunk, IAX trunk, 
ISDN, mobile or analogue phone lines?

-- 
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 prefix code to dial a high fraud country - security mechanism

2014-09-19 Thread A J Stiles
On Thursday 18 Sep 2014, motty cruz wrote:
> Hello, I would to allow users to place calls overseas such as India and
> Malaysia but only with a security code. if they don't have a security code
> I want to be able to drop the calls.
> 
> can someone point me to a right direction to achieve this goal?
> 
> Thanks,
> Motty

Not many people are going to want to answer this definitively, I suspect, for 
fear of being blamed if you copy what they did, it doesn't work for you and 
you get landed with huge bills for calls you didn't make.  Securing Asterisk 
is never as easy as you think.


However, if you look back through my own posts, I did post some dialplan code 
a short while ago, relating to a PIN entry.  Feel free to borrow that and play 
around with it; but note, I will not accept any responsibility for it not 
being as secure as you thought!


Another thing to consider would be only allowing overseas calls from a 
particulat context; any extension that does not require the ability to call 
abroad should be placed in a different default context.  If you know you will 
only ever need to call a restricted range of foreign numbers, consider giving 
them "short codes" -- endpoints effectively within your own internal numbering 
scheme -- and sending calls to _00X. to a recorded message.

[overseas-offices]
; this context is only for phones which need the ability to call overseas

; 8000 is office in France
exten => 8000,1,Set(CALLERID(num)=${OUTGOING_IDENT})
exten => 8000,n,Dial(${OUT_TRUNK}/0033251478820,180)
exten => 8000,n,Hangup()

; 8010 is office in India
exten => 8010,1,Set(CALLERID(num)=${OUTGOING_IDENT})
exten => 8010,n,Dial(${OUT_TRUNK}/00918322494200,180)
exten => 8010,n,Hangup()

; .

[default]
; play suitably sarchastic announcement to chancers
_00X.,1,Play(ajs-not_allowed)
_00X.,n,Hangup()


Basically, be paranoid; and even then, don't forget, you probably aren't being 
paranoid enough.

-- 
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] ${ANSWEREDTIME} returning null

2014-09-17 Thread A J Stiles
On Wednesday 17 Sep 2014, Anurag Rana wrote:
> Thanks, That worked. :)
> 
> Anurag Rana
> http://newbie42.blogspot.in/

Good; it's always nice to hear that someone has got something working!


-- 
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] ${ANSWEREDTIME} returning null

2014-09-17 Thread A J Stiles
On Wednesday 17 Sep 2014, Anurag Rana wrote:
> Oh, Sorry My mistake, I misspelled it in mail.
> It is already ${DIALEDPEERNUMBER}, still returning null.
> 
> Anurag Rana
> http://newbie42.blogspot.in/

Hmm.  I've looked a bit further.  According to the documentation, 
${DIALEDPEERNUMBER} is set by a Dial() command.  If you are using a call file 
to generate the call, then there will not be an explicit Dial() command and 
the variable will not get assigned.

Could you set a variable in the call file instead?  Use a line like
Set: varname=value
in the call file.  Then, later in the dialplan, you can retrieve ${varname} .  
If the call was -not- made by a call file, then that variable won't be set; in 
which case, you can pick up on ${DIALEDPEERNUMBER} instead.


-- 
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] ${ANSWEREDTIME} returning null

2014-09-17 Thread A J Stiles
On Wednesday 17 Sep 2014, Anurag Rana wrote:
> in dialplan:
> exten=>h,n,NoOp(${DIALLEDPEERNUMBER)
> 
> variable ${DIALLEDPEERNUMBER} is returning null.
> 
> Suggestions please?
> 
> Thanks
> 
> Anurag Rana
> http://newbie42.blogspot.in/

Asterisk has it mis-spelled as "DIALEDPEERNUMBER" (sic).
Try 
exten => h,n,NoOp(${DIALEDPEERNUMBER})
instead.

-- 
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] GSM to GSM call with callerid passthrough

2014-09-17 Thread A J Stiles
On Wednesday 17 Sep 2014, Rizwan H Qureshi wrote:
> Hi All,
> I have a GSM to VoIP gateway (specifically yeaster TG400) which I am trying
> to use for kind of a call intercept between two GSM users. Call comes
> through one SIM and goes out through another Sim with our Asterisk in
> between to log the call. This works fine but we need the original callerid
> to pass-through through the outgoing SIM.
> 
> I have tried every possible configuration on Asterisk that I know of but
> does not work. At the moment the callerid is always of the SIM we use to
> send the call out from. Has anyone tried this before? I need this very
> badly.
> 
> 
> Thanks

Unfortunately, when it comes to setting caller ID, you are basically at the 
mercy of the telco -- they can choose whether to allow it or not.  Obviously 
your telco aren't allowing you to set it, so you get the default ident for 
your SIM whatever you try to set.

Best suggestion:  Try asking nicely; but good luck with finding someone at any 
mobile telecommunications company who even understands what you are talking 
about.

-- 
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] fail2ban and pjsip in asterisk 12 and 13

2014-09-15 Thread A J Stiles
(this is not where your reply belongs)

On Monday 15 Sep 2014, Rainer Piper wrote:
> Hi Patrick,
> 
> github done ;-)
> 
> what is HTH ???

HTH == Hope That Helps.

-- 
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 use phpmyadmin to remotely access asterisk mysql database?

2014-09-11 Thread A J Stiles
On Thursday 11 Sep 2014, rafa alfurqan wrote:
> Hi,
> 
> thank you for your repplied,
> 
> > As you're on Ubuntu, you can begin with
> > $ sudo apt-get install phpmyadmin
> 
> i did that, so what i have to do for the configuration in asterisk so i
> could remote to asterisk database from phpmyadmin?

If you installed PHPMyAdmin on the same server as Asterisk, then it should 
Just Work because as far as PHPMyAdmin is concerned, the MySQL server is 
local.  What do you get when you point a web browser at /phpmyadmin on 
server's IP address?


All PHPMyAdmin is, is a tool for building up database queries and displaying 
the results.  Anything you can do using the MySQL command line, you can do 
with PHPMyAdmin.


If you can get a query such as

SELECT * FROM cdr ORDER BY calldate DESC LIMIT 1;

to work from the command line, then it will work through PHPMyAdmin.  
Conversely, if it *doesn't* work from the command line, then you need to sort 
that *first*.

-- 
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 use phpmyadmin to remotely access asterisk mysql database?

2014-09-11 Thread A J Stiles
On Thursday 11 Sep 2014, rafa alfurqan wrote:
> Hi,
> 
> Could anyone help me to tell me about how to install and using phpmyadmin
> to remotely access asterisk mysql database?
> 
> I'm using asterisk 11.0.1 on ubuntu 10.04
> and mysql-server version is 5.1.73-0ubuntu0.10.04.1 (ubuntu)
> 
> really need help.
> 
> thank you

As you're on Ubuntu, you can begin with

$ sudo apt-get install phpmyadmin

If you have any more questions about PHPMyAdmin, you would do better to ask 
them on a MySQL or PHPMyAdmin forum.

Also, 10.04 is a really old Ubuntu release now, even although it is a Long 
Term Support one.  Consider upgrading to 14.04.  You can apt-get dist-upgrade 
straight from an LTS release to the next LTS release, without needing to go 
through all the intermediate releases.

-- 
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] Pattern Extension not working in Dialplan

2014-09-08 Thread A J Stiles
On Monday 08 Sep 2014, Anurag Rana wrote:
> @A J Stiles : If you could provide an example as you said, It would be very
> nice.  Thanks.

This is excerpted from a dialplan application I wrote.  It's actually a PIN 
entry but should be usable for any general purpose application.  Sound files 
referred to will need to be created by you.

[get_pin]
exten => s,1,Set(pin=)
exten => s,n,Set(PINLENGTH=4)
exten => s,n(prompt),Background(ajs-enter_pin)
;  Build up the PIN digit by digit.  The WaitExten() will be cut short by any
;  keystroke, so we can use a quite longish timeout.
exten => s,n(nextdigit),WaitExten(30)
exten => s,n,Playback(ajs-sorry_didnt_get)
exten => s,n,GoToIf($[${LEN(${pin})}<1]?prompt:saysofar)
exten => s,n(saysofar),Playback(ajs-digits_so_far)
exten => s,n,SayDigits(${pin})
exten => s,n,Goto(nextdigit)

;  We need a "h" extension  (for tidying up after ourselves)  in this context;
;  because the call may be placed from within this context.

exten => h,1,NoOp(Clearing up)

exten => *,1,Playback(ajs-start_again)
exten => *,2,GoTo(get_pin,s,1)

exten => #,1,Hangup()

exten => _X,1,Set(pin=${pin}${EXTEN:0:1})
exten => _X,n,NoOp(PIN so far is ${pin})
exten => _X,n,GoToIf($[${LEN(${pin})}>=${PINLENGTH}]?got_all:need_more)
exten => _X,n(need_more),GoTo(get_pin,s,nextdigit)
;  We have all 4 digits .
exten => _X,n(got_all),NoOp(PIN is ${pin})


-- 
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] Pattern Extension not working in Dialplan

2014-09-08 Thread A J Stiles
On Sunday 07 Sep 2014, Anurag Rana wrote:
> Hi,
> 
> I created a dummy dialplan  where I ask the user to enter the age.
> 
> [macro-age]
> exten => s,1,Background(my/age)  ;;Play recorded message to enter age
> exten => s,n,WaitExten(10)
> exten => _XX,1,Set(AGE=${EXTEN});; this line is not executing, instead
> dialplan is terminating with error given below.
> exten => s,n,NoOp(${AGE})
> exten => s,n,GotoIf($[${LEN(${AGE})} > 0]?notEmpty)
> exten => s,n,Goto(s,1)
> exten => s(notEmpty),n,Background(my/thank-you)
> exten => s,n,Wait(1)
> 
> 
> When I receive call and tries to enter the digits (86 lets say), it only
> accept just first digit and terminates even before considering second
> digit. Error message :
>  WARNING[5726][C-000a]: pbx.c:6696 __ast_pbx_run: Invalid extension
> '8', but no rule 'i' or 'e' in context 'testmacro'
> 
> Please suggest what might be wrong.
> 
> 
> Anurag Rana
> http://newbie42.blogspot.in/

You would be better off jumping to a new context and building up your number, 
digit-by-digit as it is entered, in a channel variable.

In your "s" extension, set your variable to an empty string; do a Background() 
and then WaitExten() for a digit to be entered.  Have an extension _X to 
capture each digit and append it to the number so far.  Then use a GotoIf() to 
jump to the WaitExten() statement if insufficient digits have been entered so 
far.  You might also want a * extension to clear the number entered so far, if 
the user makes a mistake.


If you need a written example, I might be able to dig something out later.

-- 
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 secure fine tune - stop attack

2014-09-04 Thread A J Stiles
On Thursday 04 Sep 2014, motty cruz wrote:
> Hi A J,
> believe me, I wish i do as you suggested, however I have a few extensions
> outside the office with dynamic IPs, so that is not a possibility.

If you know what ISPs they are using, then you can allow just those ISPs' 
address ranges.  That will slow things down, by requiring an attacker to be 
using the same ISP as a legitimate user.

> Thanks
> for your suggestions, I will try fail2ban. I don't know how complicated is
> to implement that on production server.

It's fairly easy -- but note that physical access to the server's console is 
highly desirable, lest you accidentally block yourself out from using ssh  
(not a mistake you want to make too many times).  


-- 
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 secure fine tune - stop attack

2014-09-04 Thread A J Stiles
On Thursday 04 Sep 2014, motty cruz wrote:
> Hi All,
> I see this kind of attack on our Asterisk Server, do you know how to block
> that IP?

Instead of blocking unwanted IPs, you should be permitting only wanted IPs.

-- 
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 issues with handling incoming calls

2014-09-02 Thread A J Stiles
On Tuesday 02 Sep 2014, Nick Awesome wrote:
> Hello guys.
> 
> Have 2 external numbers that required registration on provider server,
> 
> trunk1: 73432260005@80.75.132.66
> trunk2: 73432260050@80.75.132.66
> 
> Thing is I can’t figure out how to route them to different IVRs
> 
> by default Asterisk can’t match endpoint
> 
> Request from '' failed for
> '80.75.132.66:5060' (callid: 50e9132765782741404408k2469rmwp) - No
> matching endpoint found
> 
> Can’t set identify by IP because they got the same ip.
> 
> Is there way to configure asterisk so incoming calls from same IP but
> different ID will use different contexts?

Can't you send them both to the same context initially; but once you are 
there, match the outside number  (which can be found in ${EXTEN} if it is the 
number that was dialled from their end, or ${CALLERID(num)} if it is the 
number they are calling from)  within that context and use a GoToIf() to send 
calls from trunk 2 to the correct context?

-- 
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] Custom SIP-header not present in call Asterisk to Asterisk

2014-09-02 Thread A J Stiles
On Tuesday 02 Sep 2014, Jonas Kellens wrote:
> On 02-09-14 11:34, Steven Howes wrote:
> > On 2 Sep 2014, at 09:03, Jonas Kellens  > 
> > > wrote:
> >> So just before hanging up, I add a custom SIP-header :
> >> 
> >> exten => s,n,SIPAddHeader(X-My-Hangup: MaxChan)
> >> exten => s,n,Hangup()
> > 
> > SIPAddHeader only works for INVITE as far as I know.
> > 
> > Steve
> 
> OK.
> 
> Then how can I let another Asterisk server know the custom reason of
> hangup ? If it is not possible with custom SIP-header, then how ?

Fire off an AGI script which will  (somehow)  send the necessary message to the 
other Asterisk server.

-- 
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] Setup Own IP PBX Server

2014-09-01 Thread A J Stiles
On Monday 01 Sep 2014, Chandran Manikandan wrote:
> Hi All,
> I would like to Setup own IP PBX Server for our office.
> I need to connect our all branch office with head quarter through local
> extensions.
> I need to receive and make call from our branch office and head quarter
> using own DID numbers.
> Our branch offices located in India,Indonesia, Philippine,us,Australia and
> head quarter  is located in Singapore.

You won't get much of a response on this list, which is strictly for non-
commercial discussion.  What you are asking for almost certainly will require 
money to change hands.

-- 
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] Billing software: Other than A2Billing because of the problem with the analogue channels

2014-08-22 Thread A J Stiles
On Thursday 21 Aug 2014, bilal ghayyad wrote:
> Hello;
> 
> I am facing a trouble with A2Billing when using analogue lines because the
> channels are not closing properly when dialing happen through A2Billing
> (it seems the dialing scenario including the hangup is not handled
> properly through A2Billing but I do not have control on this). But when I
> do dialing from asterisk and using analogue lines, I do not face a trouble
> because I can write the script in the extensions.conf in professional way
> to confirm that the channel is closed successfully.

If you think you have managed to detect the end of a call more successfully 
than A2Billing can, I would have thought the logical solution would be to 
patch A2Billing to work with your improved teardown detection.

> Is there alternative Billing solution than A2Billing which has another
> working mechanism?

Not really.  The problem is inherent to analogue lines; which by definition 
cannot carry full supervisory information, as there is no separate D-channel.

> How I can resolve such problem which is related to the
> analogue channels? 

Get some form of digital phone line  (such as a SIP trunk, or ISDN)  installed 
instead.  You should be able to switch from analogue to ISDN without 
terminating your existing telco contract; and the quarterly will be cheaper, 
as you are using less of the telco's equipment.


-- 
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 12 on Debian Wheezy

2014-08-12 Thread A J Stiles
On Tuesday 12 Aug 2014, Olivier wrote:
> Hello,
> 
> A couple of questions in relation with Asterisk 12 on Debian Wheezy.
> 
> 1. Can paquet libpjproject-dev (from wheezy-backport) be installed as
> the sole binary to add PJSIP stack to Asterisk 12 (compiled from
> source) ?
> 
> 2. When compiling PJPROJECT from source (see
> https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjprojec
> t?src=search)), where should PJSIP .so files be located in an appropriately
> managed Wheezy system  ?
> In other words should I get the line bellow or something else ?
> libpjsua.so (libc6) => /usr/lib/libpjsua.so

Asterisk as downloaded builds from Source into /usr aot /usr/local.  This is 
only ever a problem if you try to mix built-from-Source Asterisk with 
prepackaged Asterisk.  Stick to one method or the other, and you will have 
nothing to worry about.

-- 
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 support for Bittorrent Bleep

2014-08-11 Thread A J Stiles
On Monday 11 Aug 2014, Farid Fadaie wrote:
> Hello,
> 
> Full disclosure: my name is Farid Fadaie and I'm in charge of BitTorrent
> Bleep (a private P2P SIP-based messaging application in early alpha)
> http://blog.bittorrent.com/2014/07/30/building-an-engine-for-decentralized-
> communications/
> 
> I have personally been a fan of Asterisk and have been using it for years
> and now that we have (kind of) released Bleep, I wanted to ask you guys to
> let us know what you think. Considering that Bleep is built on an engine
> (think of it as a distributed SIP proxy) that supports SIP, I thought it
> might be beneficial to ask you guys for your ideas.
> 
> Here is what I have in mind but will be happy to hear your thoughts on
> everything that is relevant to Bleep and Asterisk:
> 
> 1- What do you think about supporting Bleep in Asterisk? Similar to Skype
> channels but way more flexible (considering the interface will be SIP). Our
> engine can take care of all lookups, NAT traversals, encryption, etc. We
> can essentially enable Asterisk connected devices to be able to talk to
> Bleep users.
> 
> 2- How could the Asterisk community benefit from Bleep (or the engine
> behind it)?
> 
> 3- what features would you like to see implemented in Bleep (the consumer
> app) or its engine?

It all sounds interesting.  Where is the GIT repo?

-- 
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] The plain old PBX functionality

2014-08-08 Thread A J Stiles
On Friday 08 Aug 2014, Gergo Csibra wrote:
> Hi,
> 
> back in the old analog telephony days there was "digital" PBX-es and
> digital "system" phonesets. This phonesets have had many individual
> illuminatable buttons connected with extensions. The PBX can show on
> the buttons if some extension is ringing (blinks) or busy (constant
> light), and the user can transfer the call with one touch (pressing
> one of this button).
> 
> I search this functionality in Asterisk. What versions, and what
> extension functions (or other settings), and what VoIP phones can do
> this?

What you are looking for is a "Busy Lamp Field"  (BLF).  This can usually be 
controlled by custom SIP headers  (though naturally, every manufacturer's 
implementation is ever so slightly different).

N.B.  Be sure to *avoid* Digium phones if you want BLF functionality!  Making 
use of this feature would require you to pollute your system by installing a 
toxic, binary-only module.

-- 
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: Anyone have any experience with inbound SIP trunks from Simwood?

2014-08-07 Thread A J Stiles
On Wednesday 06 Aug 2014, I wrote:
> I'm trying -- unsuccessfully! -- to configure an inbound trunk with
> Simwood, and I was hoping someone on this list might have managed to do
> this.
> 
> I have configured some numbers to route to a SIP endpoint
>   %e164@customer's server
> and convinced the customer to open up UDP ports 5060 and 1 - 2.
> 
> Calling the number gets a SIP request from Simwood.  The customer's machine
> then sends a SIP 401 response.  Simwood send an ACK .  and then
> nothing. Nothing appears in the Asterisk CLI; to get the SIP trace I used
> the command
> 
> # ngrep -t -q -n -q -Wbyline -deth0 1283 port 5060
> 
> (note that 1283 = the STD code from which the call is originating, so it
> should show up in any related packets.)
> 
> 
> ##  sip.conf  ##
> [simwood_in_slough]
> type=friend
> host=178.22.140.34
> fromdomain=178.22.140.34
> permit=178.22.140.34/255.255.255.255
> qualify=no
> context=from-simwood
> dtmfmode=rfc2833
> insecure=invite,port
> disallow=all
> allow=alaw
> nat=yes
> directmedia=no

.  And my mistake was in sip.conf.  The configuration stanza I had named 
"simwood_in_slough" should, of course, have been named after the number I had 
programmed in at the other end of the trunk .

*hangs head in shame*

-- 
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] Anyone have any experience with inbound SIP trunks from Simwood?

2014-08-06 Thread A J Stiles
I'm trying -- unsuccessfully! -- to configure an inbound trunk with Simwood, 
and I was hoping someone on this list might have managed to do this.

I have configured some numbers to route to a SIP endpoint
  %e164@customer's server
and convinced the customer to open up UDP ports 5060 and 1 - 2.

Calling the number gets a SIP request from Simwood.  The customer's machine 
then sends a SIP 401 response.  Simwood send an ACK .  and then nothing.  
Nothing appears in the Asterisk CLI; to get the SIP trace I used the command

# ngrep -t -q -n -q -Wbyline -deth0 1283 port 5060

(note that 1283 = the STD code from which the call is originating, so it 
should show up in any related packets.)


##  sip.conf  ##
[simwood_in_slough]
type=friend
host=178.22.140.34
fromdomain=178.22.140.34
permit=178.22.140.34/255.255.255.255
qualify=no
context=from-simwood
dtmfmode=rfc2833
insecure=invite,port
disallow=all
allow=alaw
nat=yes
directmedia=no

##  extensions.conf  ##
[from-simwood]
extension => s,1,NoOp(Call via Simwood form '${CALLERID(num)}' to '${EXTEN}')
extension => s,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] Message Waiting indicator setup in ELASTIX ?

2014-08-04 Thread A J Stiles
On Monday 04 Aug 2014, upendra wrote:
> Hi,
> 
> i wanted to know that if i have a message indicator SIP phone , then MWI
> will work in ELASTIX ??
> 
> Let me know the Details of MWI and how test it.

As long as the "message waiting" indicator can be controlled via SIP messages, 
it should Just Work in Asterisk, or any application built thereupon

-- 
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 12.4.0 not able to install pjsip

2014-08-01 Thread A J Stiles
(This is not where your reply belongs)

On Friday 01 Aug 2014, Sameer Rathod wrote:
> Hi Matthew,
> 
> I know that no one is bounded to solve the issue for me.
> I am new to asterisk that's why asking for help only. Pardon me if I did
> something wrong.
> 
> Please let me know where do I get config.log output I don't know how to
> generate them.

There will be a file called "config.log" in the same folder where you typed 
"./configure".  This is what you need to attach.

-- 
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] *SOLVED* SIP trunk gives fuzzy / distorted audio on mobiles, OK on fixed lines

2014-07-31 Thread A J Stiles
I have now fixed this issue, and am posting this for the benefit of anyone else 
who may be suffering with a similar problem.

It was, as I suspected all along, a subtle misconfiguration at this end.

The fix was to give the SIP trunk its own configuration stanza in sip.conf as 
follows;

[sip_trunk_outbound]
type=peer
host=provider.sld.cc
disallow=all
allow=alaw

and replace all instances of

Dial(SIP/provider.sld.cc/44${EXTEN:1})
with
Dial(SIP/sip_trunk_outbound/44${EXTEN:1})

In the absence of that important little stanza, the [general] settings were 
applying to the ad-hoc SIP endpoint; meaning that even in spite of explicitly 
setting the outbound SIP codec, Asterisk was insisting to use G726.


No sooner had I worked this out, than the SIP trunk provider e-mailed 
basically to confirm my thinking.


The moral of this story:  Never trust a configuration file written by someone 
else, no matter how close it was to working  ;)


-- 
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 gives fuzzy / distorted audio on mobiles, OK on fixed lines

2014-07-31 Thread A J Stiles
On Thursday 31 Jul 2014, James Thomas wrote:
> Is the quality the same incoming from mobile as outgoing to mobile?

It's a one-way trunk  (outgoing only).

Anyway, I've now fixed it, with help from the trunk provider.  Details to 
follow in a separate message.

-- 
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] SIP trunk gives fuzzy / distorted audio on mobiles, OK on fixed lines

2014-07-30 Thread A J Stiles
I'm having a problem with a new SIP trunk.

Calls within the UK to fixed lines are fine, but calls to mobiles have 
noticeably poorer audio quality.

I thought it might have been a codec issue; we have used G.726 for internal 
and external calls  (over primary ISDN and GSM).  So I tried allowing "alaw",  
(G.711 A-law)  which is the native codec used within the PSTN in this country, 
but this made no improvement.

We had
  disallow=all
  allow=g726

in the [general] section of sip.conf.  In the section for one of the phones, I 
added
  allow=alaw
and then inserted
  Set(SIP_CODEC=alaw)
in the relevant part of extensions.conf.  For good measure, I also added
  NoOp(Codec was ${SIP_CODEC})
in the "h" extension.  The messages in the Asterisk CLI appeared to show that 
the audio codec was correctly being set to "alaw", and on hangup I got "Codec 
was alaw", but there was no improvement to the sound quality.

Is there something I am doing wrong, or do I need to get in touch with our SIP 
trunk provider?

-- 
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] incoming calls fall into echo test mode

2014-07-21 Thread A J Stiles
On Saturday 19 Jul 2014, Norman Molhant wrote:

> I tried many things on our FreePBX box and found out
> the problem seems somehow linked with the customer's
> extension (or phone number), not his inbound route
> (changing the latter has no effect on the problem).
> 
> Creating a new extension with another phone number
> would solve the problem (I tried it and it works),
> but this customer wants to keep his current phone
> number and when I tried deleting his extension then
> creating a new one with his current phone number,
> the new extension presented the same problem as the
> previous one...
> 
> Anyone knows what could cause such a problem and/or
> how to solve it ?

You really have supplied incomplete information here, by neglecting to mention 
the actual extension number which is causing the problems.  That would have 
had somebody onto it like a shot.  What follows is an educated guess based on 
the most likely scenario according to the available information:

Somewhere in your dialplan, probably in a section that has already been 
"helpfully" configured for you by FreePBX, the extension number you assigned to 
your customer has been appropriated for an echotest.

I suggest to grep for  (firstly)  the extension number in question, and  (if 
that does not work, perhaps because the echotest is a wildcard match aot a 
literal one)  then search instead for 'exten[ ]*=>'  (afraid that one will 
give you many more hits .  you'll have to look through them yourself)  
under /etc/asterisk.  Use the -R option to search subfolders as well.


-- 
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] Simultaneous Ring

2014-07-18 Thread A J Stiles
On Friday 18 Jul 2014, Haley,Scott A wrote:
> That worked. I had to use the *two* underscores in the agi script where I
> was setting the values. Thanks.

Glad you got it working in the end!

I always like to use plenty of NoOp() statements to make sure the variables 
I'm setting are correct, especially when it requires fiendish logic which has 
to jump around between contexts and spawn channels.  If you are in the habit 
of using "n" for "next" instead of explicit step numbers, so much the better, 
as this means extraneous NoOp()s can easily be commented out or removed later.

-- 
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] Simultaneous Ring

2014-07-18 Thread A J Stiles
On Friday 18 Jul 2014, Haley,Scott A wrote:
> I have this working but I have one problem. I need to grab values from
> variables that I have set in the calling context to dial. How would I do
> that.

I think you need to prefix your variable names with *two* underscores, to make 
them indefinitely heritable down the succession of channels.  If they are 
prefixed with a single underscore, then they only get inherited *once*; so if 
the child channel spawns a grandchild, then any _VARS it inherited from the 
parent channel won't exist in the grandchild, but any __VARS will.

-- 
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] Simultaneous Ring

2014-07-17 Thread A J Stiles
On Wednesday 16 Jul 2014, Haley,Scott A wrote:
> I have a need to issue a dial command to a number:
> 
> same => n,Dial(${DIALGROUP1},${TIMER1},t)
> 
> After a number of seconds, let's say 10 seconds. I want to dial another set
> of numbers while continuing to ring, or interrupting the first group of
> numbers.
> 
> same => n,Dial(${DIALGROUP2},${TIMER1},t)
> 
> Is there a way to do this without interrupting the first call?

This sounds exactly like the sort of situation for which local channels were 
invented .

Dial(${DIALGROUP1}&LOCAL/foo@bar) with a longer timeout than 10 seconds.  Then 
in your local channel, wait 10" and Dial(${DIALGROUP2}).  The first Dial() will 
be satisfied when someone answers either a phone in dial group 1, or a phone in 
dial group 2 set ringing by the Dial() in the local channel.

-- 
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] Digium E1 card stops working til disconnect machine power cord

2014-07-10 Thread A J Stiles
On Thursday 10 Jul 2014, Ismael Gil wrote:
> Hi there,
> 
>  In one of my asterisk installation, there is a Digium E1 pri card
> connected. The asterisk and card are working properly.
>  The problem we have is that when a storm occurs in the area, the card
> stops working, and E1 lines connected not rise, even restart the machine.
> If however if you turn off the machine, disconnect the power cord,
> reattach it and turn on the machine again, E1 pri card correctly
> recognizes the E1 lines and the PBX starts to function properly. This only
> happens when there are storms in the area.
> 
>  Why is it necessary to disconnect the power cord for the card to work
> after a storm? How I can identify where the problem is?
>  How I can fix it?
> 
>  Thanks in advance,
> 
>  Ismaeleitor

It's a phenomenon called "latch-up", which occurs when extreme voltages are 
applied to the inputs of CMOS logic ICs.

A parasitic PNPN structure -- which is unavoidably present at each pin -- 
ordinarily provides some measure of static protection, by acting as diodes to 
clamp the voltage on any pin to the power rails; but it can also act like a 
PNP and NPN transistor in a sort of deadly embrace, where each one is holding 
the other in conduction.

If enough current flows into or out of an input pin under fault conditions, one 
of these transistors can turn on, which will cause the other transistor also 
to turn on; and the input can become clamped hard against one or other power 
rail.  This situation will persist as long as any current is flowing through 
the transistors, which in practice means until the supply is disconnected  
(or, in extremis, until the device overheats and melts down).


See also Wikipedia article: http://en.wikipedia.org/wiki/Latchup

-- 
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 rating software

2014-07-02 Thread A J Stiles
On Wednesday 02 Jul 2014, Andrew Colin wrote:
> Can you try maybe assist with this, as I have tried for ages and still cant
> get it right.

Firstly, have you got CDR working and writing to some sort of database?  We 
use cdr_mysql; although the more modern recommendation is to use cdr_odbc  
(which is more generic, and will work with various database types)  even if 
you are using a MySQL database.


If you haven't got your CDR going into a database, then you need to sort that 
out *first*.

Once you have CDR working, then it's simply a question of determining what SQL 
queries you need to generate to produce your report; then writing a program to 
build up the queries, extract the results and present them in the form 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] Call rating software

2014-07-02 Thread A J Stiles
On Wednesday 02 Jul 2014, Sameer Rathod wrote:
> Hi,
> 
> I am facing issue in bypassing asterisk for audio call
> can anyone help in packet to packet bridging I had posted the logs in
> previous mail
> If required again then please let me know

Then why are you replying to a thread which, evidently from its subject line, 
is about something else altogether?

Come back when you have learned some manners.

-- 
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 rating software

2014-07-02 Thread A J Stiles
On Tuesday 01 Jul 2014, andrew Colin wrote:
> Hi Guys
> 
> Does anyone know of any good cdr rating software.
> 
> I am looking for something that I can pull reports by extension. 
> Not a full billing solution like a2billing.

Have you thought of rolling your own?  It's not hard to write a program in 
Your Favourite Scripting Language™ to pull the records you want from the 
database and create a CSV spreadsheet.  And then have it started by cron, to 
give you regular automatically-generated reports; either e-mailed directly to 
you, or downloadable via a web page.

Alternatively, you could generate your spreadsheet as an .fods  (flat XML)  
file.  This is slightly more effort; but it has the advantage of supporting 
styling of table cells, so your report can be made to look pretty.

-- 
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 approach in asterisk configuration

2014-06-30 Thread A J Stiles
On Monday 30 Jun 2014, sylvain GOTRI wrote:
> Hi ,
> I have asterisk 1.8.5 installed on Centos 6. Now I want to configure my
> PBX to work in my network. I see that I can do this with asterisk files
> or use database like mysql to do it (realtime)
> I want to know what is the best way and what can be consequence when I
> choose  other way ?
> Thanks.

The real question you need to be asking yourself is:  How often is my 
configuration going to change?

If you are going to be adding and removing phones and users all the time, or 
you want for users to be able to move between desks while keeping their own 
extension number independent of where they are sitting, then you would be 
better off with a configuration managed in realtime.  This also applies if you 
anticipate changing dialplan rules on anything more than an occasional basis.


If you have a traditional office setup, with phones that do not change often 
and 
where extension numbers are understood to refer to the phone as opposed to the 
person, and your dialling rules also are set in stone, then your configuration 
will be more stable; and you will be as well off using old-fashioned 
configuration files.

-- 
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] SugarAsterisk vs. ________

2014-06-19 Thread A J Stiles
On Thursday 19 Jun 2014, thufir wrote:
> http://www.voip-info.org/wiki/view/Asterisk+CRM+Integration
> 
> lists a few options.  I'm looking for, literally, the simplest FOSS CRM
> for "click to dial" functionality, but don't know where to start.
> 
> 
> 
> thanks,
> 
> Thufir

The Free version of SugarCRM is no longer officially maintained; but the code 
can still be found if you look hard enough, and cannot easily be suppressed 
since the GPL lasts as long as copyright.  There are also forks based on 
earlier Free SugarCRM versions.


Click-to-dial is pretty easy to implement.  If you can display a link to a CGI 
script, and you have an Apache server running on the Asterisk server, then you 
can set up click-to-dial.  You should be able to modify the Source Code of 
whatever you are using easily enough, so wherever it displays a phone number, 
it will linkify it for you.  The easiest way probably is just to write a 
function to do this.  Example in PHP:

function phone_link($tel) {
return "http://192.168.0.2/cgi-
bin/make_call?tel=$tel">$tel";
};

assuming 192.168.0.2 is your Asterisk server and the script is called 
make_call .

You will need to have a database somewhere relating the IP addresses of 
workstations to their extension numbers  (if using DHCP, you need to place a 
series of host{} declarations in dhcpd.conf to assign a fixed IP to each 
workstation's MAC address -- see man 5 dhcpd.conf) -- the Asterisk server 
itself probably is as good a place as any.  Then in your CGI script, you 
simply look up the IP address of the client  ($_SERVER["REMOTE_ADDR"] in PHP, 
$ENV{"REMOTE_ADDR"} in Perl)  to find the nearest extension number, and 
generate a call file.


In KDE's Kontact application, it is possible to invoke an external command 
when clicking on a phone number, and have the number inserted into the 
command; this originally was meant to launch the toxic, proprietary, anti-
telecommunications tool Skype, but you could use wget to fire off a request to 
the CGI script, like so:
wget -O/dev/null http://192.168.0.2/cgi-bin/make_call?tel=%n


The following CGI script is not quite complete in itself  (it needs the above-
mentioned database relating phone numbers to IP addresses, and a suitable 
context in your dialplan in which to make the outgoing call)  but should give 
you a good starting point to work from:

#  8<  #

#!/usr/bin/perl -w
use strict;
use DBI;

my ($web, $input_buffer, $name, $value, %parameters);
my ($ip, $ext, $tel);

my $dbh = DBI->connect("DBI:mysql:database=phones;host=localhost", "root", 
"");
my $sth_get_ext = $dbh->prepare("SELECT ext FROM extensions WHERE pc_ip LIKE 
?");

foreach (split/&/, $ENV{'QUERY_STRING'}) {  #   GET items
tr/+/ /;
($name,$value) = split /=/, $_;
$name  =~ s/%(..)/pack'c', hex $1/eg;
$value =~ s/%(..)/pack'c', hex $1/eg;
$parameters{"$name"} = "$value";
};
read STDIN, $input_buffer, $ENV{"CONTENT_LENGTH"};  #   POST items
foreach (split/&/, $input_buffer) {
tr/+/ /;
($name,$value) = split /=/, $_;
$name  =~ s/%(..)/pack 'c', hex $1/eg;
$value =~ s/%(..)/pack 'c', hex $1/eg;
$parameters{"$name"} = "$value";
};

print "Content-type: text/plain\n\n";

$tel = $parameters{"tel"} || "";
$sth_get_ext->execute($ENV{"REMOTE_ADDR"});
if ($sth_get_ext->rows) {
($ext) = $sth_get_ext->fetchrow_array;
};
$sth_get_ext->finish;

if ($ext) {
print "Calling from '$ext' to '$tel'.\n";

open CALLFILE, ">/tmp/asterisk_$$.call";
print CALLFILE <<"--STOP--";
Channel: SIP/$ext
Context: autodial
Extension: $tel
Priority: 1
CallerId: $ext
--STOP--
close CALLFILE;
system "mv /tmp/asterisk_$$.call 
/var/spool/asterisk/outgoing/${ext}_${tel}.call";
}
else {
print "Go away, we don't know who you are.\n";
};

$dbh->disconnect;

exit;

#  >8  #

-- 
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] Channel is answered by FXO card before callee answered the phone(pick up phone)

2014-06-06 Thread A J Stiles
On Thursday 05 Jun 2014, Mojtaba wrote:
> My scenario is (2)

After doing some tests with my own hardware, I'm now convinced that this is 
actually normal behaviour:  As far as Asterisk is concerned, a call is deemed 
"answered" as soon as the hardware seizes the line.  It is only "not answered" 
if the line is not available.

Which makes sense, because an analogue line has no D-channel.  Once the trunk 
is acquired successfully, there is no way for a machine to know the state of 
the call beyond then.  Such supervisory information as there is -- a regular 
cadence during ringing, possibly a burst of white noise and then a human voice 
-- is geared towards interpretation by human beings.

Moerover, since the tones are different in every country  (and sometimes, 
between different telephone exchanges in the same country; at one time, the UK 
was using three sets of supervisory tones depending whether you were on an 
old-fashioned "clicky-clicky" exchange, an intermediate-generation analogue 
electronic exchange or System X)  it would not be a trivial task to make sense 
of them.


I think if you want full supervisory information, you are going to need to use 
some sort of digital telephony technology  (ISDN or GSM).

-- 
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] Channel is answered by FXO card before callee answered the phone(pick up phone)

2014-06-05 Thread A J Stiles
On Wednesday 04 Jun 2014, Mojtaba wrote:
> Thank you for your replying.
> Is there any way so that i could found the far end user pick up phone? I
> could use Wait() function in dialplan but i dont how long (secend)
> should be wait!
> Thanks with Regards.Mojtaba

I'm confused now.  Please describe which scenario applies to you:

(1)  Your Asterisk box shares an analogue line with an ordinary telephone.  
You want the person sitting at that telephone to be able to answer it and 
prevent the Asterisk box friom answering it.  This is where you need a Wait() 
in your dialplan.

(2)  Outgoing calls from your Asterisk box are showing up as "answered" even 
whether or not the person at the far end picked up their telephone.

-- 
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] Channel is answered by FXO card before callee answered the phone(pick up phone)

2014-06-04 Thread A J Stiles
On Wednesday 04 Jun 2014, Mojtaba wrote:
> Hello Experts.
> Im working with Asterisk PBXand freeswitch PBX.
> I have a challenge with FXO card in Asterisk and i could not solve it yet.
> I hope you could guide me in this regards.
> When i want route the call to FXO channels, Before the callee answer
> the phone (pick up phone), The channel is answered with FXO card. How
> can change this treat so that the callee dont answer the phone, the
> channel dont answered with FXO card. I have this challenge with FXO
> gateway too.
> This challenge is more important when using callfile to generate call
> using DAHDI/g0/
> When using it,All attempts to generate call are answered in CDR
> field(disposision=answered).
> 
> Im waiting for your replying and Thanks.
> With Regards.Mojtaba

If you mean that Dial(DAHDI/g0/${EXTEN}) gets answered straight away, I think 
that behaviour is normal.  There isn't much in the way of supervisory 
information coming along an analogue line, for want of a D-channel.

If you mean that the FXO card shares a line with a normal phone and you want 
to be able to answer an -incoming- call on that phone, then you need a Wait() 
in your dialplan before any Answer().  That will give time for someone to 
answer the phone before Asterisk does; the ringing will stop, and the 
extension will stop being processed.

-- 
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] SMS Capabilities

2014-05-16 Thread A J Stiles
On Friday 16 May 2014, Jayson Devor wrote:
> Hello Everyone,
> 
> We have an order for SMS messaging. Can you gents and ladies be kind enough
> to
> disclose if SMS is possible using Asterisk? What is a quick way to test a
> `Hello World`
> to my cell. Finally, do all service providers support SMS messaging?
> 
> Kind Regards,
> 
> Jayson.

Certainly with an Asterisk-compatible GSM card such as the OpenVox G400P / 
G400E, and some SIM cards, it is possible to send and receive SMS messages.  
Which one you need to buy is dependent on your motherboard's expansion slots:  
G400P is PCI  (32 bit)  and G400E is PCI-express.  SMS is baked into the GSM 
standard, so every mobile telephone company in the world have to support it.  


You can send a message from the Asterisk CLI with a command such as

cli> gsm send sms   "" 

and therefore, from any programming language that has `backticks` or some 
other way to execute a shell command.


Beware!  You may discover very quickly that "unlimited"  (as in when your 
telco promises "unlimited SMS messages")  does not really mean what you think 
it means  :/

Double beware!  Some telcos charge for the delivery report  (which is required 
by the driver software to know if or not the message was sent successfully);  
and some telcos require you to obtain written permission in advance to use 
their SIM in anything other than an ordinary mobile handset, on pain of 
disconnection.  


You can of course also use this piece of kit to receive SMS messages  (they 
are logged under /var/log/asterisk/sms/ ; and also, an extension is triggered 
in your dialplan when a message comes in, with some channel variables 
populated with the originating number, message content and some other goodies)  
and dial and answer voice calls.


-- 
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] AMR installation error

2014-04-30 Thread A J Stiles
On Wednesday 30 Apr 2014, [Digital^Dude] ® wrote:
> make gives this:
> 
> codec_amr.c: In function 'amrtolin_sample':
> codec_amr.c:227: error: 'AST_FORMAT_AMRNB' undeclared (first use in this
> function)
> codec_amr.c:227: error: (Each undeclared identifier is reported only once
> codec_amr.c:227: error: for each function it appears in.)
> codec_amr.c: In function 'lintoamr_frameout':
> codec_amr.c:345: warning: unused variable 'byte_count'
> codec_amr.c: At top level:
> codec_amr.c:409: error: 'AST_FORMAT_AMRNB' undeclared here (not in a
> function)
> make[1]: *** [codec_amr.o] Error 1
> make: *** [codecs] Error 2
> 
> Any ideas how to fix it?

Your question reads like "Hello, is that the vet?  One of my animals is 
poorly" and is liable to get the same sort of answer.

Which version of Asterisk are you trying to build, on what OS and for what 
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] Asterisk -rx, how expensive is it? Should you avoid "spamming" it?

2014-04-25 Thread A J Stiles
On Thursday 24 Apr 2014, Mikael Fredin wrote:
> I will look into netcat as well, thank you

There's not much to look into, really!  It's just a command-line tool for 
connecting STDIN and STDOUT to a network socket.

$ echo -e "WIBBLE\nWIBBLE\nWIBBLE" | nc somehost.co.uk 3245

will send
WIBBLE
WIBBLE
WIBBLE
to port 3245 of host somehost.co.uk , and display any response coming back on 
STDOUT.  It really is that simple!

Another example:

$ echo -e "USER fred\nPASS b00bies\nQUIT" | nc pop3.myisp.co.uk 110

will quickly login to your POP3 server and then logout without retrieving any 
messages; this can be useful if you need to make a POP3 connection before you 
can send mail using SMTP.

-- 
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] cdr viewer for csv

2014-04-24 Thread A J Stiles
On Thursday 24 Apr 2014, binary dreamer wrote:
> really nice. but could tell me the way, play?

I think we have gone as far as we can with this matter on this list, which is 
strictly for non-commercial discussion only.

If you would still like to contact me off-list, please change the underscore in 
my e-mail address to a figure "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 --
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   >