[asterisk-users] Problem with reINVITE on BYE

2014-03-07 Thread David Lam
Hello all.
I am currently using Asterisk 11.7.0 (also tried Asterisk 12, but same
behavior) and is having an issue when it comes to reINVITE on BYEs.
Apparently one of the SIP providers that I am using does not always process
reINVITEs correctly, and would return a 500 Internal Server Error message
on some (but not all) of these transactions.
To get around this issue, I have been using directrtpsetup = yes in my
sip.conf, and it worked quite well. However, even with this option set,
Asterisk would reINVITE itself back into the audio path as soon as the
caller hangs up. The behavior I am seeing is that if the SIP provider sends
back a 500 Internal Server Error on the reINVITE, Asterisk will not hang up
the call until the called party hangs up. The transaction goes something
like this:

1. Caller calls a number using a target SIP server.
2. -- Early Media --
3. Answer, -- Answering Machine --
4. Caller hangs up
5. Asterisk sends reINVITE to target SIP server back to itself
--- If SIP server returns 500 Internal Server Error, step 6 is never
reached and the call stalls.
6. Asterisk sends a BYE to the target SIP server

This is what happens when the reINVITE proceeds normally, but if 500
Internal Server Error is returned on step 5, then Asterisk will only
acknowledge the 500 Internal Server Error and never send back a BYE. As a
result, the other parties are getting minutes of empty voicemail (due to
timeout) and I am getting charged for these minutes on my provider.

With this in mind, is there something I can do so that a BYE is sent
immediately to the SIP provider when the client initiates a hang up? I
don't believe this can be done via some kind of setting, but maybe changing
the source may help. I don't plan to have any dialplan rules execute after
hangup so making this a global option would be okay in my case.

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

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

Re: [asterisk-users] Asterisk 11, CEL and ConfBridge recordings

2014-03-07 Thread Jairo
Thank you very much Rusty.

It really works. Even if ${MyCustomFileName} gets a different value when
the second participant enters the conference, the filename remains the name
defined when the first participant enters (because he started the
conference).

Another thing, if I need to know the time a conference ended should I use
CEL or is there another better approach?

Best.


2014-03-06 21:28 GMT-03:00 Rusty Newton rnew...@digium.com:

 On Wed, Mar 5, 2014 at 1:30 PM, Jairo jairomolin...@gmail.com wrote:
  Dear friends,
 
  Need to know filenames of conference recordings in Asterisk 11.
 
  Besides directory scanning the recordings could use CEL:
 
  Filter MySQL rows with eventtype equal CHAN_START and channame like
  ConfBridgeRecorder and then get the eventtime field and convert to
 timestamp
  to complete filename(s).
 
  Would you suggest any other approaches?

 You might set the record file path yourself through the CONFBRIDGE
 function, for example, in dialplan:

 ...stuff up here to build a unique file name into MyCustomFileName...
 exten = 1,n,Set(CONFBRIDGE(user,record_file)=${MyCustomFileName}.wav)

 Then of course you now know the file name so you could do whatever you
 wanted with it afterwards.

 https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CONFBRIDGE

 --
 Rusty Newton
 Digium, Inc. | Community Support Manager
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 direct: +1 256 428 6200

 Check us out at: http://digium.com  http://asterisk.org

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

-- 
_
-- 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] High Availability with Asterisk

2014-03-07 Thread Paul Belanger
On Thu, Mar 6, 2014 at 10:57 AM, Mitul Limbani mi...@enterux.in wrote:
 Hello,

 Using Single Server with multiple VMs essentially kills the purpose, coz it
 doesnt protect against physical hardware failures.

 To save costs, use low end box as failover, to keep u in business, till
 primary box goes live.

Correct, in this case para-virt is not the way to go. You'll want to
use a virtualization platform that does support multi-hardware with
live migration support.

-- 
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger

-- 
_
-- 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] High Availability with Asterisk

