[asterisk-users] Customizing the messages for voice mail

2016-09-14 Thread D'Arcy J.M. Cain
I know that users can create their own messages but I can't see how to
change the extension number.  Here is my scenario.

Users extensions can be any string.  Sometimes it is an actual phone
number but often it is their user ID.  Let's say that two of them are
foo and foo3.

I also provide virtual PBX extensions that accept an extension and
direct the call to a device.  A phone can be in more than one PBX so
calling 41 might assign extension 200 to foo and 201 to foo3.
Calling 416555 might assign 210 to foo and 220 to foo3.

All of this works great until a call goes to voice mail.  Now the foo
extension says "The person at extension  is not
available"...  The message for foo3, which might be extension 201 or 220
in the above example depending on which PBX was called will say "The
person at extension 3 is not available..."

So my question is this.  Is there some way in the dialplan to set the
number that is used for that message?  Is there a variable that can be
set before doing a GoTo to foo or foo3?

Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


Re: [asterisk-users] How to FAX - mostly solved

2016-09-05 Thread D'Arcy J.M. Cain
On Sun, 4 Sep 2016 10:23:06 -0400
"D'Arcy J.M. Cain" <da...@vex.net> wrote:
> The docs for faxing seem a little light but I think I have managed to
> put something together.  It mostly works but I have a couple of
> issues.  The main one is identifying myself.  Setting CALLERID doesn't
> seem to have any effect.

For future searches here is my fix.

> How this works is that I have a script that calls Asterisk through
> AMI,  It defines a number of variables and does an originate.  It
> looks something like this:
> 
> Action: Originate
> Channel: SIP/thinktel/%%(destination)s

I added the following:

CallerID: %%(sender_name)s <%%(sender_num)s>

>   same => n,Set(CALLERID(NAME)=${sender_name})
>   same => n,Set(CALLERID(NUM)=${sender_num})
> ; attempting to set caller ID but it doesn't work

Not needed or used.  The CallerID in the AMI script fixes this.

