Re: [asterisk-users] Asterisk uses 3 seconds to send ACK after OK

2013-03-19 Thread Pan B. Christensen

Taking a look at the DEBUG statements that are associated with the
thread processing the SIP response:

[Mar 15 13:16:05] DEBUG[27947] netsock2.c: Splitting 'FQDNz:5060' into...
[Mar 15 13:16:05] DEBUG[27947] netsock2.c: ...host 'FQDNz' and port '5060'.
[Mar 15 13:16:08] DEBUG[27947] netsock2.c: Splitting 'yyy.yyy.yyy.yyy'
into...
[Mar 15 13:16:08] DEBUG[27947] netsock2.c: ...host 'yyy.yyy.yyy.yyy' and
port ''.
[Mar 15 13:16:08] VERBOSE[27947] chan_sip.c: [Mar 15 13:16:08]
Transmitting (no NAT) to yyy.yyy.yyy.yyy:5060:
ACK sip:b@FQDNz:5060 SIP/2.0

If I had to guess, the DNS resolution of 'FQDNz' probably took 3
seconds. You may want to consider a local DNS cache to help speed up
results.

Matt


Thanks for your reply, Matt.

I thought about that as well after sending the original mail, and indeed the
first server in resolv.conf was not replying. I fixed that and DNS lookup is
now very fast, but the problem still remains. Could Asterisk still have the
old resolv.conf cached or something? I tried a reload but that didn't help.
As this is a busy server, I'm unable to stop and start Asterisk now during
business hours.

With kind regards,
Pan


Update: I think the problem is solved now, but I don't understand the 
solution. Since last time I've tried playing around with the dnsmgr to no 
avail. Today I enabled qualify on the trunks in question and the problem 
seemed to go away. Does anyone have any idea why?


With kind regards,
Pan 



--
_
-- 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 uses 3 seconds to send ACK after OK

2013-03-18 Thread Pan B. Christensen

Taking a look at the DEBUG statements that are associated with the
thread processing the SIP response:

[Mar 15 13:16:05] DEBUG[27947] netsock2.c: Splitting 'FQDNz:5060' into...
[Mar 15 13:16:05] DEBUG[27947] netsock2.c: ...host 'FQDNz' and port '5060'.
[Mar 15 13:16:08] DEBUG[27947] netsock2.c: Splitting 'yyy.yyy.yyy.yyy'
into...
[Mar 15 13:16:08] DEBUG[27947] netsock2.c: ...host 'yyy.yyy.yyy.yyy' and
port ''.
[Mar 15 13:16:08] VERBOSE[27947] chan_sip.c: [Mar 15 13:16:08]
Transmitting (no NAT) to yyy.yyy.yyy.yyy:5060:
ACK sip:b@FQDNz:5060 SIP/2.0

If I had to guess, the DNS resolution of 'FQDNz' probably took 3
seconds. You may want to consider a local DNS cache to help speed up
results.

Matt


Thanks for your reply, Matt.

I thought about that as well after sending the original mail, and indeed the 
first server in resolv.conf was not replying. I fixed that and DNS lookup is 
now very fast, but the problem still remains. Could Asterisk still have the 
old resolv.conf cached or something? I tried a reload but that didn't help. 
As this is a busy server, I'm unable to stop and start Asterisk now during 
business hours.


With kind regards,
Pan 



--
_
-- 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] Asterisk uses 3 seconds to send ACK after OK

2013-03-15 Thread Pan B. Christensen
Hello!

We recently upgraded one of our customers from 1.4.44 to 1.8.15-cert1. We have 
several other customers running both versions.
The customer in question does not use us as their provider as they’re located 
in a different country.

When they make outgoing calls, there is a 3 second delay between answering the 
call and the call being established. When debugging this, I found that Asterisk 
waits 3 seconds after receiving 200 OK before returning the ACK. See attached 
image. There’s no verbose output in the CLI during this time. I turned on full 
debugging. This seems to produce around a hundred lines of debug per second 
until suddenly I see a full 3 seconds stop just before sending the ACK.

