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

2016-09-03 Thread Andrew Ruthven
On Thu, 2016-09-01 at 10:36 -0700, Dave Platt wrote:
> > 
> Things can become more complicated in a couple of situations:
> 
> (1) If one of the SIP users you specify isn't actually a SIP
> endpoint device, but is a SIP identity on another system (PBX
> or VoIP provider or etc.), then you really don't have any control
> over how that endpoint would handle situations where the called
> user isn't available.  The endpoint might answer with *its*
> voicemail, immediately.
> 
> (2) If you were to dial a Local/ destination rather than a SIP/
> destination, then that dialing operation *is* run back through
> your dialplan, and it might divert the call to voicemail
> instantly.

Another option is what I've had happen recently. I have my main number
dial all the phones in my house, including an old Cisco 7905 that on
busy or no answer would send back a 302 redirect to extension 8000 -
VoiceMail. To make matters worse inbound callers would be dumped into
VoiceMail as though they'd entered it from internally, rather than
external.

While I tried various different ways on the Cisco to stop that
behaviour, I found the only solution was to tell the Dial() command to
ignore the 302 by adding the i flag. Problem solved.

Cheers,
Andrew

-- 
Andrew Ruthven, Wellington, New Zealand
MIITP, ITCP

At work: andrew.ruth...@catalyst.net.nz
At home: and...@etc.gen.nz
Cloud  : NZs only real cloud - https://catalyst.net.nz/cloud
GPG fpr: C603 FC4E 600F 1CEC D1C8  D97C 4B53 D931 E4D3 E863
LCA2017: The Future of Open Source, Hobart, AU - http://linux.conf.au

-- 
_
-- 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 Dave Platt
> So does the Dial command go directly to the registered device or does
> it use the extension?  

If you've given the Dial() command the SIP/user1 format, it will attempt
to dial directly to the SIP device/phone/endpoint you specify.  If you
specify SIP/user1&SIP/user2&... it attempts to dial directly to all of
them simultaneously, and the first one which picks up, gets the call
(the dialouts to the others are dropped when the first one answers).

To the best of my knowledge there is *no* automatic fallback to the
Asterisk voicemail which might be associated with one or more of
these SIP users.

The usual way that you'd get to Asterisk voicemail, is if your
dialplan catches the error which would result from Dial() if none
of the users is available and answers, and explicitly calls
the Voicemail() app.

Things can become more complicated in a couple of situations:

(1) If one of the SIP users you specify isn't actually a SIP
endpoint device, but is a SIP identity on another system (PBX
or VoIP provider or etc.), then you really don't have any control
over how that endpoint would handle situations where the called
user isn't available.  The endpoint might answer with *its*
voicemail, immediately.

(2) If you were to dial a Local/ destination rather than a SIP/
destination, then that dialing operation *is* run back through
your dialplan, and it might divert the call to voicemail instantly.