>   same => n,Set(FAXOPT(headerinfo)=${sender_name})
>   same => n,Set(FAXOPT(localstationid=${sender_num})
> ; another attempt to identify ourselves

I believe that this is still useful for adding info to the fax pages.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


[asterisk-users] How to FAX - mostly solved

2016-09-04 Thread D'Arcy J.M. Cain
The docs for faxing seem a little light but I think I have managed to
put something together.  It mostly works but I have a couple of
issues.  The main one is identifying myself.  Setting CALLERID doesn't
seem to have any effect.

How this works is that I have a script that calls Asterisk through
AMI,  It defines a number of variables and does an originate.  It looks
something like this:

Action: Originate
Channel: SIP/thinktel/%%(destination)s
Context: LocalSets
Exten: sendfax
Priority: 1
Timeout: 3
Variable: faxfile=%%(faxfile)s
Variable: uid=%%(uid)s
Variable: destination=%%(destination)s
Variable: sender_name=%%(sender_name)s
Variable: sender_num=%%(sender_num)s

The variables are filled in based on who the fax was received from.

The extension looks like this.  I added extra comments for
clarification.

; this extension is called via AMI
exten => sendfax,1,Verbose(0,FAX ${faxfile} to ${destination})
; something for the logs

  same => n,Set(CDR(uid)=${uid})
; the user ID (uid) is a field added by us to track the user
; who sent the fax

  same => n,Set(CDR(userfield)=NotSent)
; will be changed later if successful

  same => n,Set(CALLERID(NAME)=${sender_name})
  same => n,Set(CALLERID(NUM)=${sender_num})
; attempting to set caller ID but it doesn't work

  same => n,Set(FAXOPT(headerinfo)=${sender_name})
  same => n,Set(FAXOPT(localstationid=${sender_num})
; another attempt to identify ourselves

  same => n,SendFax(${faxfile},d)
; faxfile is defined by AMI script

  same => n,Set(STATUS=Status: ${FAXOPT(status)})
  same => n,Set(STATUS=${STATUS}\nRemote ID: ${FAXOPT(remotestationid)})
  same => n,Set(STATUS=${STATUS}\nMaxrate: ${FAXOPT(maxrate)})
  same => n,Set(STATUS=${STATUS}\nMinrate: ${FAXOPT(minrate)})  
  same => n,Set(STATUS=${STATUS}\nECM: ${FAXOPT(ecm)})  
  same => n,Set(STATUS=${STATUS}\nnumber of pages: ${FAXOPT(pages)})  
  same => n,Set(STATUS=${STATUS}\nRate: ${FAXOPT(rate)})  
  same => n,Set(STATUS=${STATUS}\nResolution: ${FAXOPT(resolution)})  
; create a string to send back to the user  
; the "\n" adds a literal string and not a newline  
 
  same => n,GotoIf($["${FAXOPT(status)}" = "SUCCESS"]?faxok)  
  same => n,Set(STATUS=${STATUS}\nError: ${FAXOPT(error)})  
; if successful the this line is not added to the status  

  same => n(faxok),Verbose(0,${STATUS})
; put status into log

  same => n,Set(FAXNAME=${CUT(faxfile,/,6)})
; sets the base name of the file

  same =>
  n,Set(FILE(/var/spool/asterisk/fax_status/${FAXNAME})=${STATUS})
; write status to file

  same => n,GotoIf($["${FAXOPT(status)}" != "SUCCESS"]?faxfail)
; on failure skip the reset and go straight to hangup

  same => n,System(/bin/mv '${faxfile}' /var/spool/asterisk/fax_success/)
; move the file so that we don't try to send it again

  same => n,Set(CDR(userfield)=${destination})
; replace this field with actual destination

  same => n,Verbose(0,FAX charged to ${uid})
; for the log - actual billing uses the cdr table

  same => n(faxfail),Hangup()
; all done

Please critique.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-09-01 Thread D'Arcy J.M. Cain
On Thu, 1 Sep 2016 13:49:57 + (UTC)
t...@softins.co.uk (Tony Mountifield) wrote:
> > What module am I missing?  
> 
> The ExecIf command is provided in the module app_exec, which is
> usually located at /usr/lib/asterisk/modules/app_exec.so

Yes, I see it.

> Maybe you had turned off app_exec in the menuconfigi when building,
> or maybe your modules.conf has a noload => app_exec.so

The distributed modules.conf does not appear to mention it at all.  I
don't need it now after all so I won't add it in until I can evaluate
the security issues that it might bring with it.  It's hard to find
documentation for it other than the actual source code.

http://doxygen.asterisk.org/trunk/dc/d73/app__exec_8c-source.html

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-09-01 Thread D'Arcy J.M. Cain
On Thu, 1 Sep 2016 11:02:57 +0200
Administrator TOOTAI <ad...@tootai.net> wrote:
> > [Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application
> > 'ExecIf' for extension (unauthenticated, 55, 3)
> >
> > Is there a module that I need to load?
> >
> > In case it matters I am running Asterisk 11.23.0 on NetBSD 7.0.  
> 
> What's the output of CLI command "core show application ExecIf" ?

It looks like this doesn't matter any more but I do wonder why I don't
have that command.

# asterisk -x "core show application ExecIf"
Your application(s) is (are) not registered
Command 'core show application ExecIf' failed.

What module am I missing?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-09-01 Thread D'Arcy J.M. Cain
On Thu, 1 Sep 2016 06:22:18 -0400
Mark Wiater <mark.wia...@greybeam.com> wrote:
> On 8/31/2016 9:57 PM, D'Arcy J.M. Cain wrote:
> > exten => 55,1,Verbose(Door buzzer calling)  
> >> same => n,Set(toRing=)
> >> same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN
> >> USE"]?Set(toRing=${toRing}/user1)  
> > Failed.  I checked the online docs and the syntax seems to be
> > correct but I get this:
> >
> > [Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application
> > 'ExecIf' for extension (unauthenticated, 55, 3)  
> 
> Set is a function, not an application. ExecIF executes an application.

I wondered about that but the docs are not very explicit on the subject
and I thought that the other poster was suggesting something that he
had used/tested.

> I'm a bit confused by this whole topic. The dialplan snippet in the 
> original email
> 
> > exten => 55,1,Verbose(Door buzzer calling)
> >same => n,Dial(SIP/user1/user2/user3)  
> 
> should have rung the phones forever as long as one phone was active
> and not forwarding or DNDing.

So does the Dial command go directly to the registered device or does
it use the extension?  I was assuming that it was going to the
extension's voice mail if it wasn't there but that's in the extension
dialplan and I suspect that the extension is irrelevant and only the
SIP registration matters.  That would be a good thing since many
extensions also ring the user's cell phone and that would be annoying
if they were at home when someone came to the office door.

Perhaps my problem was that one of the users was removed from sip.conf
but their phone was still in the above plan.  For example, user2 leaves
the company, is removed from sip.conf but we forgot to remove him from
the door buzzer extension.  That might give me the behaviour that I was
seeing.

I think I have enough information now to analyze this problem if it
happens again.  Thanks for the help.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-08-31 Thread D'Arcy J.M. Cain
On Tue, 30 Aug 2016 17:56:35 +0200
Administrator TOOTAI <ad...@tootai.net> wrote:
> Something like
> 
> exten => 55,1,Verbose(Door buzzer calling)
> same => n,Set(toRing=)
> same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN 
> USE"]?Set(toRing=${toRing}/user1)

Failed.  I checked the online docs and the syntax seems to be correct
but I get this:

[Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application
'ExecIf' for extension (unauthenticated, 55, 3)

Is there a module that I need to load?

In case it matters I am running Asterisk 11.23.0 on NetBSD 7.0.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-08-30 Thread D'Arcy J.M. Cain
On Tue, 30 Aug 2016 11:42:04 -0400
Eric Wieling <ewiel...@nyigc.com> wrote:
> > [Aug 23 10:20:55] WARNING[-1][C-0001fee7] app_dial.c: Unable to
> > create channel of type 'SIP' (cause 20 - Subscriber absent)
> >
> > I am assuming that the voice mail is for the absent (unregistered)
> > user.  
> 
> You should set your verbosity to 3 and then reproduce the call and
> paste the CLI output.   It is pointless to troubleshoot without the

I can't do it during the day but I will try overnight.  Can't be
tonight as I have a gig (120 Diner at 120 Church if you happen to be in
Toronto) but I will try later this week.

> CLI output.  The warning is expected when the phone is offline and
> does not cause the issue you are experiencing.  It almost looks like
> Local/ channels are involved, but we'll know more once we see the CLI

What do you mean by "Local channels?"  They are local to the server.
Do you mean that I might be in the wrong context?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-08-30 Thread D'Arcy J.M. Cain
On Tue, 30 Aug 2016 17:56:35 +0200
Administrator TOOTAI <ad...@tootai.net> wrote:
> exten => 55,1,Verbose(Door buzzer calling)
> same => n,Set(toRing=)
> same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN 
> USE"]?Set(toRing=${toRing}/user1)
> same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN 
> USE"]?Set(toRing=${toRing}/user2)
> same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN 
> USE"]?Set(toRing=${toRing}/user3)
> same => n,Dial(${toRing:1}) ;to remove the first &
> 
> would do the work

That looks good and is easy to add and delete from the list.  I will
give this a try one night this week.  Not sure what that last line
would do if all of the phones are off but if they are the buzzer won't
be answered anyway.

Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-08-30 Thread D'Arcy J.M. Cain
On Tue, 30 Aug 2016 15:53:04 +0100
A J Stiles <asterisk_l...@earthshod.co.uk> wrote:
> > exten => 55,1,Verbose(Door buzzer calling)
> >   same => n,Dial(SIP/user1/user2/user3)

> Here's a protip for you:  It's *not* a massive corporate secret,

I will give you the benefit of the doubt and assume that you are not
trying to patronize me.

> which phone will ring when somebody dials what number.  Obfuscating
> your real dialplan like that just makes it harder for other people to
> help you.

All I did was sanitize the buzzer phone number and the names of the
users.  Other than that the above is the complete dialplan.  See my
other message for details of those extensions.  I didn't think that
there was anything relevant in that but I could be wrong.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


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

2016-08-30 Thread D'Arcy J.M. Cain
On Tue, 30 Aug 2016 10:39:14 -0400
Eric Wieling <ewiel...@nyigc.com> wrote:
> The dialplan below cannot go to voicemail, either something else is 

Of course not.  It's the individual extensions that have voice mail.  I
have a similar problem when one of those destinations is a cell phone
but I know that there is no Asterisk solution for that problem.  If the
cell phone answers and goes into the cell phone voice mail I am
screwed.  I can't fix that unless I also run the cell phone company.

In this case the extensions are all set up in the same asterisk
server.  Here is an example.

[user1](client-phone) 
secret=NotTheRealSecret
callerid=John Doe <551212>  
mailbox=user1@VoiceMail
context=pbxout-19212

And here is the extension that calls it.  Sorry about the wrapping.

user1,1,Verbose(0,Entering extension user1)  
 same => n,GotoIf($["${DEVICE_STATE(SIP/906549)}" =
"UNAVAILABLE"]?DialCell)
 same => n(DialWifi),Verbose(0, ${CALLERID(all)} Calling ${EXTEN} and
SoftPhone)
 same => n,Dial(SIP/user1/906549,30)  
 same => n,Goto(VoiceMail) 

 same => n(DialCell),GotoIf($["x716555" = "x"]?DialDesk) 
 same => n,GotoIf($["${CALLERID(ani)}" = "716555"]?DialDesk) 
 same => n,Verbose(0,${CALLERID(all)} Calling "${EXTEN}" and cell
 "716555") 
 same => n,Dial(SIP/user1/thinktel/716555,30)  
 same => n,Goto(VoiceMail) 
  
 same => n(DialDesk),Verbose(0,${CALLERID(all)} Calling ${EXTEN}) 
 same => n,Dial(SIP/user1,30)  
  
 same => n(VoiceMail),Set(CDR(userfield)=VoiceMail) 
 same => n,Set(_ACCOUNT=user1)  
 same => n,VoiceMail(user1@VoiceMail,u)  
 same => n,Hangup() 

It's a complicated extension but I believe that the following is the
essential part.

user1,1,Verbose(0,Entering extension user1)  
 same => n,Dial(SIP/user1,30)
 same => n,VoiceMail(user1@VoiceMail,u)
 same => n,Hangup()

> going on or the dialplan below is not the actual dialplan. Calls only
> go to voicemail when the dialplan runs the VoiceMail application.

> Paste the Asterisk console output of a call showing the problem,
> maybe someone can help.

Here is what the log shows.  I can't put the unregistered user back at
the moment.  Perhaps I can do it overnight when no one is going to the
building.

[Aug 23 10:20:55] WARNING[-1][C-0001fee7] app_dial.c: Unable to create
channel of type 'SIP' (cause 20 - Subscriber absent)

I am assuming that the voice mail is for the absent (unregistered) user.

> > exten => 55,1,Verbose(Door buzzer calling)
> >same => n,Dial(SIP/user1/user2/user3)

Other than sanitizing the buzzer phone number and the user names this
is the full extension for the buzzer.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


[asterisk-users] Multiple phones when one is unregistered

2016-08-30 Thread D'Arcy J.M. Cain
I have an extension that looks like this:

exten => 55,1,Verbose(Door buzzer calling)
  same => n,Dial(SIP/user1/user2/user3)

The idea is that any of the three users can answer the phone to let
someone in.  The problem is that if, say, user2 unplugs his phone then
the call immediately goes to his voice mail and the other two do not
have the ability to open the door.

Is there any way to direct only to phones in a list that are currently
registered?  I am sure that I can write a rather convoluted extension
to check for registrations and create a dial command but I am hoping
that there is an easier way so that I can create these types of
extensions for other clients easily as well as being able to add and
remove destinations quickly.

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


[asterisk-users] Fax failure - RTP too short

2016-08-29 Thread D'Arcy J.M. Cain
I tested my fax extension with some fax machines and they worked.  I
then pointed a client at it and the first two fax machines they tried
to send to failed with the following error.

WARNING[-1][C-00022893] res_rtp_asterisk.c: RTP Read too short

I am wondering if there might be some incompatibility with some fax
machines and not others.  Or, is there a setting that I am missing.

Note that even though it is a warning

Is there some way to increase the verbosity of sendfax?  Is there some
other place I should be examining?

I am using Asterisk 11.23 on a NetBSD system.  My extension looks
something like this:

exten => sendfax,1,Verbose(0,FAX ${faxfile} to ${destination})  
  same => n,Set(FAXOPT(headerinfo)=Fax from Acme Anvils)
  same => n,Set(FAXOPT(localstationid=55)
  same => n,SendFax(${faxfile})
  same => n,System(rm ${faxfile})
  same => n,Hangup()

Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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

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

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


Re: [asterisk-users] losing audio from one end after 5 min.

2016-08-12 Thread D'Arcy J.M. Cain
On Fri, 12 Aug 2016 16:44:32 +
"Jonas Christoffersen" <j...@showitmedia.eu> wrote:
> Just tested the connection in the other direction and when calling
> out there is no problem.
> only when calling in.

It sure sounds like a NAT problem.  Missing audio has a 90% or more
probability of being NAT related.  Maybe it's a problem on the gateway
device.  What is the modem/router?

P.S. The subject was driving me nuts.  I had to correct it.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Toll free pattern matching

2016-08-05 Thread D'Arcy J.M. Cain
On Fri, 5 Aug 2016 09:26:03 -0500
Richard Mudgett <rmudg...@digium.com> wrote:
> Dialplan will stay on the current series of extensions until it runs
> out. If there isn't an explicit hangup

So glad I asked.  I see now that it only worked because of the accident
that the specific 800 extension and the generic one just happened to
have the same number of priorities.  I have added explicit hangups.

Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Toll free pattern matching

2016-08-05 Thread D'Arcy J.M. Cain
I have this in my config:

exten => _800XXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
  same => n,Dial(SIP/tollfree/1${EXTEN})
exten => _1800XXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
  same => n,Dial(SIP/tollfree/${EXTEN}) 
exten => _NXXNXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
  same => n,Dial(SIP/trunk/1${EXTEN})
exten => _1NXXNXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
  same => n,Dial(SIP/trunk/${EXTEN}) 

I came across
http://stackoverflow.com/questions/7235291/asterisk-priorities-that-have-a-possibility-of-matching
which seems to imply that the above won't work and that all the calls
would go to the trunk.  However, this is working as expected for me.
Did the behaviour change in the last four years or could I run into
problems with this setup?  Perhaps I am misunderstanding the poster's
issue.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-08-04 Thread D'Arcy J.M. Cain
On Thu, 4 Aug 2016 09:38:24 -0400
"Robert Berlin" <r...@flhsi.com> wrote:
> A password prompt is avoidable with a ",s" in the VoicemailMain
> appdata 

Perhaps you should read the whole thread before replying.  Variations
of your suggestions have been made a number of times.  Also, please
watch the attributions.  I am not the one trying to make this work.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-08-04 Thread D'Arcy J.M. Cain
On Thu, 4 Aug 2016 14:03:39 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> I should add, a password is *always* asked if a password has been set.
> There isn't a way to bypass that.

Then something is wrong.

http://darcy.vex.net/star98.mp3

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-08-04 Thread D'Arcy J.M. Cain
On Thu, 4 Aug 2016 14:03:25 +0100
A J Stiles <asterisk_l...@earthshod.co.uk> wrote:
> To get rid of the "Mailbox?" prompt, you need to supply a mailbox as
> a parameter to the VoicemailMain() command:

That's why I suggested this extension at the start of this thread.

exten => *98,1,Verbose(0,${CHANNEL(peername)} calling voicemail)
same => n,VoicemailMain(${CHANNEL(peername)}@VoiceMail,s)
same => n,Hangup

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-08-04 Thread D'Arcy J.M. Cain
On Thu, 4 Aug 2016 14:01:27 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> You seem to misunderstand even after I have explained.  I don't need a
> password when calling my mailbox from my own registered phone (not

And the extension I suggested in answer to your original question will
do that for you.  Are you saying that pressing "*98" from your phone
requests a password?

> calling from any other phone). I don't need to call my mailbox from
> other phones on the planet, so I don't need a password.  Consider the

You need a password to protect your mailbox from people entering '*'
during your message.  The extension I gave you bypasses the password
when you call from your own phone.

> voicemail you get from your mobile network on your mobile phone. You
> don't access it from any phone in the world; you only access it from
> the mobile phone which has your SIM, and you probably don't enter a
> password for it.

Yes but if someone accesses it from another phone it damn well better
ask for a password before serving up my messages.

> The password is only asked if a password has been set. A password is
> also asked if any number is entered after the 'mailbox' prompt.

>From outside phones.  What happens when you dial "*98" from your own
phone.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-08-04 Thread D'Arcy J.M. Cain
On Thu, 4 Aug 2016 09:12:53 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> On 30 July 2016 at 19:32, D'Arcy J.M. Cain <da...@vex.net> wrote:
> > Not playing the prompt changes nothing.  If someone presses '*'
> > while listening to your answer message then they are in your
> > mailbox.  You better have a password that they need to enter to
> > continue.
>
> I have now tested the 'Unavailable' message by pressing "*" while
> listening to the recorded message. I can confirm that this does NOT
> directly enter to the called number's mailbox. It actually enter's
> the registered device's/caller's own mailbox. Therefore, this does
> not necessitate setting a password.

Let's get this straight.  You call yourself from any phone in the world
and press '*' while listening to the message, you wind up in your own
mailbox and you believe that means that you don't need a password?  Do
you think that the phone system somehow knows that it is you calling
and not one of the other 7.4 billion people on the planet.  The
password is how it knows.

> The problem is that the 'mailbox' prompt allows a way for accessing
> any other mailbox, which is not necessary in my case. If anyone knows
> a way to remove this 'mailbox' prompt, please let me know.

This seems to conflict with the first paragraph.  Are you being asked
for the mailbox number or the password?  In a properly set up system,
entering '*' during the message should put you into the callee's
mailbox and ask for a password.  Calling '*98' from your own phone, if
the extension I originally showed you exists, should put you directly
into your own mailbox without asking for a password.

I think that it is well past the time to tell us what your setup is and
exactly what you are trying to accomplish.  I think that you may be
making the common error of telling us your solution (remove mailbox
prompt) rather than your actual problem.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-08-01 Thread D'Arcy J.M. Cain
On Mon, 1 Aug 2016 09:08:36 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> I am using ODBC realtime storage with Asterisk. Currently, with no
> password set, a user can dial the voicemail number to retrieve their

>From their own phone or from any phone?

> I am yet to test this behaviour in Asterisk during the
> Unavailable/Busy message. However, if this is the case, then this
> seems to be an illogical security hole in Asterisk's design. Why does
> Asterisk allow accessing another person's mailbox by pressing the '*'
> key, while listening to *the other person's* unavailable message?

It's not for accessing another person's mailbox.  It's for accessing
your own when you are away from home/office.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-07-31 Thread D'Arcy J.M. Cain
On Sun, 31 Jul 2016 06:19:13 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> I tried your extension definition as suggested:

But did you understand every line and what it was doing?

> exten => *98,1,Verbose(0,${CHANNEL(peername)} calling voicemail)
> same => n,VoicemailMain(${CHANNEL(peername)}@VoiceMail,s)
> same => n,Hangup
> 
> But there was no change in the prompts asked, ie. the voice first
> asked for 'mailbox', and then 'password' as before. The prompts are
> not removed.

Too much information missing.  Perhaps instead of asking how to
implement the solution that you have already decided on you should
instead tell us what problem you are trying to solve.  Are you really
trying to make your voicemail available to anyone who calls you or are
you limiting it to just the registered phone?  How are you accessing VM?

> Please clarify what you mean by the following:
> 
> "If someone presses '*' while listening to your answer message then
> they are in your mailbox."
> 
> Do you mean while someone is listening to another user's 'unavailable
> message' or 'busy message', if they press '*' at that time they will
> enter the other person's mailbox?

That's exactly what I mean.  That's why you need to password protect
it.  The above recipe allows you to bypass the password prompt but only
when called from the registered phone and only when "*98" is dialed
from that phone.

I suspect that you need to read the documentation a lot more.  VoIP/SIP
is complicated.  I certainly don't understand everything but I was able
to craft the above extension by reading up on extensions as well as
system variables.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-07-30 Thread D'Arcy J.M. Cain
On Sat, 30 Jul 2016 15:52:36 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> If I remove the password, how can anyone access the mailbox if the
> 'mailbox' prompt is not played?

Not playing the prompt changes nothing.  If someone presses '*' while
listening to your answer message then they are in your mailbox.  You
better have a password that they need to enter to continue.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Removing mailbox and password prompt for voicemail

2016-07-30 Thread D'Arcy J.M. Cain
On Sat, 30 Jul 2016 06:43:47 +0100
Nabeel <nabeelshik...@gmail.com> wrote:
> I am using Asterisk voicemail on a CentOS 7 server. I would like to
> be able to remove the 'mailbox' prompt and 'password' prompt when a

I assume that you mean when they access it from their own phone.

> user tries to access their voicemail. I can remove the 'password'
> prompt by not setting a password for the user, but the 'mailbox'

Bad, bad idea.  If you remove the password then anyone can get to the
mailbox.

> prompt is always heard. Please let me know how Asterisk can be
> configured to remove these prompts.

Define this local extension:

exten => *98,1,Verbose(0,${CHANNEL(peername)} calling voicemail)
same => n,VoicemailMain(${CHANNEL(peername)}@VoiceMail,s)
    same => n,Hangup


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] rasberry pi

2016-07-06 Thread D'Arcy J.M. Cain
On Wed, 6 Jul 2016 01:10:23 -0700
Thufir <hawat.thu...@gmail.com> wrote:
> I'm debating between a cloud PBX or, perhaps, rasberry pi.  For a
> SOHO, maybe three hardphones, rasberry pi would suffice?  I would be
> amazed, but, if so, great.

I haven't used it extensively but I run Asterisk on an older Raspberry
(not Rasberry btw) Pi for demo purposes and never saw any issues.  If
all of your phones are internal it's probably not even carrying voice
traffic as long as you set "directmedia=yes" in sip.conf.  I would be
surprised if it couldn't handle hundreds of phones easily.  Even if you
have to proxy the voice traffic (e.g. your phones are behind a NAT) it
should have no trouble with three concurrent calls.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] Phone Number Validation

2016-03-29 Thread D'Arcy J.M. Cain
On Tue, 29 Mar 2016 09:53:15 +0100
Rizwan H Qureshi <rizwanhas...@gmail.com> wrote:
> I need to develop a service which tells me whether a given phone
> number is in service and is valid or not. It can be international
> number. This is basically to clean the list of leads we have. Is
> there any service which can give me the required information?

Sounds like a service that spammers have been searching for since Alex
called Tommy and asked him to "Come here."

Such a service is impossible.  There is no way to tell if a number will
be answered without actually calling it.  Even then you don't know
whether an out of service is temporary or permanent.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 flush user input before READ()

2016-01-19 Thread D'Arcy J.M. Cain
On Tue, 19 Jan 2016 09:02:30 -0800 (PST)
Steve Edwards <asterisk@sedwards.com> wrote:
> >>> How about a read() to a dummy variable with a 1 second timeout to 
> >>> consume the octothorpe and password?
> 
> If 1 second is too long, you could write an AGI to use the 'wait for 
> digit' AGI command which allows the timeout to be specified in 
> milliseconds.

If I understand it the OP has un-consumed input and is just looking for
the shortest possible time to read it.  Would a read with a timeout of
zero do the job or would Asterisk optimize away the call?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Virtual domain redirects

2016-01-07 Thread D'Arcy J.M. Cain
On Thu, 7 Jan 2016 00:04:05 -0500
"D'Arcy J.M. Cain" <da...@vex.net> wrote:
> I am trying to figure out how to allow da...@example.com to be
> translated to dc2...@vex.net (out ISP domain) but I am at a loss to

I think I see where I can hook this.

same => n,Verbose(0,To: ${SIP_HEADER(To)})

This shows me the actual address called.  e.g.
"To: <sip:da...@vybenetworks.com>".  Now I just need to look for a
place to grab this and put in a GoTo.  Perhaps a new incoming context
that does the lookup and then jumps to the existing incoming context.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] No joy with my first AGI Python script

2016-01-06 Thread D'Arcy J.M. Cain
It's very simple but it doesn't work.  Here's the entire script.

#! /usr/bin/python

import sys

env = {}

def comm(cmd):
sys.stdout.write(cmd.strip() + '\n')
sys.stdout.flush()
return sys.stdin.readline().strip()

while 1:
   line = sys.stdin.readline().strip()

   if line == '': break

   key,data = line.split(':')
   if key[:4] == 'agi_':
   key = key.strip()[4:]
   data = data.strip()
   if key: env[key] = data

#comm("Verbose(0,pyast: %s)" % sys.argv)
comm('SAY NUMBER 123 ""')

sys.stderr.write("AGI Environment Dump:\n");
for key in env.keys():
   sys.stderr.write(" -- %s = %s\n" % (key, env[key]))

sys.stderr.flush()

The extension is;

exten => *22,1,Verbose(0,${CHANNEL(peername)} calling 22 TEST)
  same => n,AGI(/home/darcy/pyast,Hello world)
  same => n,Hangup

What happens when I dial it is that the dialplan Verbose statement runs
but nothing else is logged and the number is not said.  When I turn on
AGI debugging I get this:

... (a bunch of agi_ variables)
AGI Tx >> agi_arg_1: Hello world
AGI Tx >> 
AGI Rx << SAY NUMBER 123 ""
AGI Tx >> 200 result=0

There is a delay between the last Rx and Tx suggesting that it thinks
that the numbers are being played but I don't hear them.  Also, the
output to stderr does not appear in the logs.

Here is my environment:
 - Asterisk 11.20.0
 - NetBSD 7.0
 - Python 3.4

Thanks in advance for any help or suggestions.


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Virtual domain redirects

2016-01-06 Thread D'Arcy J.M. Cain
I run an ISP with virtual services.  We also offer VoIP.  Currently we
have our DNS set up so that virtual domains can have SIP addresses in
their own domain.  However, it comes to Asterisk as just the user
name.  For example, my SIP address is sip:da...@vybenetworks.com which
calls extension darcy.  That's fine because I am darcy in both the
virtual domain as well as the underlying ISP domain.  However, clients
can have whatever user name they want within their own domain.  For
example there might be a da...@example.com that points to user dc2016
on our server.  That means that the client's sip address has to be
dc2...@example.com.

I am trying to figure out how to allow da...@example.com to be
translated to dc2...@vex.net (out ISP domain) but I am at a loss to see
how it could work.  It almost seems like I need to run a separate
asterisk server for each virtual client.  Is there some sort of proxy
software that will let me do that more efficiently?  Is there some
magic DNS entries that can change it?

If it helps I am generating the configs from my client database for
asterisk as well as DNS so I don't care how complicated the configs get.

Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] No joy with my first AGI Python script

2016-01-06 Thread D'Arcy J.M. Cain
On Wed, 6 Jan 2016 23:21:44 -0500
"D'Arcy J.M. Cain" <da...@vex.net> wrote:
> Interestingly this led me down a different path.  I added this to my
> script - comm('SET VARIABLE PYAST "hello world"') and displayed the 
> varible in my dialplan and that worked.  Saying a number was just a
> way to test the AGI.  I didn't really need audio for my current 
> project. Now that I know that I can set variables I can continue.
> 
> However, I sure would like to know why SayWhatever isn't working.  I
> will start a new thread for that issue.

Turns out to be related to AGI after all.  I created a new test with
Playback, SayNumber and SayPhonetic and everything worked fine so the
issue was something else.

Aha!  Everything works fine.  I just forgot to answer the phone.

I think I need a session with the Clue-By-Four.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] No joy with my first AGI Python script

2016-01-06 Thread D'Arcy J.M. Cain
On Wed, 6 Jan 2016 12:19:51 -0800 (PST)
Steve Edwards <asterisk@sedwards.com> wrote:
> In no particular order (except #0):
> 
> 0) Use an existing Python library. Nobody gets it right the first
> time. I wrote my C library 100 years ago, so I don't remember all the
> specifics of the AGI protocol.

Are you talking about pyst?  I guess but I am a firm believer in
understanding the technology before I use it.  I learned programming by
depositing bits on an Altair S-100 bus.  Even though I will probably
never get close to that level again I think it made a good foundation.

> 1) Is the space after the 'she-bang' significant?

