[asterisk-users] Use SRV for failover proxy

2013-09-06 Thread Dominique Haeber
Hi all,

is it possible that asterisk uses two proxies with SRV?
The enddevices are registered on one of the two Proxies (Kamailio).
The two proxies communicate with each other. 
And asterisk can choose one of this proxies with SRV.

asterisk
|   \
|\
Proxy1Proxy2


I have tries to solve this problem with two trunks for this proxies
and Dial(...@proxytrunk) but on this way the properties of the
enddevices are lost and the properties from trunk are taken.

So i'd like to use SRV, if that is possible.

Very thanks
Dominique


--
_
-- 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 cpu average load

2013-09-06 Thread Kamlesh Kumar

 
Date: Thu, 5 Sep 2013 12:11:36 -0700
From: asterisk@sedwards.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] high cpu average load

On Thu, 5 Sep 2013, Kamlesh Kumar wrote:
 
> Running one asterisk server with below details.
> Only SIP to SIP calls. No real time configuration, no recording, no 
> voicemail, no IVR, no codec translation. Average CPU load varies between 4 to 
> 30 for 150 to 200 concurrent calls and
> we start getting problem in call quality like delay in connectivity, voice 
> breakage etc
>  
> Hardware:
> 2 Physical processor Intel(R) Xeon(R) CPU5120  @ 1.86GHz
> 8 GB RAM
> 500 GB Sata HDD
>  
> Asterisk: 1.6.2.9
> PHP 5.3.3 (cli)
> MySQL: 5.0.77 
> Linux: CnetOS 5.5 (Final)
>  
> Please suggest the solution.
 
Need a bit more detail.
 
The 5120 is kind of a wimpy processor, but what is keeping it busy?
 
What do 'top' and 'htop' show are consuming the processor?
 
What is your application?
 
What are 200 calls doing?
 
Are you calling a bunch of AGIs written in scripting languages?
 
Eliminating translation is difficult. How do you know you were successful? 
Do 'module show like codec_' and 'module show like format_' show anything 
unexpected?
 Below are the further details:top and htop shows that 'asterisk' is consuming 
the whole cpu power.Application: Kind of SIP trunking - call is coming from IP 
and using dialplan routed to other third party IPAre you calling a bunch of 
AGIs written in scripting languages?
only one AGI script written in PHP is called with 'h' extension once the call 
is hungupmodule show like codec_
vm*CLI> module show like codec_
Module Description  Use 
Count
codec_a_mu.so  A-law and Mulaw direct Coder/Decoder 0
codec_dahdi.so Generic DAHDI Transcoder Codec Translato 0
codec_alaw.so  A-law Coder/Decoder  0
codec_lpc10.so LPC10 2.4kbps Coder/Decoder  0
codec_adpcm.so Adaptive Differential PCM Coder/Decoder  0
codec_g722.so  ITU G.722-64kbps G722 Transcoder 0
codec_g726.so  ITU G.726-32kbps G726 Transcoder 0
codec_ulaw.so  mu-Law Coder/Decoder 0
codec_gsm.so   GSM Coder/Decoder0
9 modules loadedmodule show like format_
vm*CLI> module show like format_
Module Description  Use 
Count
format_g726.so Raw G.726 (16/24/32/40kbps) data 0
format_ogg_vorbis.so   OGG/Vorbis audio 0
format_pcm.so  Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G. 0
format_g729.so Raw G729 data0
format_wav.so  Microsoft WAV format (8000Hz Signed Line 0
format_wav_gsm.so  Microsoft WAV format (Proprietary GSM)   0
format_g723.so G.723.1 Simple Timestamp File Format 0
format_gsm.so  Raw GSM data 0
format_vox.so  Dialogic VOX (ADPCM) File Format 0
format_mp3.so  MP3 format [Any rate but 8000hz mono is  0
10 modules loaded
Thank you,Kamlesh
--
_
-- 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] Use SRV for failover proxy

2013-09-06 Thread Gareth Blades

On 06/09/13 09:42, Dominique Haeber wrote:

Hi all,

is it possible that asterisk uses two proxies with SRV?
The enddevices are registered on one of the two Proxies (Kamailio).
The two proxies communicate with each other.
And asterisk can choose one of this proxies with SRV.

asterisk
|   \
|\
Proxy1Proxy2


I have tries to solve this problem with two trunks for this proxies
and Dial(...@proxytrunk) but on this way the properties of the
enddevices are lost and the properties from trunk are taken.

So i'd like to use SRV, if that is possible.

Very thanks
Dominique
No asterisk will always use the first SRV record and wont load balance 
or switch to a backup if its not reachable.


What we do is have each endpoint defined in sip.conf with qualify=yes 
and then in the dialplan use the ${SIPPEER(x)} variable to pull out the 
status of each peer and pass it into an AGI application to perform the 
load balancing etc...


If you are happy with wone being a primary and one being a backup then 
if you have qualify=yes set for both you could just dial using the first 
one and then an execif hangupcause=20 then try dialing the backup.


--
_
-- 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] Use SRV for failover proxy