[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  0 [ 14]: SIP/2.0 200 Ok
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  1 [ 57]: Via: SIP/2.0/UDP 
xxx.xxx.xxx.xxx:;branch=z9hG4bK135effb0
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  2 [ 66]: From: a 
sip:a...@xxx.xxx.xxx.xxx:;tag=as6b9fcf86
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  3 [ 61]: To: 
sip:b@FQDNy:5060;tag=1014243474
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  4 [ 59]: Call-ID: 
03dffd7b5ecd7eb47c2bae6b101ba1aa@62.109.37.34:5088
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  5 [ 16]: CSeq: 102 INVITE
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  6 [ 51]: Contact: 
sip:b@FQDNz:5060
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  7 [117]: Record-Route: 
sip:yyy.yyy.yyy.yyy;lr=on;ftag=as6b9fcf86;d=b49.b0ae2a82;vsf=AAA6NTA4OA--
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  8 [ 69]: Allow: 
INVITE,ACK,PRACK,SUBSCRIBE,BYE,CANCEL,NOTIFY,INFO,REFER,UPDATE
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header  9 [ 24]: Supported: timer, 
100rel
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header 10 [ 29]: Content-Type: 
application/sdp
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header 11 [ 19]: Content-Length: 352
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:  Header 12 [  0]:
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  0 [  3]: v=0
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  1 [ 35]: o=- 25469059 0 IN 
IP4 ccc.ccc.ccc.ccc
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  2 [ 13]: s=Cisco SDP 0
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  3 [ 22]: c=IN IP4 
ccc.ccc.ccc.ccc
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  4 [  5]: t=0 0
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  5 [ 31]: m=audio 21252 
RTP/AVP 8 101 100
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  6 [ 33]: a=rtpmap:101 
telephone-event/8000
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  7 [ 15]: a=fmtp:101 0-15
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  8 [ 23]: a=rtpmap:100 
X-NSE/8000
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body  9 [ 18]: a=fmtp:100 200-202
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body 10 [  9]: a=X-sqn:0
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body 11 [ 28]: a=X-cap: 1 audio 
RTP/AVP 100
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body 12 [ 33]: a=X-cpar: 
a=rtpmap:100 X-NSE/8000
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body 13 [ 28]: a=X-cpar: 
a=fmtp:100 200-202
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c:Body 14 [ 26]: a=X-cap: 2 image 
udptl t38
[Mar 15 13:16:05] VERBOSE[27947] chan_sip.c: [Mar 15 13:16:05] --- (12 headers 
15 lines) ---
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: = Looking for  Call ID: 
03dffd7b5ecd7eb47c2bae6b101ba...@xxx.xxx.xxx.xxx: (Checking To) --From tag 
as6b9fcf86 --To-tag 1014243474
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: Acked pending invite 102
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: Stopping retransmission on 
'03dffd7b5ecd7eb47c2bae6b101ba...@xxx.xxx.xxx.xxx:' of Request 102: Match 
Found
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: SIP response 200 to standard invite
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: SIP response 200 to standard invite
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: Processing session-level SDP v=0... 
UNSUPPORTED OR FAILED.
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: Call 
03dffd7b5ecd7eb47c2bae6b101ba...@xxx.xxx.xxx.xxx: responded to our reinvite 
without changing SDP version; ignoring SDP.
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: Updating call counter for outgoing 
call
[Mar 15 13:16:05] DEBUG[27947] chan_sip.c: build_route: Record-Route hop: 
sip:yyy.yyy.yyy.yyy;lr=on;ftag=as6b9fcf86;d=b49.b0ae2a82;vsf=AAA6NTA4OA--
[Mar 15 13:16:05] VERBOSE[27947] chan_sip.c: [Mar 15 13:16:05] list_route: hop: 
sip:yyy.yyy.yyy.yyy;lr=on;ftag=as6b9fcf86;d=b49.b0ae2a82;vsf=AAA6NTA4OA--
[Mar 15 13:16:05] DEBUG[27947] netsock2.c: Splitting 'FQDNz:5060' into...
[Mar 15 13:16:05] DEBUG[27947] netsock2.c: ...host 'FQDNz' and port '5060'.
[Mar 15 13:16:05] DEBUG[27931] devicestate.c: No provider found, checking 
channel drivers for SIP – FQDNy
[Mar 15 13:16:05] DEBUG[27931] chan_sip.c: 

Re: [asterisk-users] BLF and call-limit in 1.8

2012-12-10 Thread Pan B. Christensen


- Original Message - 
From: Matthew Jordan mjor...@digium.com
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com

Sent: Saturday, December 08, 2012 12:43 AM
Subject: Re: [asterisk-users] BLF and call-limit in 1.8

Thanks for your reply. I just tested creating a peer in sip.conf and that 
works as it should. In addition, the value of call-limit in sip show peer 
peer is correct (the same as in sip.conf, which in this case is 4).


-Pan


When you enable call-limit globally for all peers, it sets the
call-limit for all peers to INT_MAX.  Hence why each device can accept
quite a few calls.

The setting you're actually toggling is 'callcounter'.  When its enabled
(boolean true), it sets call-limit to INT_MAX. If not present, then the
call-limit value is used.  This is why every setting but '1' set the
call-limit to 0.

Since you're using Realtime, there me a number of issues at play. Do you
have this problem with a peer defined in sip.conf?

--
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] BLF and call-limit in 1.8