No.  It does the same whether it is there or not.

> 2) Your 'sys.stderr.write' may be violating the AGI protocol. Writing
> to stdout definitely does. I don't remember what writing to stderr
> does.

I got that from some example code I found.  I removed it but nothing
changed.

> 3) If you dump your AGI environment before 'say number' do you get a 
> different outcome?

Nope.  That was actually where I started.  I moved it to the end just
in case it was causing a problem.

> 4) Any chance the 'digits' directory is missing or that your channel 
> language is set weird? Does the saynumber() dialplan application work?

OK, it doesn't.  Shouldn't I see an error in the logs though?  It
pauses just like the AGI script but nothing is said and no errors are
printed.

> 5) Can you play any audio to the channel? Does
> playback(demo-congrats) work?

Yes, that works.  Also, "playback(digits/4/5/6)" works
which tells me that the digits directory is where it is supposed to
be.  Another data point, "SayPhonetic(hello)" also does not work but
there is silence as long as would expect the audio to last, same as
SayNumber.

> (That was my last straw to grasp -- need another cup of tea.)

Interestingly this led me down a different path.  I added this to my
script - comm('SET VARIABLE PYAST "hello world"') and displayed the 
varible in my dialplan and that worked.  Saying a number was just a
way to test the AGI.  I didn't really need audio for my current 
project. Now that I know that I can set variables I can continue.