2013-09-06 Thread Dominique Haeber
Gareth Blades  schrieb am Fre, 06. Sep 13:21:
> No asterisk will always use the first SRV record and wont load
> balance or switch to a backup if its not reachable.

hmm okay :O

> What we do is have each endpoint defined in sip.conf with
> qualify=yes and then in the dialplan use the ${SIPPEER(x)} variable
> to pull out the status of each peer and pass it into an AGI
> application to perform the load balancing etc...
> 
> If you are happy with wone being a primary and one being a backup
> then if you have qualify=yes set for both you could just dial using
> the first one and then an execif hangupcause=20 then try dialing the
> backup.

okay, then i must try this way. ^^

thank you for your help and information.

greetings
dominique

--
_
-- 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] How do I remotely force an *unconfigured* Digium DPMA phone to re-query the network for the DPMA server?

2013-09-06 Thread Alex Villací­s Lasso

Consider the following scenario:

1) One or more Digium DPMA phones are plugged into the network. I know their IP 
addresses and MACs.
2) The Asterisk I want to use as the telephony server starts without the DPMA 
module. Therefore there are no DPMA sessions between the phones and the server.
3) I install DPMA on the server, and write its configuration file for the 
phones. I will tie each phone to its configuration using the MAC, which I 
already know (config_auth=mac)
4) I reload the module as required to reload the configuration file.

Now that everything else is ready, I have to make the previously unconfigured 
Digium phones to query the net for the DPMA server.

How?

I would rather not physically locate and reset every single phone (all 100 of them, to cite a random number). I want a way to remotely force the phones to re-query the net and discover the configured DPMA server. The "digium_phones reconfigure all" would 
work for this, except that it needs an existing DPMA session, and there is none, since I configured the server for the first time. However, since I know the IP addresses of the phones, I could send some kind of notification to the phones. But I do not know 
which one. For some phones other than Digium, some variations of the SIP NOTIFY command will force the phone to request its configuration anew. Is there any equivalent for Digium phones?


A variation: the same Asterisk server has a bunch of configured DPMA phones. I now add a fresh batch of phones to the net. Since their MACs are unknown to the Asterisk server, the phones will remain unconfigured. I add the MACs to the file and reload the 
module. How do I make the fresh batch of phones to re-query the net and pull its configuration without having to physically go to each one and reset or otherwise interact with it?


--
_
-- 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] DPMA for Asterisk 12?

2013-09-06 Thread George Joseph
Looks like res_digium_phone will need some work for Asterisk 12...

WARNING[9372]: loader.c:561 load_dynamic_module: Error loading module
'res_digium_phone.so':
/usr/lib64/asterisk/modules/res_digium_phone.so: undefined symbol:
__ao2_container_alloc

--
_
-- 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] ALSA Module Sample Rate

2013-09-06 Thread Nicholas Johnson
All,
  I'm trying to setup asterisk to run off of a raspberry pi and use the
alsa module to access the sound card (a usb logitech 270 camera/mic).
 Everything appears to be working except the audio quality is very (very)
poor and there is an error from the asterisk conosle:

 Loading chan_alsa.so.
  == Parsing '/etc/asterisk/alsa.conf': Found
[Sep  6 17:57:29] WARNING[4562]: chan_alsa.c:209 alsa_card_init: *Rate not
correct, requested 8000, got 16000*
  == Registered channel type 'Console' (ALSA Console Channel Driver)
 chan_alsa.so => (ALSA Console Channel Driver)


I've tied to configure the alsa conf file (asound.conf) but haven't had any
luck changing the sample rate.  Any thoughts?

Thanks

 nick
--
_
-- 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] 11.4.0: iax packets lost by amazon ec2

2013-09-06 Thread Sean Darcy
I have 11.4.0 on an Amazon EC2 instance. SIP works fine, but I can't get 
iax to work.


I've opened 4569 in the EC2 Security Group.

I'm using the zoiper client. Using tcpdump I can see the zoiper packets 
coming in on 4569, but nothing shows on the asterisk cli.


Frame 33: 79 bytes on wire (632 bits), 79 bytes captured (632 bits) on 
interface 0


   12 31 3b 12 40 84 fe ff ff ff ff ff 08 00 45 00  .1;.@.E.