2014-03-07 Thread Paul Belanger
On Thu, Mar 6, 2014 at 3:33 PM, Markus unive...@truemetal.org wrote:
 Hi Thorolf,

 Am 06.03.2014 16:21, schrieb Thorolf Godawa:

 Using (para-)virtualization with Xen could be an other option, on
 systems with low load this works reliable, but what happens on systems
 with high load? Are there any issues known about problems with the
 realtime, packet loss etc. because it runs in a VM?


 hmm, all my Asterisk'es run in (KVM) VMs, no issues there. But how is this
 related to high availability? I think it's not. :)

 I think the way to go for high availability (and scalability) is Kamailio!
 In a redundant setup, running on 2 separate physical machines (maybe in a
 VM, doesn't matter). Then you make them failsafe using whatever tool(s)
 available. Then you can set up 1, 2, 10 or 100 Asterisk behind Kamailio
 and any of them could fail (but 1 :-) ) and you will still be online.

 If you want to further develop the high availability thought, then you could
 use CephFS which will give you self-healing, 100% available storage over
 multiple physical storage servers. There you could store your Asterisk
 config files, or your MySQL database used by all the Asterisk servers, for
 CDRs, SIP registrations etc. It's kinda slow, but I think fast enough for
 Asterisk / MySQL. :)

 And, to scale and to make the Asterisk nodes redundant (redundancy is not
 really needed anymore, since Kamailio takes care of that, but basically then
 you get also VM/physical redundancy), you could look into OpenNebula which
 provides a nice auto-scaling feature already out of the box. If there's load
 on your Asterisk VMs, OpenNebula will detect this and spawn new Asterisk VMs
 (probably on different physical servers, otherwise it doesn't make that much
 sense performance-wise) which will automagically receive requests/calls from
 Kamailio. If the load goes down, the VM can be automagically stopped again
 to free resources for other VMs/applications. OpenNebula is less popular
 than OpenStack, which seems to be the first choice for Cloud-stuff today,
 but what I liked about OpenNebula is that it provides the auto-scaling
 feature already in the customer-facing web-frontend out-of-the-box, unlike
 OpenStack. So you could offer your customers a self-managed, redundant
 Asterisk cloud or something like that. :)

 In theory, this combination should give you a 100% redundant, auto-healing,
 auto-scaling VoIP setup. :)

+1 to this post.  A lot of good information here.

-- 
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger

-- 
_
-- 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] High Availability with Asterisk

2014-03-07 Thread Adolphe Cher-Aime
Good post.
 Actually this is the architecture we  have.


On Fri, Mar 7, 2014 at 11:31 AM, Paul Belanger paul.belan...@polybeacon.com
 wrote:

 On Thu, Mar 6, 2014 at 3:33 PM, Markus unive...@truemetal.org wrote:
  Hi Thorolf,
 
  Am 06.03.2014 16:21, schrieb Thorolf Godawa:
 
  Using (para-)virtualization with Xen could be an other option, on
  systems with low load this works reliable, but what happens on systems
  with high load? Are there any issues known about problems with the
  realtime, packet loss etc. because it runs in a VM?
 
 
  hmm, all my Asterisk'es run in (KVM) VMs, no issues there. But how is
 this
  related to high availability? I think it's not. :)
 
  I think the way to go for high availability (and scalability) is
 Kamailio!
  In a redundant setup, running on 2 separate physical machines (maybe in a
  VM, doesn't matter). Then you make them failsafe using whatever tool(s)
  available. Then you can set up 1, 2, 10 or 100 Asterisk behind Kamailio
  and any of them could fail (but 1 :-) ) and you will still be online.
 
  If you want to further develop the high availability thought, then you
 could
  use CephFS which will give you self-healing, 100% available storage over
  multiple physical storage servers. There you could store your Asterisk
  config files, or your MySQL database used by all the Asterisk servers,
 for
  CDRs, SIP registrations etc. It's kinda slow, but I think fast enough for
  Asterisk / MySQL. :)
 
  And, to scale and to make the Asterisk nodes redundant (redundancy is not
  really needed anymore, since Kamailio takes care of that, but basically
 then
  you get also VM/physical redundancy), you could look into OpenNebula
 which
  provides a nice auto-scaling feature already out of the box. If there's
 load
  on your Asterisk VMs, OpenNebula will detect this and spawn new Asterisk
 VMs
  (probably on different physical servers, otherwise it doesn't make that
 much
  sense performance-wise) which will automagically receive requests/calls
 from
  Kamailio. If the load goes down, the VM can be automagically stopped
 again
  to free resources for other VMs/applications. OpenNebula is less popular
  than OpenStack, which seems to be the first choice for Cloud-stuff today,
  but what I liked about OpenNebula is that it provides the auto-scaling
  feature already in the customer-facing web-frontend out-of-the-box,
 unlike
  OpenStack. So you could offer your customers a self-managed, redundant
  Asterisk cloud or something like that. :)
 
  In theory, this combination should give you a 100% redundant,
 auto-healing,
  auto-scaling VoIP setup. :)
 
 +1 to this post.  A lot of good information here.

 --
 Paul Belanger | PolyBeacon, Inc.
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 Github: https://github.com/pabelanger | Twitter:
 https://twitter.com/pabelanger

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