However, I sure would like to know why SayWhatever isn't working.  I
will start a new thread for that issue.

Thanks for the pointers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] force sip URI call through PBX

2015-11-30 Thread D'Arcy J.M. Cain
On Mon, 30 Nov 2015 16:42:02 +0100
Julien Sansonnens <jul...@jsansonnens.ch> wrote:
> When I do a SIP URI call from my softphone, the call is made directly
> to the destination host (p2p), bypassing the PBX. So I lose the
> possibility of recording, making statistics, etc ...
> 
> Is there a way to force URI calls through the PBX? I have found no
> configuration at the client or at the server level. Do you know any
> softphone that will allows me to do this ?

If two phones are calling each other directly then there is no server
setting that will reach across the Internet and grab the call.  You
need to insure that the call is proxied through your PBX.  That's just
a setup in your softphone.  You will need to ask about that on a
mailing list for that software.

One thing that I do so that I can call SIP phones from my regular phone
through an ATA is set up extensions for them in Asterisk like this.

exten => 6135553638,1,Dial(SIP/my.fri...@example.com)

Looks like a regular call to my users but bypasses the PSTN.  This
might work for you as well.

Whatever solution you use, you may want to look at directmedia
settings.  If you can talk directly to another SIP client Asterisk may
step out of the picture anyway not allowing you to record the call.
Turning that off forces all the calls to be proxied through you even if
they could talk directly.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Brazil TDM routes

2015-09-22 Thread D'Arcy J.M. Cain
On Tue, 22 Sep 2015 11:32:14 -0300
Josué Conti <josueco...@gmail.com> wrote:
> Dear Joshua, my apologies, about this issue.
Excellent work.  You managed to get your off-topic ad posted to the
list three times.

[text of ad deleted]

The lesson today, kids, is trim your responses.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Respond to an out of call SIP MESSAGE

2015-09-21 Thread D'Arcy J.M. Cain
On Mon, 21 Sep 2015 06:48:52 +
Emil Ohlsson <e...@svep.se> wrote:
> [sip-im]
> exten _X!, 1, NoOp(Got message)
> exten _X!, n, Answer()
> exten _X!, n, Agi(agi://localhost/messagehandler.agi?...)
> exten _X!, n, SendText(Message received)

I am not an expert but perhaps you want this.

[sip-im]
  exten s,1,NoOp(Got message)
same,n,Answer()
same,n,Agi(agi://localhost/messagehandler.agi?...)
same,n,SendText(Message received)

Replacing "exten _X!" with "same" is just a shortcut.  I find that
there are lots of places where spaces cause problems so I just remove
them all for good measure.  Finally, I am not sure what the mechanism
is here but if it is like a goto then I think that you want the 's'
priority.

Or, I totally don't know what I am talking about and my education will
be advanced by the replies to this message.  :-)

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] No ring sound when calling SIP extensions over Webrtc

2015-09-09 Thread D'Arcy J.M. Cain
On Wed, 9 Sep 2015 16:27:19 -0500
Carlos Chavez <cur...@telecomabmex.com> wrote:
> The file is full of definitions for many countries.  It specifically
> has one for Mexico but we usually use the same one as the USA.

I simplified mine:

[general]
country=us  ; default location


