Re: [asterisk-users] PRI failover to SIP trunk

2009-07-10 Thread Tzafrir Cohen
On Thu, Jul 09, 2009 at 05:31:18PM -0400, Steve Totaro wrote:

You have a small typo:

 exten = _.,1,Dial(Zap,g1,${EXTEN})
 exten = _.,2,Dial(SIP,Provider,${EXTEN})

  exten = _.,1,Dial(Zap/g1/${EXTEN})
  exten = _.,2,Dial(SIP/Provider/${EXTEN})

('/' instead of ',')

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

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

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


Re: [asterisk-users] PRI failover to SIP trunk

2009-07-10 Thread Dave Fullerton
Tzafrir Cohen wrote:
 On Thu, Jul 09, 2009 at 05:31:18PM -0400, Steve Totaro wrote:
 
 You have a small typo:
 
 exten = _.,1,Dial(Zap,g1,${EXTEN})
 exten = _.,2,Dial(SIP,Provider,${EXTEN})
 
   exten = _.,1,Dial(Zap/g1/${EXTEN})
   exten = _.,2,Dial(SIP/Provider/${EXTEN})
 
 ('/' instead of ',')
 

While this will work, be aware that there are circumstances where you 
may end up calling the number twice, once through each provider. One 
example is if the number you dial is busy, that progress will be passed 
via the PRI to asterisk and the dialplan will continue to the next 
priority. In this case, dialing the number again through the SIP 
provider. To avoid this you will need to use some dialplan logic and 
check the result of the DIALSTATUS variable. See this page for examples:

http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

-Dave

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

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


Re: [asterisk-users] PRI failover to SIP trunk

2009-07-10 Thread Steve Totaro
On Fri, Jul 10, 2009 at 10:45 AM, Dave Fullerton 
dfullertaster...@shorelinecontainer.com wrote:

 Tzafrir Cohen wrote:
  On Thu, Jul 09, 2009 at 05:31:18PM -0400, Steve Totaro wrote:
 
  You have a small typo:
 
  exten = _.,1,Dial(Zap,g1,${EXTEN})
  exten = _.,2,Dial(SIP,Provider,${EXTEN})
 
exten = _.,1,Dial(Zap/g1/${EXTEN})
exten = _.,2,Dial(SIP/Provider/${EXTEN})
 
  ('/' instead of ',')
 

 While this will work, be aware that there are circumstances where you
 may end up calling the number twice, once through each provider. One
 example is if the number you dial is busy, that progress will be passed
 via the PRI to asterisk and the dialplan will continue to the next
 priority. In this case, dialing the number again through the SIP
 provider. To avoid this you will need to use some dialplan logic and
 check the result of the DIALSTATUS variable. See this page for examples:

 http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

 -Dave


Good point.

I was unaware that busy back from a TDM circuit would progress in the
dialplan rather than going to the h exten.

What other cases are there like that?

-- 
Thanks,
Steve Totaro
+18887771888 (Toll Free)
+12409381212 (Cell)
+12024369784 (Skype)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] PRI failover to SIP trunk

2009-07-10 Thread Dave Fullerton
Steve Totaro wrote:
 On Fri, Jul 10, 2009 at 10:45 AM, Dave Fullerton 
 dfullertaster...@shorelinecontainer.com wrote:
 
 Tzafrir Cohen wrote:
 On Thu, Jul 09, 2009 at 05:31:18PM -0400, Steve Totaro wrote:

 You have a small typo:

 exten = _.,1,Dial(Zap,g1,${EXTEN})
 exten = _.,2,Dial(SIP,Provider,${EXTEN})
   exten = _.,1,Dial(Zap/g1/${EXTEN})
   exten = _.,2,Dial(SIP/Provider/${EXTEN})

 ('/' instead of ',')

 While this will work, be aware that there are circumstances where you
 may end up calling the number twice, once through each provider. One
 example is if the number you dial is busy, that progress will be passed
 via the PRI to asterisk and the dialplan will continue to the next
 priority. In this case, dialing the number again through the SIP
 provider. To avoid this you will need to use some dialplan logic and
 check the result of the DIALSTATUS variable. See this page for examples:

 http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

 -Dave


 Good point.
 
 I was unaware that busy back from a TDM circuit would progress in the
 dialplan rather than going to the h exten.
 
 What other cases are there like that?

It is my understanding (through trial and error, reading, etc) that any 
Dial command that does not result in an answered state will continue in 
the dialplan after a timeout (if specified) or some sort of progress is 
received. If the called channel results in an answer then dialplan 
processing stops as soon as one party hangs up (unless the g option is 
specified).

This works on any channels that can pass progress (SIP/IAX and Zap/DAHDI 
PRI and BRI). Zap/DAHDI Analog channels are considered answered as soon 
as the dial is complete so you won't be able to use this trick under 
normal circumstances.

-Dave

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

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


Re: [asterisk-users] PRI failover to SIP trunk