2012-12-10 Thread Pan B. Christensen
It seems I only assumed a call-limit value of 1 in the DB would make call 
waiting not work. I tested it now, and because that sets the value in 
Asterisk to INT_MAX, a call-limit value of 1 in the DB does allow for call 
waiting. The same value in sip.conf does not.


-Pan

- Original Message - 
From: Pan B. Christensen p...@ibidium.no
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com

Sent: Monday, December 10, 2012 11:54 AM
Subject: Re: [asterisk-users] BLF and call-limit in 1.8

Thanks for your reply. I just tested creating a peer in sip.conf and that 
works as it should. In addition, the value of call-limit in sip show peer 
peer is correct (the same as in sip.conf, which in this case is 4).


-Pan



--
_
-- 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] BLF and call-limit in 1.8

2012-12-10 Thread Pan B. Christensen
I finally found the real culprit. The call-limit DB field was mapped to both 
call-limit and callcounter in the view asterisk uses. The latter is what 
caused the strange behaviour. Removed both and everything works as expected 
now.


-Pan

- Original Message - 
From: Pan B. Christensen p...@ibidium.no
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com

Sent: Monday, December 10, 2012 12:13 PM
Subject: Re: [asterisk-users] BLF and call-limit in 1.8


It seems I only assumed a call-limit value of 1 in the DB would make call 
waiting not work. I tested it now, and because that sets the value in 
Asterisk to INT_MAX, a call-limit value of 1 in the DB does allow for call 
waiting. The same value in sip.conf does not.


-Pan



--
_
-- 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] BLF and call-limit in 1.8

2012-12-07 Thread Pan B. Christensen
But Asterisk doesn't send ANY notification regarding change of state (like 
ringing) unless call-limit is 1. In my opinion, ringing status (and probably 
several others) shouldn't take into consideration at what point a device is 
considered as busy.
This worked fine in 1.4 (we skipped 1.6) and seems broken in 1.8. Busy-level is 
1 in both configurations.

After some more investigation, I may have found a clue. When I type sip show 
peer peer, the following values are reported:
With DB value 4 or 3 or 2 or 0:
  Call limit   : 0
With DB value 1:
  Call limit   : 2147483647

This doesn't look correct to me...