-- 
_
-- 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] High Availability with Asterisk

2014-03-07 Thread Johann Steinwendtner

On 2014-03-07 17:31, Paul Belanger wrote:

On Thu, Mar 6, 2014 at 3:33 PM, Markus unive...@truemetal.org wrote:

Hi Thorolf,

Am 06.03.2014 16:21, schrieb Thorolf Godawa:


Using (para-)virtualization with Xen could be an other option, on
systems with low load this works reliable, but what happens on systems
with high load? Are there any issues known about problems with the
realtime, packet loss etc. because it runs in a VM?



hmm, all my Asterisk'es run in (KVM) VMs, no issues there. But how is this
related to high availability? I think it's not. :)

I think the way to go for high availability (and scalability) is Kamailio!
In a redundant setup, running on 2 separate physical machines (maybe in a
VM, doesn't matter). Then you make them failsafe using whatever tool(s)
available. Then you can set up 1, 2, 10 or 100 Asterisk behind Kamailio
and any of them could fail (but 1 :-) ) and you will still be online.


Sorry, for the stupid question, but what happens if Kamailio fails ?

Thanks.

regards

Hans



--
_
-- 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] High Availability with Asterisk

2014-03-07 Thread Gareth Blades


On 07/03/14 16:52, Johann Steinwendtner wrote:


Sorry, for the stupid question, but what happens if Kamailio fails ? 


We have two copies on different servers which make use of keepalived to 
provide a virtual IP address between them. We also have them connected 
to two databases with active-active replication.


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

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


Re: [asterisk-users] Asterisk 11, CEL and ConfBridge recordings

2014-03-07 Thread Rusty Newton
On Fri, Mar 7, 2014 at 7:21 AM, Jairo jairomolin...@gmail.com wrote:
 Thank you very much Rusty.

 It really works. Even if ${MyCustomFileName} gets a different value when the
 second participant enters the conference, the filename remains the name
 defined when the first participant enters (because he started the
 conference).

 Another thing, if I need to know the time a conference ended should I use
 CEL or is there another better approach?

If you can get it from CEL, there is that, otherwise you can track
when you receive the AMI event ConfbridgeEnd

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerEvent_ConfbridgeEnd

That is all I got from poking around the docs. :)

-- 
Rusty Newton
Digium, Inc. | Community Support Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
direct: +1 256 428 6200

Check us out at: http://digium.com  http://asterisk.org

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

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


Re: [asterisk-users] Asterisk 11, CEL and ConfBridge recordings

2014-03-07 Thread Jairo
Great :)

Thank you very much.

Best.


2014-03-07 18:07 GMT-03:00 Rusty Newton rnew...@digium.com:

 On Fri, Mar 7, 2014 at 7:21 AM, Jairo jairomolin...@gmail.com wrote:
  Thank you very much Rusty.
 
  It really works. Even if ${MyCustomFileName} gets a different value when
 the
  second participant enters the conference, the filename remains the name
  defined when the first participant enters (because he started the
  conference).
 
  Another thing, if I need to know the time a conference ended should I use
  CEL or is there another better approach?

 If you can get it from CEL, there is that, otherwise you can track
 when you receive the AMI event ConfbridgeEnd


 https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerEvent_ConfbridgeEnd

 That is all I got from poking around the docs. :)

 --
 Rusty Newton
 Digium, Inc. | Community Support Manager
 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
 direct: +1 256 428 6200

 Check us out at: http://digium.com  http://asterisk.org

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

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