2009-07-10 Thread Steve Totaro
On Fri, Jul 10, 2009 at 11:40 AM, Dave Fullerton 
dfullertaster...@shorelinecontainer.com wrote:

 Steve Totaro wrote:
  On Fri, Jul 10, 2009 at 10:45 AM, Dave Fullerton 
  dfullertaster...@shorelinecontainer.com wrote:
 
  Tzafrir Cohen wrote:
  On Thu, Jul 09, 2009 at 05:31:18PM -0400, Steve Totaro wrote:
 
  You have a small typo:
 
  exten = _.,1,Dial(Zap,g1,${EXTEN})
  exten = _.,2,Dial(SIP,Provider,${EXTEN})
exten = _.,1,Dial(Zap/g1/${EXTEN})
exten = _.,2,Dial(SIP/Provider/${EXTEN})
 
  ('/' instead of ',')
 
  While this will work, be aware that there are circumstances where you
  may end up calling the number twice, once through each provider. One
  example is if the number you dial is busy, that progress will be passed
  via the PRI to asterisk and the dialplan will continue to the next
  priority. In this case, dialing the number again through the SIP
  provider. To avoid this you will need to use some dialplan logic and
  check the result of the DIALSTATUS variable. See this page for examples:
 
  http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS
 
  -Dave
 
 
  Good point.
 
  I was unaware that busy back from a TDM circuit would progress in the
  dialplan rather than going to the h exten.
 
  What other cases are there like that?

 It is my understanding (through trial and error, reading, etc) that any
 Dial command that does not result in an answered state will continue in
 the dialplan after a timeout (if specified) or some sort of progress is
 received. If the called channel results in an answer then dialplan
 processing stops as soon as one party hangs up (unless the g option is
 specified).

 This works on any channels that can pass progress (SIP/IAX and Zap/DAHDI
 PRI and BRI). Zap/DAHDI Analog channels are considered answered as soon
 as the dial is complete so you won't be able to use this trick under
 normal circumstances.

 -Dave


True I guess except that if the call fails as the OP posted, because the PRI
is down, it should work then right?

Another thing.  For outbound calls, I do not have a timeout.  So the user
hangs up when they are ready, or when the other side hangs up or gets
congestion, which amounts to the h exten, or am I not correct.

Why have a timeout on outbound dialing (unless you are a dialer app?)  It is
not like voicemail where you want it to ring for so many seconds and then
roll to VM.

-- 
Thanks,
Steve Totaro
+18887771888 (Toll Free)
+12409381212 (Cell)
+12024369784 (Skype)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] PRI failover to SIP trunk

2009-07-10 Thread Dave Fullerton
Steve Totaro wrote:
 On Fri, Jul 10, 2009 at 11:40 AM, Dave Fullerton 
 dfullertaster...@shorelinecontainer.com wrote:
 
 Steve Totaro wrote:
 On Fri, Jul 10, 2009 at 10:45 AM, Dave Fullerton 
 dfullertaster...@shorelinecontainer.com wrote:

 Tzafrir Cohen wrote:
 On Thu, Jul 09, 2009 at 05:31:18PM -0400, Steve Totaro wrote:

 You have a small typo:

 exten = _.,1,Dial(Zap,g1,${EXTEN})
 exten = _.,2,Dial(SIP,Provider,${EXTEN})
   exten = _.,1,Dial(Zap/g1/${EXTEN})
   exten = _.,2,Dial(SIP/Provider/${EXTEN})

 ('/' instead of ',')

 While this will work, be aware that there are circumstances where you
 may end up calling the number twice, once through each provider. One
 example is if the number you dial is busy, that progress will be passed
 via the PRI to asterisk and the dialplan will continue to the next
 priority. In this case, dialing the number again through the SIP
 provider. To avoid this you will need to use some dialplan logic and
 check the result of the DIALSTATUS variable. See this page for examples:

 http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

 -Dave


 Good point.

 I was unaware that busy back from a TDM circuit would progress in the
 dialplan rather than going to the h exten.

 What other cases are there like that?
 It is my understanding (through trial and error, reading, etc) that any
 Dial command that does not result in an answered state will continue in
 the dialplan after a timeout (if specified) or some sort of progress is
 received. If the called channel results in an answer then dialplan
 processing stops as soon as one party hangs up (unless the g option is
 specified).

 This works on any channels that can pass progress (SIP/IAX and Zap/DAHDI
 PRI and BRI). Zap/DAHDI Analog channels are considered answered as soon
 as the dial is complete so you won't be able to use this trick under
 normal circumstances.

 -Dave


 True I guess except that if the call fails as the OP posted, because the PRI
 is down, it should work then right?

I believe so, I haven't tried it. I imagine DIALSTATUS would be either 
CHANUNAVAIL or CONGESTION.

 
 Another thing.  For outbound calls, I do not have a timeout.  So the user
 hangs up when they are ready, or when the other side hangs up or gets
 congestion, which amounts to the h exten, or am I not correct.

I can't answer to the use of the h exten, I've never used it.

 Why have a timeout on outbound dialing (unless you are a dialer app?)  It is
 not like voicemail where you want it to ring for so many seconds and then
 roll to VM.

You usually wouldn't use a timeout for outbound PSTN calls. I only 
mentioned it to try to be as complete as possible.

