[asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-23 Thread Daniel Pittman
G'day.

I am having reasonable success getting Asterisk 1.4.2 running and doing
what I want, but I can't figure out one particular idiom that I want:

There are a few situations where I want to have Asterisk push a call
through to the first available transport on a list, such as:

I have two SIP ports attached to one local (two port) analog phone
system.  I want to ring line 1 for the first call, line 2 for the second
call and go to voicemail for the third and subsequent.

I can't work out the best way to express that.

Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
which is not really what I want.

Using two sequential Dial() commands into the extension will ring the
lines one after the other -- even if it times out on the first line,
which is again not what I want.


At the moment my best guess is that I need to use the DIALSTATUS
variable and implement the fail-over process based on that.  That seems
cumbersome, though -- surely this isn't a terribly uncommon requirement?

Regards,
Daniel

-- 
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707email: [EMAIL PROTECTED]
 http://digital-infrastructure.com.au/

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-23 Thread Marco Mouta

Based on my experience I would say that using ${DIALSTATUS} variable would
be the most common way to do it...


On 4/23/07, Daniel Pittman <[EMAIL PROTECTED]> wrote:


G'day.

I am having reasonable success getting Asterisk 1.4.2 running and doing
what I want, but I can't figure out one particular idiom that I want:

There are a few situations where I want to have Asterisk push a call
through to the first available transport on a list, such as:

I have two SIP ports attached to one local (two port) analog phone
system.  I want to ring line 1 for the first call, line 2 for the second
call and go to voicemail for the third and subsequent.

I can't work out the best way to express that.

Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
which is not really what I want.

Using two sequential Dial() commands into the extension will ring the
lines one after the other -- even if it times out on the first line,
which is again not what I want.


At the moment my best guess is that I need to use the DIALSTATUS
variable and implement the fail-over process based on that.  That seems
cumbersome, though -- surely this isn't a terribly uncommon requirement?

Regards,
Daniel

--
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707email: [EMAIL PROTECTED]
 http://digital-infrastructure.com.au/

___
--Bandwidth and Colocation provided by Easynews.com --

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





--
Esta mensagem (incluindo quaisquer anexos) pode conter informação
confidencial para uso exclusivo do destinatário. Se não for o destinatário
pretendido, não deverá usar, distribuir ou copiar este e-mail. Se recebeu
esta mensagem por engano, por favor informe o emissor e elimine-a
imediatamente. Obrigado.

This e-mail message is intended only for individual(s) to whom it is
addressed and may contain information that is privileged, confidential,
proprietary, or otherwise exempt from disclosure under applicable law. If
you believe you have received this message in error, please advise the
sender by return e-mail and delete it from your mailbox. Thank you.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-23 Thread Robert Lister
On Mon, Apr 23, 2007 at 06:18:32PM +1000, Daniel Pittman wrote:
> G'day.
> 
> I am having reasonable success getting Asterisk 1.4.2 running and doing
> what I want, but I can't figure out one particular idiom that I want:
> 
> There are a few situations where I want to have Asterisk push a call
> through to the first available transport on a list, such as:
> 
> I have two SIP ports attached to one local (two port) analog phone
> system.  I want to ring line 1 for the first call, line 2 for the second
> call and go to voicemail for the third and subsequent.
> 
> I can't work out the best way to express that.
> 
> Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
> which is not really what I want.

You might want to look at doing this with a queue, and then directing the 
call into the queue. There are some new queue strategies in 1.4.x that might 
do what you want, and it also has "autofill" option which might make it 
behave the way you want.

There is also a "linear" type strategy which looks like it is making its way 
into the code, which might be more suitable than roundrobin/rrmemory.

http://bugs.digium.com/view.php?id=7279

Or, you might be able to implement it by using the ChanIsAvail command in 
the dialplan (If the device is returning reasonable things.)

It can be used to test availability of a channel or a list of channels and 
returns the status, or the available channel name.

I do a similar thing here and it works very well.

http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ChanIsAvail

Rob

-- 
Robert Lister   -   London Internet Exchange-  http://www.linx.net/
[EMAIL PROTECTED]   -   tel: +44 (0)20 7645 3510-  RL786-RIPE
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-23 Thread Steve Totaro

Setup a queue with linear and a timeout to drop to voicemail.

Thanks,
Steve Totaro
www.asteriskhelpdesk.com

Daniel Pittman wrote:

G'day.

I am having reasonable success getting Asterisk 1.4.2 running and doing
what I want, but I can't figure out one particular idiom that I want:

There are a few situations where I want to have Asterisk push a call
through to the first available transport on a list, such as:

I have two SIP ports attached to one local (two port) analog phone
system.  I want to ring line 1 for the first call, line 2 for the second
call and go to voicemail for the third and subsequent.

I can't work out the best way to express that.

Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
which is not really what I want.

Using two sequential Dial() commands into the extension will ring the
lines one after the other -- even if it times out on the first line,
which is again not what I want.


At the moment my best guess is that I need to use the DIALSTATUS
variable and implement the fail-over process based on that.  That seems
cumbersome, though -- surely this isn't a terribly uncommon requirement?

Regards,
Daniel

  


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-23 Thread Carlos Chavez
On Mon, 2007-04-23 at 18:18 +1000, Daniel Pittman wrote:
> G'day.
> 
> I am having reasonable success getting Asterisk 1.4.2 running and doing
> what I want, but I can't figure out one particular idiom that I want:
> 
> There are a few situations where I want to have Asterisk push a call
> through to the first available transport on a list, such as:
> 
> I have two SIP ports attached to one local (two port) analog phone
> system.  I want to ring line 1 for the first call, line 2 for the second
> call and go to voicemail for the third and subsequent.
> 
> I can't work out the best way to express that.
> 
> Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
> which is not really what I want.
> 
> Using two sequential Dial() commands into the extension will ring the
> lines one after the other -- even if it times out on the first line,
> which is again not what I want.
> 
> 
I find that the easiest way to do it is like this:

1,1,Dial(SIP/line1)
1,2,Dial(SIP/line2)

Than way if the first like fails for any reason it goes to the second.
You could use Dialstatus but this seems simpler.

-- 
Telecomunicaciones Abiertas de Mexico S.A. de C.V.
Carlos Chávez Prats
Director de Tecnología
+52-55-91169161 ext 2001


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-23 Thread Stephen Bosch
Carlos Chavez wrote:
> On Mon, 2007-04-23 at 18:18 +1000, Daniel Pittman wrote:
>> G'day.
>>
>> I am having reasonable success getting Asterisk 1.4.2 running and doing
>> what I want, but I can't figure out one particular idiom that I want:
>>
>> There are a few situations where I want to have Asterisk push a call
>> through to the first available transport on a list, such as:
>>
>> I have two SIP ports attached to one local (two port) analog phone
>> system.  I want to ring line 1 for the first call, line 2 for the second
>> call and go to voicemail for the third and subsequent.
>>
>> I can't work out the best way to express that.
>>
>> Using "Dial(SIP/line1&SIP/line2)" will ring both lines at the same time
>> which is not really what I want.
>>
>> Using two sequential Dial() commands into the extension will ring the
>> lines one after the other -- even if it times out on the first line,
>> which is again not what I want.
>>
>>
>   I find that the easiest way to do it is like this:
> 
> 1,1,Dial(SIP/line1)
> 1,2,Dial(SIP/line2)
> 
>   Than way if the first like fails for any reason it goes to the second.
> You could use Dialstatus but this seems simpler.

And it will mean that calls answered by SIP/line1 will roll over to
SIP/line2 after the caller hangs up, so you'll get a lot of nuisance rings.

${DIALSTATUS} is probably the way to go here.

-Stephen-
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk dialing next extension only if first is busy?

2007-04-24 Thread Robert Lister
On Mon, Apr 23, 2007 at 11:11:48AM -0500, Carlos Chavez wrote:

> > Using two sequential Dial() commands into the extension will ring the
> > lines one after the other -- even if it times out on the first line,
> > which is again not what I want.
> > 
> > 
>   I find that the easiest way to do it is like this:
> 
> 1,1,Dial(SIP/line1)
> 1,2,Dial(SIP/line2)
> 
>   Than way if the first like fails for any reason it goes to the second.
> You could use Dialstatus but this seems simpler.

Not necessarily. If the handsets have call waiting or divert enabled for 
example it will go to the first dial instance and not fail through to the 
second. This may or may not be the desired behaviour depending on what 
you want to happen, of course.

Rob

___
--Bandwidth and Colocation provided by Easynews.com --

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