[us]
description = United States / North America
ringcadence = 2000,4000
dial = 350+440
busy = 480+620/500,0/500
ring = 440+480/2000,0/4000
congestion = 480+620/250,0/250
callwaiting = 440/300,0/1
dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440
record = 1400/500,0/15000
info = !950/330,!1400/330,!1800/330,0
stutter = 
!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] No ring sound when calling SIP extensions over Webrtc

2015-09-09 Thread D'Arcy J.M. Cain
On Wed, 9 Sep 2015 16:11:03 -0500
Carlos Chavez <cur...@telecomabmex.com> wrote:
>  I am having a small problem that is driving me nuts.  I can make 
> calls over my Webrtc client without any problems and audio sounds
> fine. The only problem I have is that when I call an internal SIP
> extension on my PBX I do not hear the ring while I wait for the call
> to be answered. My dial command does include the rR options.  If I
> make an external call to a land line or a mobile phone I do hear the
> ring sounds, only internal extensions have this problem.  Why would
> the webrtc client ignore the ringing when calling another SIP
> extension?  Any ideas?

I had a similar problem.  Turned out that my indications.conf file was
empty.  Check that out.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] polycom phone behind firewall with asterisk 11.19

2015-08-28 Thread D'Arcy J.M. Cain
On Thu, 27 Aug 2015 16:17:38 -0400
Jerry Geis ge...@pagestation.com wrote:
 I have a polycom phone behind a firewall.
 The phone registers - but I only hear half channel audio.

What version of Asterisk?
Which half can you hear?

After a recent update I had a problem with one way audio.  Maybe you
are having the same problem.  See the recent thread on one way audio
started by me with my solution.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringback issue - SOLVED!

2015-08-26 Thread D'Arcy J.M. Cain
On Mon, 24 Aug 2015 23:48:50 -0400
D'Arcy J.M. Cain da...@vex.net wrote:
 When I dial 416555 I get no ringback which I can sort of live with
 since it gets answered pretty quickly but then when I dial 200 it
 transfers me correctly to the 416555 extension but there is no
 ringback there either and that is a problem because caller think that
 the phone has gone dead.

Found it.  Somehow I wound up with an empty indications.conf file so
Asterisk did not know how to play the ringing sound.  Found the default
file and everything is good again.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringback issue

2015-08-25 Thread D'Arcy J.M. Cain
 (LocalSets, 416555, 6) exited non-zero on
'SIP/416555-001b'


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringback issue

2015-08-25 Thread D'Arcy J.M. Cain
On Mon, 24 Aug 2015 23:48:50 -0400
D'Arcy J.M. Cain da...@vex.net wrote:
   exten = 200,1,Verbose(0,${CALLERID(all)} Calling PBX darcy)
 same = n,GoTo(LocalSets,416555,1)

I tried changing the above to;

  same = n,Dial(SIP/416555)
and
  same = n,Dial(SIP/416555,,r)

Same problem.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringback issue

2015-08-24 Thread D'Arcy J.M. Cain
My last problem was nicely solved through this mailing list so
hopefully this new problem will have the same happy outcome.

My situation is that I have many extensions.  Here is a sample:

[client-phone](!)
type=friend
host=dynamic
secret=XX
dtmfmode=auto
disallow=all
allow=ulaw
allow=gsm
allow=g723
allow=ilbc
subscribemwi=no
 
[416555](client-phone)
secret=xx
callerid=D'Arcy 416555
mailbox=416555@VoiceMail
context=LocalSets

I can send calls to this extension with this:

exten = 1,Verbose(0,${CALLERID(all)} Calling ${EXTEN})
  same = n,Dial(SIP/416555,30)
  same = n,VoiceMail(416555@VoiceMail,u)
  same = n,Hangup()

Up to this point everything works as expected.  I call in and I hear a
ringback until the extension is picked up.

Now I add a virtual PBX to the mix.

[pbx-17842]
  exten = s,1,Verbose(0,${CALLERID(all)} Calling PBX 17842)
same = n,Answer 
same = n,Wait(2)
same = n(announce),Background($SOUNDS/pbx-17842/announce)
same = n,WaitExten()
same = n,DigitTimeout,5
same = n,ResponseTimeout,10
same = n,Goto(s,announce)

  exten = i,1,Verbose(0,${CALLERID(all)} dialed invalid extension
  ${EXTEN}) same = n,Playback(invalid)
same = n,Goto(s,announce)

  exten = 200,1,Verbose(0,${CALLERID(all)} Calling PBX darcy)
same = n,GoTo(LocalSets,416555,1)

Finally I add an extension to go to that context:

exten = 416555,1,GoTo(pbx-17842,s,1)

When I dial 416555 I get no ringback which I can sort of live with
since it gets answered pretty quickly but then when I dial 200 it
transfers me correctly to the 416555 extension but there is no
ringback there either and that is a problem because caller think that
the phone has gone dead.

So, when I call 416555 it works fine but if I call it through the
virtual PBX it fails.  I tried various combinations of Ringing and
'r' options and prematuremedia=no and progressinband=yes but
nothing seems to help.  Can someone suggest a line of enquiry?

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 - doesn't seem to be NAT issue - SOLVED!

2015-08-15 Thread D'Arcy J.M. Cain
On Sat, 15 Aug 2015 12:42:38 -0300
Joshua Colp jc...@digium.com wrote:
  I am not sure why this hasn't bit anyone else.  Perhaps most
  Asterisk systems are in one of two classes, connecting to all NAT
  phones or connecting to all public phones, and I am in a minority
  situation where I am talking to a mix of setups.
 
 Most people run without direct media unless they know the network
 topology will allow it 100%.

Perhaps but the default is to run it.  Perhaps the default should be
no to prevent these problems.

On the other hand, the documentation seemed to suggest that the default
should have worked anyway.  One leg was public, the other behind a
NAT.  It should recognize the latter and not try to put then in direct
contact.  It's almost like it saw the public one and didn't bother
checking the other.  Or, it checked both with an OR instead of an AND
as I said.  That seems more likely since it didn't matter who started
the call.

I don't really care at this point.  If 1% of the calls go through the
server when they didn't really need to it's no big deal.

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 - doesn't seem to be NAT issue - SOLVED!

2015-08-15 Thread D'Arcy J.M. Cain
On Sat, 15 Aug 2015 16:30:39 +0800
Michael Dupree mich...@easybitllc.com wrote:
 Not 100% ure, but maybe play with the canreinvite or directmedia
 settings.

Yes!  That was it.  Just for future searches here is what I did.  I
added directmedia = no in sip.conf.  This fixed the issue.

I believe that Asterisk was getting confused when one leg was inside
NAT and the other was outside.  Perhaps there was an OR where there
should be an AND.  It makes sense because the other user was the one
outside NAT and he could hear me and I could not hear him no matter who
initiated the call.  He could make outside calls because both he and my
provider were on public IPs.

I am not sure why this hasn't bit anyone else.  Perhaps most Asterisk
systems are in one of two classes, connecting to all NAT phones or
connecting to all public phones, and I am in a minority situation where
I am talking to a mix of setups.

Thanks for that.  I was going nuts trying to figure this out.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 - doesn't seem to be NAT issue

2015-08-13 Thread D'Arcy J.M. Cain
On Thu, 13 Aug 2015 10:41:31 +0200
Stefan Viljoen viljo...@verishare.co.za wrote:
 Have you checked your RTP port ranges (I'm sure you have), and also

Yes.  The ATA is using a range well within the range open on the server.

 that the server IP for RTP as specified in the initial SIP is correct?

Both the server and client are outside of NAT so I don't know what this
might mean.  They both have public IPs.

 Not sure how this will relate to your setup, but we had something
 similar here using Asterisk 1.8.11.0 on both sides of the connection,
 via a VOIP service provider in the middle.

This is an Asterisk server talking to an ATA.

 We had slightly different parameters, e. g. that we would have no RTP
 at all, but a call that did connect to total silence, dialed from
 either side.

Was NAT involved?

 Also check what RTP port ranges are being used - I have had this
 one-directional problem where the port range
 in /etc/asterisk/rtp.conf was too broad, and the firewall on my
 server was only allowing a smaller subset of RTP ports.

rtpstart=1
rtpend=2

which is exactly what my packet filter allows through.

 It might require some careful tracing of SIP messages, maybe you can
 try this? Specifically try to determine what RTP port number is being
 negotiated when you have your zero-audio back from the remote party -
 what RTP port and RTP server IP is he using at that moment on his
 side?

I will check that.

Thanks for your suggestions.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] One way audio - doesn't seem to be NAT issue

2015-08-11 Thread D'Arcy J.M. Cain
I have been banging my head against the wall for weeks now on this
one.  I have a switch running NetBSD and Asterisk 11.19.0 although I
have had this problem on older versions as well.  I, and my users, can
call out, we can receive calls, quality is excellent but I cannot talk
with one user.  The different elements are as follows:

The switch as described above which is in a server room on the Internet
backbone with a public IP address.

My home system which is behind a bridged modem through a Linksys
WRT54GS with priority given to my ATA.  The ATA is a Cisco SPA112.  I
also have an actual SIP phone.  The problem happens with both.
Obviously I am using NAT but both devices work just fine if I am going
to the PSTN.

My user who is also going through a bridged modem to a Linksys SPA-2102
which is doing the PPPOE so it has a public IP address and no NAT
involved although it serves NAT for the connected computer.

So here is the problem.  While both of us have no problems externally,
when we call each other we get one way audio and it is always from me
to him no matter who initiates the call.