-Pan
  - Original Message - 
  From: Olle E. Johansson 
  To: Asterisk Users Mailing List - Non-Commercial Discussion 
  Sent: Friday, December 07, 2012 8:20 AM
  Subject: Re: [asterisk-users] BLF and call-limit in 1.8




  6 dec 2012 kl. 16:54 skrev Danny Nicholas da...@debsinc.com:


Not sure about this since I use the 10/11 branches and not 1.8, but I think 
you need to use the deprecated call-limit for BLF and the new busylimit for the 
other features you need.
http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf




  Call-limit is the limit on the number of calls you can take and also sets a 
device to BUSY. Since you want to be able to transfer calls, you need at least 
two. But this did not set the phone to busy on one call. That's why we added 
busy-limit that can be set to the level you want device states to signal busy, 
but still give the ability to the phone to set up more calls.


  counteronpeer is the same as limitonpeer, just a new name.


  /O



From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Pan B. Christensen
Sent: Thursday, December 06, 2012 9:50 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] BLF and call-limit in 1.8

Hello

We have recently upgraded our internal PBX from 1.4 to 1.8. This made the 
BLF lamps on our Polycom phones stop working. After a lot of googling and a lot 
of testing, I have been unable to find a solution.

I did try to change the call-limit value from 4 to 1, and this actually 
made BLF work (noone suggested this, and what documantation I can find states 
that this option is deprecated). This change has other implications, however. 
Call waiting stops working, queues don't offer calls if the user is in a 
private call etc.

We have customers that require both BLF and call waiting at the same time.


We are running Asterisk 1.8.11-cert7

I've made the following additions to sip.conf [general]:
callcounter=yes
counteronpeer=yes (undocumented? Supposed to replace limitonpeers?)

(old relevant values, unchanged)
allowsubscribe=yes
subscribecontext=blf
notifyringing=yes
notifyhold=yes
limitonpeers=yes 

I also tried may other suggestions I've found like placing the hints in the 
same context as the extensions and removing subscribecontext.

Is there something I'm missing? Is something not working correctly?

Thanks in advance,
Pan
--
_
-- 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--
_
-- 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] BLF and call-limit in 1.8

2012-12-06 Thread Pan B. Christensen
Hello

We have recently upgraded our internal PBX from 1.4 to 1.8. This made the BLF 
lamps on our Polycom phones stop working. After a lot of googling and a lot of 
testing, I have been unable to find a solution.

I did try to change the call-limit value from 4 to 1, and this actually made 
BLF work (noone suggested this, and what documantation I can find states that 
this option is deprecated). This change has other implications, however. Call 
waiting stops working, queues don't offer calls if the user is in a private 
call etc.

We have customers that require both BLF and call waiting at the same time.


We are running Asterisk 1.8.11-cert7

I've made the following additions to sip.conf [general]:
callcounter=yes
counteronpeer=yes (undocumented? Supposed to replace limitonpeers?)

(old relevant values, unchanged)
allowsubscribe=yes
subscribecontext=blf
notifyringing=yes
notifyhold=yes
limitonpeers=yes  

I also tried may other suggestions I've found like placing the hints in the 
same context as the extensions and removing subscribecontext.

Is there something I'm missing? Is something not working correctly?

Thanks in advance,
Pan--
_
-- 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] Auto dialing Polycoms and other SIP phones

2011-05-05 Thread Pan B. Christensen
Hello Mike,

It is possible for Polycom phones to auto-answer an incoming call with 
speakerphone. I don’t have the details available right now, but it requires 
changing the phone’s configuration and sending a custom sip header with the 
INVITE. Great care should be taken when implementing this, as it could allow 
anyone to listen in or spy on your customer and/or their employees without 
their knowledge. No need to physically put bugs in the office anymore. The 
phones will already be there and they’ll be configured to allow monitoring of 
the room.

Autoanswer after one ring of a “beep” (or similar) ringtone may be a better 
solution for you and the customer.

Hope this helps.

With kind regards,
Pan

From: Mike 
Sent: Thursday, May 05, 2011 3:30 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
Subject: [asterisk-users] Auto dialing Polycoms and other SIP phones