0010   00 41 00 00 40 00 2f 11 37 f1 44 c7 80 b8 0a ca  .A..@./.7.D.
0020   43 72 11 d9 11 d9 00 2d fd 22 80 04 80 00 00 00  Cr.-."..
0030   00 02 00 00 06 0d 06 02 67 6e 13 02 00 3c 36 00  gn...<6.
0040   24 0d 5a 6f 69 70 65 72 20 72 31 38 39 37 36 $.Zoiper r18976

iptables is flushed.


I'm not sure asterisk is even listening for the packets:

[root@asterisk ~]# netstat -apnt | grep 5060
tcp0  0 0.0.0.0:50600.0.0.0:* 
LISTEN  1706/asterisk

[root@asterisk ~]# netstat -apnt | grep 4569
[root@asterisk ~]#

But it should be:

ip-10-202-67-114*CLI> iax2 show peer gn


  * Name   : gn
  Description  :
  Secret   : 
  Context  : nexus-in
  Parking lot  :
  Mailbox  :
  Dynamic  : Yes
  Callnum limit: 0
  Calltoken req: No
  Trunk: No
  Encryption   : No
  Callerid : "" <>
  Expire   : -1
  ACL  : No
  Addr->IP : (Unspecified) Port 0
  Defaddr->IP  : 0.0.0.0 Port 4569
  Username :
  Codecs   : (gsm|ulaw|g722)
  Codec Order  : (silk16|ulaw|gsm|g722)
  Status   : UNKNOWN
  Qualify  : every 6ms when OK, every 1ms when UNREACHABLE 
(sample smoothing Off)


iax.conf:

[general]
bandwidth=medium

trunkmtu=1240
disallow=all
allow=silk16
allow=ulaw
allow=gsm
allow=g722
jitterbuffer=yes
forcejitterbuffer=no

authdebug=yes

tos=ef
cos=5
autokill=yes
codecpriority=caller

[gn]
type=friend
auth=md5
secret=mine
host=dynamic
context=nexus-in
qualify=yes

Thanks for any help.

sean


--
_
-- 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 do I remotely force an *unconfigured* Digium DPMA phone to re-query the network for the DPMA server?

2013-09-06 Thread George Joseph
On Fri, Sep 6, 2013 at 10:41 AM, Alex Villací­s Lasso
 wrote:
> Consider the following scenario:
>
> 1) One or more Digium DPMA phones are plugged into the network. I know their
> IP addresses and MACs.
> 2) The Asterisk I want to use as the telephony server starts without the
> DPMA module. Therefore there are no DPMA sessions between the phones and the
> server.
> 3) I install DPMA on the server, and write its configuration file for the
> phones. I will tie each phone to its configuration using the MAC, which I
> already know (config_auth=mac)
> 4) I reload the module as required to reload the configuration file.
>
> Now that everything else is ready, I have to make the previously
> unconfigured Digium phones to query the net for the DPMA server.
>
> How?
>
> I would rather not physically locate and reset every single phone (all 100
> of them, to cite a random number). I want a way to remotely force the phones
> to re-query the net and discover the configured DPMA server. The
> "digium_phones reconfigure all" would work for this, except that it needs an
> existing DPMA session, and there is none, since I configured the server for
> the first time. However, since I know the IP addresses of the phones, I
> could send some kind of notification to the phones. But I do not know which
> one. For some phones other than Digium, some variations of the SIP NOTIFY
> command will force the phone to request its configuration anew. Is there any
> equivalent for Digium phones?

Apparently notify.check-sync does work but only if you're NOT using
the DPMA.  I just tried it and the phone just responds with a 200/OK
and does nothing.

>
> A variation: the same Asterisk server has a bunch of configured DPMA phones.
> I now add a fresh batch of phones to the net. Since their MACs are unknown
> to the Asterisk server, the phones will remain unconfigured. I add the MACs
> to the file and reload the module. How do I make the fresh batch of phones
> to re-query the net and pull its configuration without having to physically
> go to each one and reset or otherwise interact with it?
>

I'm going to be running into the same scenarios as I add more phones.

--
_
-- 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] Pull call out of queue

2013-09-06 Thread Todd R .
Trying to figure out the best way to pull an active call out of a queue by 
unique id and put it on hold. I don't want to put it on hold on the agent's 
phone but I want it to be pulled away from the agent's phone and into Asterisk 
limbo somewhere.
Shortly after I want to pull the same call out of limbo and redirect it back to 
either the same agent or another.
I was thinking about call parking but, I think parking is more than I need and 
it potentially introduces more complications.
I will be doing this through the manager interface on Asterisk 1.8.x.
Any ideas, thoughts or help would be greatly appreciated.
Thanks in advance for any help.   --
_
-- 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] DPMA for Asterisk 12?

2013-09-06 Thread Matthew Jordan
On Fri, Sep 6, 2013 at 12:43 PM, George Joseph
wrote:

> Looks like res_digium_phone will need some work for Asterisk 12...
>
> WARNING[9372]: loader.c:561 load_dynamic_module: Error loading module
> 'res_digium_phone.so':
> /usr/lib64/asterisk/modules/res_digium_phone.so: undefined symbol:
> __ao2_container_alloc
>
>
Quite a lot, actually. Beyond just linking issues, there's that whole new
SIP stack thing we'd like to get it using.

We're working on it - stay tuned...

Matt

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
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] 11.4.0: iax packets lost by amazon ec2

2013-09-06 Thread Steve Edwards

On Fri, 6 Sep 2013, Sean Darcy wrote:


I'm not sure asterisk is even listening for the packets:

[root@asterisk ~]# netstat -apnt | grep 4569
[root@asterisk ~]#


'-t' meand TCP. IAX is UDP.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- 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] DPMA, check-sync

2013-09-06 Thread Alex Villací­s Lasso

El 06/09/13 14:44, Malcolm Davenport escribió:

Howdy,

Please forgive the off-list e-mail.  I'm not subscribed to the list, I only 
peruse the archives.

The follow up from George is correct.  For phones that have already been 
attached to DPMA, DPMA disables the enable_check_sync phone setting.

For phones that have not yet been attached to DPMA, that's not the case, as 
enable_check_sync is enabled out of the box.  So, a properly formatted SIP 
NOTIFY will do the trick.

You can do that outside of Asterisk using sipp or sipsak or something similar.

To cover the case for phones that are already attached to DPMA, we'll add a new phone option in DPMA 1.7.1.  We're on DPMA 1.6.0 right now, and DPMA 1.7.0 is already in the latter stages of internal QA.  I don't want to derail that train as we're very 
nearly there.


The new phone option will simply expose the ability to turn enable_check_sync 
on or off for phones.  We'll still default to the current behavior of disabling 
it though for phones attached to DPMA.

Apologies for the inconvenience.


The check-sync notify does not work in all required scenarios. I tracked the 
traffic with wireshark. To demonstrate:

Start from a D40 phone, factory resetted. The asterisk server starts with DPMA 
loaded but with a zero-bytes conf.
Write a valid configuration that includes the phone.
On Asterisk: module reload res_digium_phone.so ; digium_phones reconfigure all 
; sip notify CHECKSYNC $PHONE_IP
(this makes the phone re-query the network in this one time)
(phone gets reconfigured and registers the SIP accounts)
Now, remove the phone section, but keep all other sections intact.
On Asterisk: module reload res_digium_phone.so ; digium_phones reconfigure all 
; sip notify CHECKSYNC $PHONE_IP
(phone had a DPMA session, so it reloads configuration)
(phone tries to fetch configuration, but fails, as expected. The phone gets stuck in the 
"Communication Error" screen)
Now, restore the phone section so the configuration returns to the previously 
working state.
On Asterisk: module reload res_digium_phone.so ; digium_phones reconfigure all 
; sip notify CHECKSYNC $PHONE_IP
(sip notify gets sent, phone answers with 200 Ok)
(nothing happens. The phone is still stuck at the "Communication Error" screen)

What should happen is that the phone should re-scan at the last step and reload 
the configuration, as it did the first time.

The CHECKSYNC mentioned above is any entry in sip_notify.conf that references check-sync. 
As mentioned in the mailing list, I already know the phone IP for the "sip 
notify" command.

What I think is happening is that if the phone sees a DPMA server but the server has no valid configuration for the phone, the phone gets stuck in a state where check-resync will not make the phone rescan an updated configuration, and needs to be reset 
manually.


--
_
-- 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] 11.4.0: iax packets lost by amazon ec2

2013-09-06 Thread Sean Darcy

On 09/06/2013 07:08 PM, Steve Edwards wrote:

On Fri, 6 Sep 2013, Sean Darcy wrote:


I'm not sure asterisk is even listening for the packets:

[root@asterisk ~]# netstat -apnt | grep 4569
[root@asterisk ~]#


'-t' meand TCP. IAX is UDP.



My bad:

netstat -apnu | grep 4569
udp0  0 0.0.0.0:45690.0.0.0:* 
3176/asterisk


But why isn't asterisk seeing/acting upon the registration request? 
Wireshark finds the packet to 4569, so it's not a firewall problem.


Is it an asterisk configuration problem?

Does anybody else have iax working on ec2?

sean

--
_
-- 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] 11.4.0: iax packets lost by amazon ec2

2013-09-06 Thread Steve Edwards

On Fri, 6 Sep 2013, Sean Darcy wrote:

But why isn't asterisk seeing/acting upon the registration request? 
Wireshark finds the packet to 4569, so it's not a firewall problem.


Does tcpdump/wireshark show packets flowing in both directions?

Does enabling IAX debugging on the Asterisk console yield any clues?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

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