A further test, I can call from the SIP phone to the ATA connected
phone and vice versa just fine.  That involves two devices behind the
same NAT but since they still need to use the server as an intermediary
I can't see how that would matter.

Given that both of us can make and accept calls and the server is
simply connecting two separate channels I can't see where the problem
might lie.  Can anyone suggest a possible setup issue?

I have tried so many things but I am willing to try them again.  Feel
free to make any suggestion no matter how silly.  I really need to fix
this.

Cheers.


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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-18 Thread D'Arcy J.M. Cain
On Thu, 18 Jun 2015 11:58:34 -0600
Kai-Uwe Jensen kujen...@gmail.com wrote:
 Set(CALLERID(number)=XX) works here.

I believe you and everyone else that says so but...

  Then someone needs to fix this page.
 
  https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables

RANT
We should be able to set up our systems based on the documentation and
not by let's try random things and see what works.
/RANT

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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-18 Thread D'Arcy J.M. Cain
On Thu, 18 Jun 2015 11:27:08 -0600
Greg Woods g...@gregandeva.net wrote:
 [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()

CALLERID is a read only variable.  Set the information in sip.conf in
the extension.

callerid=NAME 551212


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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-18 Thread D'Arcy J.M. Cain
On Thu, 18 Jun 2015 13:45:10 EDT
ken...@gnat.com (Richard Kenner) wrote:

  CALLERID is a read only variable.  
 
 That's not correct.  I set it all over the place in my dialplan.

Then someone needs to fix this page.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] howto copy a voicemail message to another machine ?

2015-06-16 Thread D'Arcy J.M. Cain
On Tue, 16 Jun 2015 11:35:26 -0400
sean darcy seandar...@gmail.com wrote:
 My asterisk server is in the cloud. Figuring out how to send an email
 is too much brain damage. So i can't use the email feature that's
 built into voicemail.

Really?  That was one of the first things I did when I learned
Asterisk.  It was dead simple.  Rather than creating some sort of Rube
Goldberg machine to send email why don't you explain what you tried and
where you ran into problems?

In case it helps, here are my general settings in voicemail.conf:

[general]
attach=yes
maxsilence=10
serveremail=n...@vex.net
format=wav49
fromstring=Vex.Net Voice Mail
nextaftercmd=yes
forcename=yes
pollmailboxes=yes
pollfreq=5

And for each extension I have this (sanitized):

1000 = 1234,D'Arcy,da...@example.com

That's the extension, PIN, name and email address.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Voice mail and caller ID

2015-06-12 Thread D'Arcy J.M. Cain
On Fri, 12 Jun 2015 11:49:05 -0700
John Kiniston johnkinis...@gmail.com wrote:
 Try this for CHAN_SIP:
 
 same = n,Set(Peer=${SIPCHANINFO(peername)}) ; Get the peer
 same = n,Set(MailBox=${SIPPEER(${Peer},mailbox)}); Get the
 mailbox same = n,VoicemailMain(${MailBox}@LocalSets,s)   ; If we
 have a mailbox defined log into it

Perfect.  Thanks.  However, I didn't bother setting a variable.  I just
use it directly.

same = n,VoicemailMain(${SIPCHANINFO(peername)}@LocalSets,s)

However...

http://www.voip-info.org/wiki/view/Asterisk+func+sipchaninfo says that
SIPCHANINFO is deprecated and that we should use CHANNEL instead.  I
tried that and it said pbx.c: Function CHANNEL not registered.  Does
that mean that this solution will eventually fail when SIPCHANINFO is
removed in some future release?  I am running 11.17.1.

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Voice mail and caller ID

2015-06-12 Thread D'Arcy J.M. Cain
I have this in my sip.conf:

exten = *98,1,Verbose(0,CALLERID number is ${CALLERID(num)})
same = n,VoicemailMain(${CALLERID(num)}@LocalSets,s)
same = n,Hangup

However, my extensions are set up so that they always show the external
number, not the extension:

[foobar2](client-phone)
secret=x
callerid=Candace 551212
mailbox=foobar2@LocalSets

So the caller ID is 551212 but the voice mail is foobar2.  Is there
any way to get the actual extension that called?  Can I create a
variable in the extension that I can read instead of ${CALLERID(num)}?
I tried setting a random string (xaccount) and reading it with
${ENV(xaccount)} but it's not an environment variable and didn't work.

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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-08 Thread D'Arcy J.M. Cain
On Mon, 8 Jun 2015 13:19:53 -0700 (PDT)
Steve Edwards asterisk@sedwards.com wrote:
 Look for address blocks (class A, B, C) that are allocated to
 geographic regions you do not have any providers. If you limit your
 'attack surface' you make your security problem manageable.

Get this file:

  http://www.ipdeny.com/ipblocks/data/countries/all-zones.tar.gz

It has all of those blocks for all countries.  I pick that up fresh
every week and block specific countries that I don't have clients in
but seem to be hitting me hard.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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-08 Thread D'Arcy J.M. Cain
On Mon, 8 Jun 2015 22:24:33 +0200
Luca Bertoncello lucab...@lucabert.de wrote:
 Kevin Larsen kevin.lar...@pioneerballoon.com schrieb:
  Basically, they are hoping that you are running the equivalent of a
  mail server open relay. They are trying to use you to dial out to
  another number. You don't want to pay for these calls.
 
 Of course, but how can I test, if I am an open relay?

If you don't know how to do this I suggest that you shut down your
Asterisk server until you find out.  Using your cell phone while you
get it straight could save you some serious coin.

  Not sure what trunk pbxluca is, but if that is an outbound trunk,
  then this is very bad. The only reason it would fail then is if
  they have the 
 
 This is one of my outbound trunk...

Very, very bad then.

 On a Mail-Server I'd restrict outgoing calls to authenticated users.
 I was sure, that Asterisk already do that, but I'm not sure anymore...
 How can I restrict it?

You need to make sure that only registered phones can connect to your
outbound trunks.  Read the docs or hire someone but don't wait.  Shut
down now, especially since this information is now on a public list.  I
am sure that most people here are just looking out for you but it only
takes one black hat.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Looking for best practices

2015-05-30 Thread D'Arcy J.M. Cain
I currently run an Asterisk server on a NetBSD system.  It mostly works
but sometimes I have weird issues.  As far as I can tell they are
usually NAT issues.

I have a Cisco SPA-2102 with two phone numbers installed.  I have NAT
Mapping and NAT Keepalive enabled.  No STUN server.  Both are using
5060.  This is behind an ADSL through a WRT54GL with no special port
handling.

The server is 11.15.1.  My sip.conf includes this:

[general]
context=unauthenticated
allowguest=yes
udpbindaddr=0.0.0.0
nat=force_rport,comedia
srvlookup=yes
qualify=yes

All of this works fine.  It also works fine with the few clients that I
have connected.  However, certain changes cause failures, usually one
way audio suggestion NAT issues.

First experience - I add a softphone on my laptop and assign a third
number.  I can register but one way audio.  It also messes up the
working lines.

Second - My local carrier provides SmartRG ADSL modem/routers.  Right
now I have it set to bridge mode and do everything in thw WRT.  If I
switch to using the router in the SmartRG I have problems with the
existing two lines again.

I really need this to work with whatever hardware the client has.  They
may have different ATAs, soft phones or SIP phones.  Are my server
settings reasonable?  Do I need to make specific requirements for the
client settings?  Using a STUN server didn't seem to help.  Is it a
good idea to specify it anyway?

Any help appreciated.

Cheers.


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Unstable phone connection

2015-03-12 Thread D'Arcy J.M. Cain
On Thu, 12 Mar 2015 15:14:24 -0400
Bryant Zimmerman brya...@zktech.com wrote:
  If the device is registering and then dropping there are several
 usual items.  
  The router may be closing the ports on the device. 

I don't see how.  I am logged into the ATA through the router and I
don't lose the connection.

  The router may have a AGL SIP helper that is causing issues. 

Can't find an AGL setting.  There is a SIP checkbox.  Pretty sure I
have that turned off but I can try to get someone to check.

  Make sure that the device is sending out keep alive packets.

I have that flag turned on.

  Shut down any AGL helpers on the router.

See above.

  Make sure that the site is not double NATing

There's only one router.  It is the ADSL device as well.

  Try using a stun server and see if that helps at all.

I tried with and without.  I am using stunserver.org.

  Watch you console on your sip serer to see how long the device runs
 before losing connection.

I don't think it does.  Both the server and the ATA think that they are
still registered but when a call comes in there is no ringing on the
line.  If I split dial it rings the cell phone but I still hear no
ringing from the caller side unless registration is actually turned off
from the ATA and a sip unregister is issued.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Unstable phone connection

2015-03-12 Thread D'Arcy J.M. Cain
This is driving me to distraction.  I have a switch with multiple
clients who are all working fine except for one and I can't figure out
what makes them different.  I have tried every NAT setting in the ATA
(SPA112 ATA with 2 x FXS, 1 x LAN), stun server on and off, different
sip ports, different RTP ports and it still fails.  I have left the
location with it working only to have it fail later.  He always gets
registered but when a call is sent it doesn't respond so the caller
hears no ring and the phone does not ring.

Yesterday he mentioned that when the phone is working the WiFi slows
down significantly.  No idea why or if it is related.

He has a radio station streaming music.  I wondered if that might be
interfering.  That's why I tried changing the SIP port and the RTP
ports but that didn't seem to help.