Hi,

 

Is there a reliable way to auto-dial SIP phones (specifically Polycom) with 
some sort of TAPI driver in Windows?  I am aware of SIPTAPI, which makes the 
user’s phone ring, and when picked up dials the desired number, but I (and more 
to the point, many of my customers) find this annoying.  I’d like the phone to 
autodial on speakerphone (or headset if there is one), without any human 
intervention.

 

This doesn’t have to be a free solution.  If anyone knows one, I’d appreciate.

 

Regards,

 

Mike

 

 




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

[asterisk-users] Compiling extra modules

2011-05-04 Thread Pan B. Christensen
Hello,

I have been hired to fix a large and complicated installation using several 
Kamailio and Asterisk servers.

I found that I require some extra modules on some of the Asterisk servers. I 
was hoping to be able to compile only the modules needed and copy them to where 
they should be.

Asterisk was not compiled locally on each server! It was built elsewhere, added 
to svn and then checked out on each server. None of the directories are 
standard either. It will be a big job to replace all that.

When I copied the modules I had compiled and tried to load them, I got these 
errors:
*CLI load res_odbc.so
[May 4 17:21:07] WARNING[24075]: loader.c:695 inspect_module: Module 
'res_odbc.so' was not compiled with the same compile-time options as this 
version of Asterisk.
[May 4 17:21:07] WARNING[24075]: loader.c:696 inspect_module: Module 
'res_odbc.so' will not be initialized as it may cause instability.
[May 4 17:21:07] WARNING[24075]: loader.c:734 load_resource: Module 
'res_odbc.so' could not be loaded.

Is it possible to see somewhere what compile-time options were used when 
Asterisk was compiled? Do modules count as options? If I compile Asterisk on 
two equal servers with the same options and one extra module on one server. Can 
I then copy this module to the other server and load it?

Thanks in advance!

With kind regards,
Pan--
_
-- 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] Do I need a sip proxy?

2011-01-18 Thread Pan B. Christensen
Hello Bruce,


Sorry for the delay. I don't really have time to follow this list much.

In your original setup, you did use a sort of SIP Proxy (the central Asterisk 
feeding the others) depending on your definition. A SIP Proxy would probably 
solve your issue, but as I stated in my previous mail, you should not need one. 
Fixing (or exchanging) Pfsense should also solve your issue and then you'll 
have one less device that can bring your system down. Fixing Pfsense will 
probably require you to troubleshoot the issue some more to see exactly what 
happens, so you know what you need to fix. Compare the SIP traffic between your 
Asterisks and Pfsense to the traffic between Pfsense and your provider. Capture 
the traffic in .pcap format with ngrep, tcpdump, wireshark or other packet 
dumping tools, then analyze it in wireshark. To capture traffic outside 
Pfsense, you'll probably need to mirror a switch port, install a hub or ask 
your provider to send you a dump. This will require some understanding of the 
SIP message format and TCP/IP, but it should not be very complicated.

I'm quite sure Pfsense changes the contents of the SIP message itself in ways 
it should not do possibly in addition to changing the IP packets in ways it 
should not do. It may also possibly block incoming traffic it should not block.

If you decide to use a SIP proxy, then going back to your original design 
(using Asterisk as a proxy) would probably be the easiest for you.
Of the alternatives you've listed, I only have experience with Kamailio. In 
simple setups, its default configuration will not need to be altered much to 
get it working. Its logic is VERY different to Asterisk, though. I know that 
Kamailio would be a very good choice for this role. I believe the alternatives 
would be as well.


With kind regards,
Pan B. Christensen
Senior technician
Ibidium AS
http://www.ibidium.no/
  - Original Message - 
  From: Bruce B 
  To: Asterisk Users Mailing List - Non-Commercial Discussion 
  Sent: Tuesday, January 11, 2011 4:37 PM
  Subject: Re: [asterisk-users] Do I need a sip proxy?


  Thanks a lot for the great input Pan. 


  I think you are right on point with this one. I have STATIC PORT enabled in 