-Dave

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

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


[asterisk-users] PRI failover to SIP trunk

2009-07-09 Thread Jason Martin
Hello,

I've found a little documentation on voip-info and on the asterisk- 
users list, although I was hoping for an example of a tried-and-true  
failover setup between PRI and SIP.

We are an outgoing call center that uses asterisk 1.4 connected to 2  
PRIs from the local telephone company in one group (g1) and a SIP  
trunk from bandwidth.com. The PRIs are the primary outgoing service,  
however we have been experiencing some issues where one or both of  
them can fail randomly. We are working with the telephone company to  
have this resolved.

In the meantime, we want to have a good failover solution where if  
both PRIs fail, asterisk will dial out through the SIP trunk. I've  
found solutions as simple as two Dial commands one after the other,  
and others where the failover Dial is in a  jump to CONGESTION.  
Unfortunately we don't have a testing environment, so the solution  
really has to work.

Does anyone else on the list have a PRI to VoIP failover setup that's  
worked for them in a high volume environment?

Thanks!

Jason Martin
Metrix Matrix, Inc.
785 Elmgrove Rd, Bldg 1
Rochester, NY 14624
Office: 888-865-0065 x202
Mobile: 585-705-1400




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

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


Re: [asterisk-users] PRI failover to SIP trunk

2009-07-09 Thread Steve Totaro
On Thu, Jul 9, 2009 at 4:37 PM, Jason Martin jmar...@metrixmatrix.comwrote:

 Hello,

 I've found a little documentation on voip-info and on the asterisk-
 users list, although I was hoping for an example of a tried-and-true
 failover setup between PRI and SIP.

 We are an outgoing call center that uses asterisk 1.4 connected to 2
 PRIs from the local telephone company in one group (g1) and a SIP
 trunk from bandwidth.com. The PRIs are the primary outgoing service,
 however we have been experiencing some issues where one or both of
 them can fail randomly. We are working with the telephone company to
 have this resolved.

 In the meantime, we want to have a good failover solution where if
 both PRIs fail, asterisk will dial out through the SIP trunk. I've
 found solutions as simple as two Dial commands one after the other,
 and others where the failover Dial is in a  jump to CONGESTION.
 Unfortunately we don't have a testing environment, so the solution
 really has to work.

 Does anyone else on the list have a PRI to VoIP failover setup that's
 worked for them in a high volume environment?

 Thanks!

 Jason Martin
 Metrix Matrix, Inc.
 785 Elmgrove Rd, Bldg 1
 Rochester, NY 14624
 Office: 888-865-0065 x202
 Mobile: 585-705-1400




Simple enough,

exten = _.,1,Dial(Zap,g1,${EXTEN})
exten = _.,2,Dial(SIP,Provider,${EXTEN})

That is if Zap/DAHDI completely craps out.  If the dialplan/Asterisk thinks
it is working it will hang.

If totally out of commission, then the second priority gets called.

-- 
Thanks,
Steve Totaro
+18887771888 (Toll Free)
+12409381212 (Cell)
+12024369784 (Skype)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] PRI failover to SIP trunk

2009-07-09 Thread Steve Totaro
On Thu, Jul 9, 2009 at 5:31 PM, Steve Totaro stot...@first-notification.com
 wrote:



 On Thu, Jul 9, 2009 at 4:37 PM, Jason Martin jmar...@metrixmatrix.comwrote:

 Hello,

 I've found a little documentation on voip-info and on the asterisk-
 users list, although I was hoping for an example of a tried-and-true
 failover setup between PRI and SIP.

 We are an outgoing call center that uses asterisk 1.4 connected to 2
 PRIs from the local telephone company in one group (g1) and a SIP
 trunk from bandwidth.com. The PRIs are the primary outgoing service,
 however we have been experiencing some issues where one or both of
 them can fail randomly. We are working with the telephone company to
 have this resolved.

 In the meantime, we want to have a good failover solution where if
 both PRIs fail, asterisk will dial out through the SIP trunk. I've
 found solutions as simple as two Dial commands one after the other,
 and others where the failover Dial is in a  jump to CONGESTION.
 Unfortunately we don't have a testing environment, so the solution
 really has to work.

 Does anyone else on the list have a PRI to VoIP failover setup that's
 worked for them in a high volume environment?

 Thanks!

 Jason Martin
 Metrix Matrix, Inc.
 785 Elmgrove Rd, Bldg 1
 Rochester, NY 14624
 Office: 888-865-0065 x202
 Mobile: 585-705-1400




 Simple enough,

 exten = _.,1,Dial(Zap,g1,${EXTEN})
 exten = _.,2,Dial(SIP,Provider,${EXTEN})

 That is if Zap/DAHDI completely craps out.  If the dialplan/Asterisk thinks
 it is working it will hang.

 If totally out of commission, then the second priority gets called.


Let me clarify that I think that is how it works.  Been a long time.

Maybe it was the old N+101 trick?  Not sure why that was ever deprecated.

-- 
Thanks,
Steve Totaro
+18887771888 (Toll Free)
+12409381212 (Cell)
+12024369784 (Skype)
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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