The easiest solution to each of these is "Don't do that".  Don't
multi-dial to anything other than SIP (or IAX) endpoints which are
real, physical devices that either ring (if they're connected) or
fail to respond or reject the call (if they aren't available).  Don't
multi-dial to any SIP device which implements its own internal
"voicemail" feature (e.g. has an answering machine attached).

I do what you're thinking of all the time.  On my Asterisk
setup, one incoming PSTN number goes to an extension which
multi-dials about half-a-dozen of my SIP softphones.  No matter
which tablet or PC I happen to be using, if I'm running the
SIP softphone app, it'll ring.

The only time the call fails from this dial is if none of
the SIP devices answer.  I could route to Asterisk voicemail in
this case, but I don't bother - Asterisk simply rejects the call
with a no-answer or not-available status, the VoIP provider fails
the call, and Google Voice (which is where the original number is
anchored) sends the call to its own voicemail system and I get an
email.

The only down-side to this is that the Asterisk log gets a bunch
of "SIP call failed" status messages each time this happens - one for
each dialed SIP user that wasn't "on the net" at the time.  This isn't
a problem for me in practice.



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

Correct.


-- 
_
-- 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 Eric Wieling
The dial application dials devices not extensions.   The only way to 
"dial" an extension from the dialplan is to use chan_local.


On 09/01/2016 06:55 AM, D'Arcy J.M. Cain wrote:

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.



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

Le 01/09/2016 à 17:27, D'Arcy J.M. Cain a écrit :

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



You can do it with GotoIf
exten => 55,1,Verbose(Door buzzer calling)
same => n,Set(toRing=)
same => n,GotoIf($["${DEVICE_STATE(SIP/user1)}" != "NOT IN USE"]?User2)
same => n,Set(toRing=${toRing}&SIP/user1)
same => n(User2),GotoIf($["${DEVICE_STATE(SIP/user2)}" != "NOT IN 
USE"]?User3)

same => n,Set(toRing=${toRing}&SIP/user3)
same => n(User3),GotoIf($["${DEVICE_STATE(SIP/user3)}" != "NOT IN 
USE"]?Call)

same => n,Set(toRing=${toRing}&SIP/user3)
same => n(Call),GotoIf($["x${toRing}" = "x"]?NoPhoneToCall)
same => n,Dial(${toRing:1}) ;to remove the first &

--
Daniel

--
_
-- 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 Chad
What about doing this?

exten => 55,1,Verbose(Door buzzer calling)
same => n,Set(toRing=)
same => n,Set(toRing=${toRing}${IF($["${DEVICE_STATE(SIP/user1)}" = "NOT IN 
USE"]?&SIP/user1:)})
same => n,Set(toRing=${toRing}${IF($["${DEVICE_STATE(SIP/user2)}" = "NOT IN 
USE"]?&SIP/user2:)})
same => n,Set(toRing=${toRing}${IF($["${DEVICE_STATE(SIP/user3)}" = "NOT IN 
USE"]?&SIP/user3:)})
same => n,Dial(${toRing:1}) ;to remove the first &

Chad

> On Sep 1, 2016, at 11:27 AM, D'Arcy J.M. Cain  wrote:
> 
> 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


-- 
_
-- 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 Tony Mountifield
In article <20160901070151.10ae4f26@imp>,
D'Arcy J.M. Cain  wrote:
> On Thu, 1 Sep 2016 11:02:57 +0200
> Administrator TOOTAI  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?

The ExecIf command is provided in the module app_exec, which is usually
located at /usr/lib/asterisk/modules/app_exec.so

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

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

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



On 9/1/2016 6:55 AM, D'Arcy J.M. Cain wrote:

So does the Dial command go directly to the registered device or does
it use the extension?

Yes, that's why you provide the technology part (SIP/, IAX/, DAHDI/)

   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.


If the target device has a forward configured, I believe Asterisk will 
dutifully ring the forward number like it was told, but could be wrong.


Otherwise, it'll only go to voicemail, in asterisk, if you tell it to in 
the dialplan. Could it be going to voicemail on a forward somewhere?



Perhaps my problem was that one of the users was removed from sip.conf
but their phone was still in the above plan.
In my experience, that too should not be a problem. I've got the same 
dial command structure, ringing multiple SIP/extensions in one dial 
command. I have some instances where the SIP entry in sip.conf no longer 
exists, and some instances where the device is not registered, and 
asterisk just displays a warning and continues on.

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 don't think so. At least I don't see that.


Mark


--
_
-- 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  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  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}&SIP/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&SIP/user2&SIP/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-09-01 Thread Mark Wiater



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}&SIP/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'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&SIP/user2&SIP/user3)


should have rung the phones forever as long as one phone was active and 
not forwarding or DNDing.



Mark


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

Le 01/09/2016 à 03:57, D'Arcy J.M. Cain a écrit :

On Tue, 30 Aug 2016 17:56:35 +0200
Administrator TOOTAI  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}&SIP/user1)


Failed.  I checked the online docs and the syntax seems to be correct


No. The trailing ) is missing


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.


What's the output of CLI command "core show application ExecIf" ?

--
Daniel

--
_
-- 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  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}&SIP/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  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 Administrator TOOTAI

Le 30/08/2016 à 18:05, D'Arcy J.M. Cain a écrit :

On Tue, 30 Aug 2016 17:56:35 +0200
Administrator TOOTAI  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}&SIP/user1)
same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN
USE"]?Set(toRing=${toRing}&SIP/user2)
same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN
USE"]?Set(toRing=${toRing}&SIP/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.


Don't execute the Dial cmd if ${toRing} is empty ;-)
 ...
 same => n,ExecIf($["x${toRing}" != "x"]?Dial(${toRing:1})) ;to remove 
the first &


--
Daniel

--
_
-- 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  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}&SIP/user1)
> same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN 
> USE"]?Set(toRing=${toRing}&SIP/user2)
> same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN 
> USE"]?Set(toRing=${toRing}&SIP/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 Administrator TOOTAI

Le 30/08/2016 à 15:56, D'Arcy J.M. Cain a écrit :

I have an extension that looks like this:

exten => 55,1,Verbose(Door buzzer calling)
  same => n,Dial(SIP/user1&SIP/user2&SIP/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.


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}&SIP/user1)
same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN 
USE"]?Set(toRing=${toRing}&SIP/user2)
same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN 
USE"]?Set(toRing=${toRing}&SIP/user3)

same => n,Dial(${toRing:1}) ;to remove the first &

would do the work
--
Daniel

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



On 08/30/2016 11:31 AM, D'Arcy J.M. Cain wrote:

Paste the Asterisk console output of a call showing the problem,
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.


You should set your verbosity to 3 and then reproduce the call and paste 
the CLI output.   It is pointless to troubleshoot without the 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 output.



--
_
-- 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  wrote:
> > exten => 55,1,Verbose(Door buzzer calling)
> >   same => n,Dial(SIP/user1&SIP/user2&SIP/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  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&SIP/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&SIP/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&SIP/user2&SIP/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


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

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

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

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


-- 
AJS

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

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

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

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

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


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

2016-08-30 Thread Eric Wieling
The dialplan below cannot go to voicemail, either something else is 
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.


On 08/30/2016 09:56 AM, D'Arcy J.M. Cain wrote:

I have an extension that looks like this:

exten => 55,1,Verbose(Door buzzer calling)
   same => n,Dial(SIP/user1&SIP/user2&SIP/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.



--
if at first you don't succeed, skydiving isn't for you


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

D'Arcy J.M. Cain wrote:

I have an extension that looks like this:

exten =>  55,1,Verbose(Door buzzer calling)
   same =>  n,Dial(SIP/user1&SIP/user2&SIP/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.


The Asterisk behavior is such that even if one of those users are 
unregistered the other two will continue to be called. Is something 
upstream from Asterisk doing the voicemail?


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_
-- 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 Willy Offermans
Dear D'Arcy J.M. Cain and asterisk friends,

On Tue, Aug 30, 2016 at 09:56:05AM -0400, D'Arcy J.M. Cain wrote:
> I have an extension that looks like this:
> 
> exten => 55,1,Verbose(Door buzzer calling)
>   same => n,Dial(SIP/user1&SIP/user2&SIP/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.
> 

To my opinion, you need a queue with dynamic agents. 

SIP/userX subscribes and checkouts manually, or better SIP/userX adds to 
the specific queue at the moment she or he registers to the system. I know 
how to do the former, but I would like to know about the latter. If someone 
could comment on that, I would highly appreciate.

-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,

Will

*
 W.K. Offermans

   Powered by 

(__)
 \\\'',)
   \/  \ ^
   .\._/_)

   www.FreeBSD.org

-- 
_
-- 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&SIP/user2&SIP/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