my outbound WAN. I am not sure if it was set for SIP or OpenVPN use but it is 
there for a reason.


  So, I try to mingle a bit with Siproxd package. I am a bit fuzzy on it 
though. If I have the Siproxd enabled, does it act as a one single server that 
connects multiple times to my provider or providers and then I connect to the 
Siproxd in return? Or, I can still register from Asterisk directly with the 
provider(s) and Siproxd will take care of the SIP packets to be handled nicely?


  If it's the latter then it sounds fine to use otherwise it would not only be 
complicated but also a downtime to Siproxd mean downtime to all Asterisk 
servers.


  ***In addition I have setup Siproxd according to pfsense guide online but 
once I save the configurations and return to it there are no configs left. I 
know this question is for pfsense forum but maybe someone else experienced this?


  ***And to return to my original question, do I need a SIP proxy and which one 
would be suit my needs? I still like to get an input on my previous e-mail. I 
have to stay with pfsense for now as it has proven to be a good router in all 
other aspect.


  Thanks,


  On Tue, Jan 11, 2011 at 7:38 AM, Pan B. Christensen p...@ibidium.no wrote:

Hello Bruce,

Your understanding of NAT is correct, and your setup should work.

I’m not familiar with Pfsense, but I suspected that your problem was due to 
a SIP ALG. Pfsense seems to have a SIP ALG and other special handling of VoIP 
traffic. Hence, you are not using plain NAT. Pfsense is probably rewriting the 
SIP packets in addition to the IP packets. Try reconfiguring Pfsense or 
swapping it for something else. A good way to troubleshoot your scenario is to 
compare the traffic in your end to the traffic on your providers end (or on 
either side of pfsense). Pay attention to the source and destination IP and 
ports in addition to the contents of the SIP messages.

http://doc.pfsense.org/index.php/VoIP_Configuration
http://en.wikipedia.org/wiki/Application-level_gateway

With kind regards,
Pan

From: Bruce B 
Sent: Tuesday, January 11, 2011 8:58 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion 
Subject: [asterisk-users] Do I need a sip proxy?

Hi Everyone, 

I am running multiple instances of Asterisk in Proxmox and so far I had one 
central Asterisk feeding all others with trunks from one provider. Now, I want 
to connect each Asterisk server directly to the provider. Based on my 
understanding, each connection made to the provider port 5060 would be on a 
port that is unique to that server. And so other connections made to the same 
provider will go out through a different port and should receive responses 
through that different

Re: [asterisk-users] Call queues on load-balanced asterisks

2011-01-13 Thread Pan B. Christensen

Hello Mr. Liu,

I tried searching for more information about FlexQueue, where to download 
etc. Google linked to vicidial.cn, which appears in your signature, but that 
page is all in chinese, and I couldn't find any english link. Where can I 
get more information about it? Is it a commercial product?


With kind regards,
Pan B. Christensen
Ibidium AS
http://www.ibidium.no

- Original Message - 
From: Thomas Liu thomas@wshuttle.com

To: asterisk-users@lists.digium.com
Sent: Tuesday, January 11, 2011 5:14 PM
Subject: Re: [asterisk-users] Call queues on load-balanced asterisks


Hi Pan  Dhaval,

We have implemented a FastAGI based queue with Erlang for a inbound call
center, and call this new application as FlexQueue.
All calls distributed on multiple asterisk boxes go through and are
controlled by that same remote fastagi server.

It can routing calls to any destination, by any business rules. It don't
rely on the db for agent/call status store  query.
It's event driven and dict based agent/call store  query, with very good
performance, and low cpu power consumption.

I think for your requirement, app_queue could not fulfill that.

Best Regards,

Thomas Liu