It smells like a network problem to me but I am running the same ADSL
device here and other clients are working behind a NAT gateway so I am
at a loss as to what might be wrong.  Could it be the streaming?

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] Is Asterisk a Linux only system?

2015-02-13 Thread D'Arcy J.M. Cain
On Thu, 12 Feb 2015 16:39:55 +0200
Tzafrir Cohen tzafrir.co...@xorcom.com wrote:
 On Thu, Feb 12, 2015 at 09:25:39AM -0500, D'Arcy J.M. Cain wrote:
  I know that it runs on other systems but do other ports get the same
  attention?  I have been running it on a NetBSD server for about a
  year now and while it mostly works it just crashes from time to
  time with no explanation or core dump.
 
 Use the option -g to get core dumps.

Did that and it stopped again but still no core file and nothing in the
logs.  It did stay up for a whole week this time.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Is Asterisk a Linux only system?

2015-02-12 Thread D'Arcy J.M. Cain
I know that it runs on other systems but do other ports get the same
attention?  I have been running it on a NetBSD server for about a year
now and while it mostly works it just crashes from time to time with no
explanation or core dump.

I have improved the situation by expanding my intrusion detection but
it still stops every few days or so.  I have a cron job that tests for
it and restarts it when necessary.

Anyone else have experience on non-Linux systems?

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] Is Asterisk a Linux only system?

2015-02-12 Thread D'Arcy J.M. Cain
On Thu, 12 Feb 2015 09:43:33 -0500
Ron Wheeler rwhee...@artifact-software.com wrote:
 Why not just bite the bullet and move to a supported Linux?

If all I had was a phone switch that might be an option but this is
just part of a multi-server system that needs to be able to move
services back and forth so the underlying OS has to be the same for
everything.  Besides, I am a NetBSD developer and so I am also
interested in making every package rock solid on it.

 - you can be assured that it works
 - updates are tested

I would be willing to make a NetBSD machine (not my production server)
available for running unit tests.  Are there already unit tests in the
distribution?

 There is almost no Linux administration required once it is set up so 
 getting deep into the actual OS is not required.

Getting deep into an OS doesn't scare me.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


Re: [asterisk-users] Is Asterisk a Linux only system?

2015-02-12 Thread D'Arcy J.M. Cain
On Thu, 12 Feb 2015 16:39:55 +0200
Tzafrir Cohen tzafrir.co...@xorcom.com wrote:
 On Thu, Feb 12, 2015 at 09:25:39AM -0500, D'Arcy J.M. Cain wrote:
  year now and while it mostly works it just crashes from time to
  time with no explanation or core dump.
 
 Use the option -g to get core dumps.

Cool.  I will do that and wait for the next crash.  Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Failed to authenticate device - who?

2014-12-10 Thread D'Arcy J.M. Cain
I have a bunch of these in my logs:

[Dec  9 08:21:21] NOTICE[-1][C-0285] chan_sip.c: Failed to
authenticate device
einsteinsip:einstein@98.158.139.74;tag=65696e737465696e0131323530333532333739

The problem is that I already know my own IP address.  How do I
determine the address of the host trying to hack my switch?

Cheers.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 not honoring astetcdir

2014-08-10 Thread D'Arcy J.M. Cain
On Sun, 10 Aug 2014 07:57:31 -0300
Joshua Colp jc...@digium.com wrote:
  [directories](!)
  astetcdir =  /usr/local/etc/asterisk
  etc...
 
 Remove (!) from the name. That marks it as a template. Unless you
 remove it it won't be used.

Of course.  Thanks.  The odd thing is that that comes from the
distribution.  Any idea where that template is meant to be used?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 not honoring astetcdir

2014-08-10 Thread D'Arcy J.M. Cain
On Sun, 10 Aug 2014 09:56:48 -0300
Joshua Colp jc...@digium.com wrote:
  Of course.  Thanks.  The odd thing is that that comes from the
  distribution.  Any idea where that template is meant to be used?
 
 It's not as far as I know. It's just being used as a method so the 
 values there don't overrule the compiled-in values.

Which, it seems to me, is exactly what one would want.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 not honoring astetcdir

2014-08-10 Thread D'Arcy J.M. Cain
On Sun, 10 Aug 2014 10:52:46 -0300
Joshua Colp jc...@digium.com wrote:
 If you set them, yes. That file has default values though which would 
 currently overrule the compiled in values. One option would be to
 just comment out all of them and remove the template value in the
 sample config. Nobody has proposed any changes relating to it though.

Another option would be to generate the file at build time using the
compiled in values.  I would still comment them as you suggest though.
That's usual practice in these sorts of config files.  Why parse a line
just to set what's already the default?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

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

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


[asterisk-users] Asterisk not honoring astetcdir

2014-08-09 Thread D'Arcy J.M. Cain
Running 11.10.2 on NetBSD 6.1.4 but I observed this on 11.11.0 as
well.  I have a directory which, through a combination of NULL mount
and UNION mount contains everything in the installed config
directory /usr/pkg/etc/asterisk except for my modified versions of
those files.  Basically I mount_null /usr/pkg/etc/asterisk
on /usr/local/etc/asterisk and then mount_union my SVN directory with
my modified versions over that.

I then call asterisk with -C /usr/local/etc/asterisk.conf which
contains the following:

[directories](!)
astetcdir = /usr/local/etc/asterisk
etc...

I have checked and nowhere in /usr/local/etc/asterisk is the string
pkg/etc.  Yet, when I reload the logger module it
loads /usr/pkg/etc/asterisk/logger.conf instead of my modified version
in /usr/local/etc/asterisk.  Is there some other place to define this?

Note, I don't want to compile the new location into asterisk because I
need the distribution files in the standard place for the above to work.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 too many files or memory leak???

2014-08-08 Thread D'Arcy J.M. Cain
On Fri, 8 Aug 2014 11:01:50 +0200
Mikael Fredin mik...@wiraya.com wrote:
 On 8 August 2014 04:50, D'Arcy J.M. Cain da...@vex.net wrote:
 
  Shot in the dark here but does core show channels show an
  inordinate number of channels, especially channels that you know
  should be closed?
 
 I get that problem sometimes, do you have a solution for it/know the
 cause for it?

In my case I fixed it by reverting from 11.11.0 back to 11.10.2.  See
the thread Calls not hanging up.  I saw that the OP was also on
11.11.0 and wondered if his open files problem was caused by too many
active channels and thus was seeing a different symptom of the same
problem.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 too many files or memory leak???

2014-08-08 Thread D'Arcy J.M. Cain
On Fri, 8 Aug 2014 06:26:52 -0400
Jerry Geis ge...@pagestation.com wrote:
 next to nothing...
 This is normal as I only have  a partial PRI like 5 lines.
 Very low volume

Me too but I was getting every call staying in the active channels
list.  I thought that you might be having the same issue.  See the
thread Calls not hanging up.  I reverted to 11.10.2 which fixed
my problem.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Calls not hanging up

2014-08-07 Thread D'Arcy J.M. Cain
This just started after upgrading to 11.11.0.  After a call is
completed (both ends hang up) the call still shows as active.

# asterisk -x core show channels
Channel  Location State   Application(Data)
SIP/thinktel-000 (None)   Up  AppDial((Outgoing
Line)) SIP/4164251212-0 416555@LocalSets Up
Dial(SIP/thinktel/416555) 2 active channels
1 active call
1 call processed

The 1212 number is mine and is hung up.  I even rebooted my ATA to make
sure that it wasn't holding the line.  My dialplan is extremely
simple.  In fact, I even simplified it from what it was for this
testing.  Here it is.

exten = 4164251212,1,Verbose(0, ${CALLERID(all)} Calling ${EXTEN})
same = n,Dial(SIP/4164251212,30)
same = n,VoiceMail(4164251212@LocalSets,u)
same = n,Hangup()

I can post any other log or config excerpts if someone thinks that they
are relevant but all of this was working under 11.10.2.

Thanks.


-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Calls not hanging up

2014-08-07 Thread D'Arcy J.M. Cain
On Thu, 7 Aug 2014 17:12:40 +0200
Asghar Mohammad asghar...@gmail.com wrote:
 Your call is up on VoiceMail you should check dialstatus before
 sending user to VoiceMail.

so
https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial
is incorrect now?  That page says:

Unless there is a timeout specified, the Dial application will wait
indefinitely until one of the called channels answers, the user hangs
up, or if all of the called channels are busy or unavailable. Dialplan
executing will continue if no requested channels can be called, or if
the timeout expires. This application will report normal termination if
the originating channel hangs up, or if the call is bridged and either
of the parties in the bridge ends the call.

The second sentence implies that the dialplan will not continue, i.e.
will not go to VM, if the call is answered.  The third sentence
reinforces that interpretation. That's certainly what happened in 11.10.
I didn't see anything in the change logs that would suggest such a
drastic change in behaviour.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Calls not hanging up

2014-08-07 Thread D'Arcy J.M. Cain
On Thu, 7 Aug 2014 17:12:40 +0200
Asghar Mohammad asghar...@gmail.com wrote:
 Your call is up on VoiceMail you should check dialstatus before
 sending user to VoiceMail.

I removed the voicemail command from the dialplan and it was exactly
the same behaviour.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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 too many files or memory leak???

2014-08-07 Thread D'Arcy J.M. Cain
On Thu, 7 Aug 2014 22:00:47 -0400
Jerry Geis ge...@pagestation.com wrote:
 :[Aug  7 21:35:24] ERROR[19582] acl.c: Cannot create socket
 [Aug  7 21:35:24] WARNING[19582][C-0283] res_rtp_asterisk.c:
 Unable to allocate RTP socket: Too many open files
...
 I am running asterisk 11.11.0

Shot in the dark here but does core show channels show an inordinate
number of channels, especially channels that you know should be closed?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Calls not hanging up

2014-08-07 Thread D'Arcy J.M. Cain
On Thu, 7 Aug 2014 10:12:02 -0400
D'Arcy J.M. Cain da...@vex.net wrote:
 This just started after upgrading to 11.11.0.  After a call is
 completed (both ends hang up) the call still shows as active.

New data point - I just reverted to 11.10.2 without a single change to
the configuration and the problem has gone away.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] 'restart when convenient'

2014-05-28 Thread D'Arcy J.M. Cain
On Wed, 28 May 2014 12:01:44 +0200
Sander Smeenk ssme...@freshdot.net wrote:
 Quoting jonathan white (j...@uvacity.com):
 
  I'm doing a scripted restart by using the asterisk command line to
  tell me how many active calls are current. If 0 then restart.
 
 For this you use 'core show calls'?  If 0, do you 'core restart now'
 or do you kill and restart Asterisk in any other way?

I run 11.7 and use this: asterisk -x 'core stop gracefully'

That waits until all phones are on hook before stopping.  No need to
run tests that would be subject to race conditions.

However, I don't believe that any of this answers the OP's question.
He says that he is running restart when convenient but I don't
believe there is any such command and he probably means what I said
above.  perhaps he can clarify but I think that his question is, Why
does it think that there are calls in progress when there are not.

OP - can you clarify what actual command you are running?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] 'restart when convenient'

2014-05-28 Thread D'Arcy J.M. Cain
On Wed, 28 May 2014 12:19:10 +0200
Sander Smeenk ssme...@freshdot.net wrote:
 Quoting D'Arcy J.M. Cain (da...@vex.net):
 
  OP - can you clarify what actual command you are running?
 
 I use 'core restart when convenient'.

Right.  You said restart when convenient in your original email.  I
tested the above and when convenient is similar to gracefully.  The
difference is that the latter stops new calls from coming in.  The
former allows new calls to start while waiting for old calls to finish.

What does core show channels show while waiting for it to restart?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringing issue

2014-05-14 Thread D'Arcy J.M. Cain
On Tue, 13 May 2014 15:28:26 +0100
Gareth Blades mailinglist+aster...@dns99.co.uk wrote:
 You would need to provide more information. Mobiles and landlines are 
 not SIP and yet you say calls are coming into your asterisk over SIP.
 So what or who is doing the translation?

My origination provider.  While I do have a SIP address, no one is
calling it and other than local sets (which don't seem to have this
issue) all calls are coming through my single origination provider.
This is why I am confused.  Virtually all calls are coming from the
PSTN through one connection.  If all callers had the problem it would
almost make more sense.

 Initial thoughts are that it could be you are sending back SIP/180
 with no session progress and indicating ringing but the other end is 
 misconfiguration and not generating its own ring tone. This is
 possible if you have multiple providers sending you calls or one
 provider using different kit for different geographic areas.

Geographic doesn't seem to be the issue.  Most calls are coming from
Toronto, Canada where I am.  They come from major carriers.  Rogers is
the largest cell carrier here and that appears to be one place where it
fails.  I am on Koodo which uses the Telus network, the second largest,
and mine works fine.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringing issue

2014-05-14 Thread D'Arcy J.M. Cain
On Tue, 13 May 2014 15:28:26 +0100
Gareth Blades mailinglist+aster...@dns99.co.uk wrote:
 Initial thoughts are that it could be you are sending back SIP/180
 with no session progress and indicating ringing but the other end is 
 misconfiguration and not generating its own ring tone. This is
 possible if you have multiple providers sending you calls or one
 provider using different kit for different geographic areas.

I seem to have solved this, sorta.  My Provider, Thinktel in Canada,
normally sets PBX plays ringback to false meaning that they generate
the ring tone in all cases.  By mistake it was set to true on my
trunk.  They changed that and now the callers are hearing a ring tone.

It's still an interesting question I think.  What if I wanted to do
something with early media?  That is not possible with this setup.

Anyway, here it is for future searchers.  Talk to your origination
provider if you have this problem.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Ringing issue

2014-05-13 Thread D'Arcy J.M. Cain
I have an issue with ringing.  Some users who call my switch hear
ringing and others don't.  I have researched this and understand the
issue of firewalling and RTP.  My switch has UDP ports 1 to 2
open.  In any case I think that blocked RTP would block all ringing,
not just some.

I have one origination provider.  As far as I can tell the issue is
related to the remote user's provider.  My sister does not hear ringing
when she calls from her Roger's cell phone but she does from her Vonage
phone.  I hear ringing when calling in from my Koodo cell phone.  Some
land lines work and others do not.

The server is not behind a NAT and neither is the origination
provider.  There is a firewall but port 5060 is open (UDP and, just in
case, TCP) as well as the RTP ports mentioned above.

I am not sure where to look next.  I assume that there is some sort of
signaling that I am not doing but I can't figure out where.  Can anyone
suggest what area I should be looking?

Thanks.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

-- 
_
-- 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] Where is HAVE_NEWLOCALE set?

2013-06-11 Thread D'Arcy J.M. Cain
On Tue, 11 Jun 2013 18:42:07 +0300
Tzafrir Cohen tzafrir.co...@xorcom.com wrote:
 On Mon, Jun 10, 2013 at 04:06:27PM -0400, D'Arcy J.M. Cain wrote:
  I am trying to build Asterisk on a NetBSD system but I am running
  into two problems.  The first only happens on an installation built
  from NetBSD HEAD.  The config variable HAVE_NEWLOCALE is
  erroneously set during configure but this system does not have
  newlocale().  I can't seem to find where this gets set to true.
 
 What version of asterisk is it? It is set by the configure script
 (look for 'newlocale' in configure.ac).

It's version 11.4.0 which is supposedly the latest.  Yes, it is in
AC_CHECK_FUNCS.  I just don't understand why it thinks that it exists.

  Interestingly a stable release of NetBSD does not have this issue

By stable I mean NetBSD 6.0.1 (GENERIC) amd64.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
Voip: sip:da...@vex.net

--
_
-- 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] DTLSv1_method on NetBSD

2013-06-11 Thread D'Arcy J.M. Cain
On Tue, 11 Jun 2013 18:43:55 +0300
Tzafrir Cohen tzafrir.co...@xorcom.com wrote:
 On Mon, Jun 10, 2013 at 04:10:23PM -0400, D'Arcy J.M. Cain wrote:
  This is the second issue I found while trying to install Asterisk
  on a NetBSD box.  I can't load the rtp module because
  HAVE_OPENSSL_SRTP seems to be set.  Is there some way to simply
  force this variab;e to be unset from a configuration variable?
 
 Do you have OpenSSL?

Yes, it is in the base system.  OpenSSL 1.0.1c 10 May 2012.

 Again, what version of Asterisk? What version of NetBSD? People may

Asterisk 11.4.0.  NetBSD 6.0.1 (GENERIC) amd64

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
Voip: sip:da...@vex.net

--
_
-- 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] Where is HAVE_NEWLOCALE set?

2013-06-10 Thread D'Arcy J.M. Cain
I am trying to build Asterisk on a NetBSD system but I am running into
two problems.  The first only happens on an installation built from
NetBSD HEAD.  The config variable HAVE_NEWLOCALE is erroneously set
during configure but this system does not have newlocale().  I can't
seem to find where this gets set to true.

Interestingly a stable release of NetBSD does not have this issue
although it still has the second issue which I will start a separate
thread for.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
Voip: sip:da...@vex.net

--
_
-- 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] DTLSv1_method on NetBSD

2013-06-10 Thread D'Arcy J.M. Cain
This is the second issue I found while trying to install Asterisk on a
NetBSD box.  I can't load the rtp module because HAVE_OPENSSL_SRTP
seems to be set.  Is there some way to simply force this variab;e to be
unset from a configuration variable?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
Voip: sip:da...@vex.net

--
_
-- 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] Sample config files installed to /etc

2013-06-09 Thread D'Arcy J.M. Cain
On Sun, 9 Jun 2013 20:18:50 +0300
Tzafrir Cohen tzafrir.co...@xorcom.com wrote:
 On Fri, Jun 07, 2013 at 11:53:57AM +0200, Daniel Pocock wrote:
  The sample config files in the Asterisk distribution and packages
 [...]
 The sample config files are mostly reference. They are also examples
 for some sorts. But they are the best documentation installed in a
 typical installation.
 
  However, I'm not sure that they should be installed by default by
  packages.

There is a better way.  Right now asterisk can be called with a custom
location for the primary config (-C option).  If there was also a
configuration command to redirect any other file then administrators
could create their own versions of configs, probably in their own
versioning system, and point to it from the main config.  That way the
installation directories never need to be written to and new versions
can overwrite existing files without affecting the operation.

I realize that you can set astetcdir to another location in your custom
asterisk.conf but that means keeping copies of all the configs
elsewhere.  I just want to keep copies of configs that I have modified.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
Voip: sip:da...@vex.net

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