-
WShuttle Infotech Ltd. http://www.wshuttle.com / http://www.lookmypc.com
http://www.vicidial.cn / http://www.call-center-software.com.cn
Tel: +86 20 39230098 39230096
Mobile : +86 1390 3051 930
HK DID: +852 6950 0916, Macau DID: +853 6285 0645
Email: thomas@wshuttle.com
MSN:thomas...@21cn.com, QQ: 332148339, Skype:tonylly
Yahoo Messenger: thomaslly
Address: Room# 302, Building T8, Dongmen Plaza, Shuishi Reserved Area,
Guangzhou Higher Education Mega Center, Guangzhou,
Guangdong Province, China. Zip code: 510006

--



Hello Dhaval (and others),

As far as I can tell, realtime queue will not solve my problem. I can

statically

define the same queue with the same members on two machines as well. I was

planning

to use realtime anyway. The issue is the actual queueing of the incoming

calls.


Let?s say I define the queue IT-support with members Local/100 and

Local/101

on both machines. The first call comes in and is distributed by Kamailio

to Asterisk

A, and answered by 100. The next call comes in to Asterisk B, and is

answered by

101. At this point, both members are busy. Call 3 now comes in and is sent

to Asterisk

A, where it waits for a free member. Call 4 comes in and is also sent to

Asterisk

A, as is Call 5. Then call 6 is sent to Asterisk B. At this point 100

finishes

his call and becomes free. Which call is delivered to 100? As far as I can

tell,

that?s a 50/50 chance between call 3 and call 6. This is not correct

behaviour!

Call 6 should wait until calls 3, 4 and 5 (from the other server) have all

been

delivered.

In the example above: When call 3 comes in, Asterisk A may even try to

deliver

it to 101, who gets call waiting indication. He will now have two

simultaneous

calls from the same queue!

I have not found any way to share information about calls waiting in the

queue,

wait times, member states and so on between the two servers.

Unless you guys know of a way, I think I'm going to have to ask the

customer to

change their design to master-slave (with failover) instead of

load-balanced.


With kind regards,
Pan

 Hello Pan,

 You can user DB for this just make real time configuration of Queue and

make

 all asterisk server connected to Same DB if more load then use

replication

 for different server on DB, also So that Quque name should be same for

all

 server and asterisk can call same agent.

 you didnot mentioned that which purpose youwere use queue other wise i

can

 give answer in better way.

 regards
 Dhaval

 On Fri, Jan 7, 2011 at 5:08 PM, Pan B. Christensen pan at ibidium.no

wrote:


  Hello,

 I have been asked to implement the following design:

 Load-balanced Kamailio servers handling registrations and routing.
 Load-balanced asterisk feature servers handling voicemail and other

things

 Kamailio cannot do. Plus several load-balanced gateways, but they are

not

 relevant to my question.

 All this is working fine.

 I've now been asked to start implementing calling queues, and my

question

 is this:
 How can I implement the same queue on multiple Asterisk servers?

 Let's say that 10 people call the same queue. These calls would then
 currently be distributed 5 to Asterisk A and 5 to Asterisk B. How can I

make

 Asterisk A respect the 5 people queued on the other server and vice

versa?


 Will the customer need to change their design to make the feature

servers

 master-slave with failover instead of load-balanced?

 Mvh
 Pan



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

[asterisk-users] Call queues on load-balanced asterisks

2011-01-07 Thread Pan B. Christensen
Hello,

I have been asked to implement the following design:

Load-balanced Kamailio servers handling registrations and routing.  
Load-balanced asterisk feature servers handling voicemail and other things 
Kamailio cannot do. Plus several load-balanced gateways, but they are not 
relevant to my question.

All this is working fine.

I've now been asked to start implementing calling queues, and my question is 
this:
How can I implement the same queue on multiple Asterisk servers?

Let's say that 10 people call the same queue. These calls would then currently 
be distributed 5 to Asterisk A and 5 to Asterisk B. How can I make Asterisk A 
respect the 5 people queued on the other server and vice versa?

Will the customer need to change their design to make the feature servers 
master-slave with failover instead of load-balanced?

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