Thanks for the info. I did get it working without any SIP Proxy. There is a bug in pfSense v1.2.3 where certain configs are not removed and some inconsistencies exist in the xml config file. Once I cleaned that and when I limited my Asterisk servers to use different port ranges for UDP traffic now everything is working great.<br>
<br><div class="gmail_quote">On Tue, Jan 18, 2011 at 7:26 AM, Pan B. Christensen <span dir="ltr"><<a href="mailto:pan@ibidium.no" target="_blank">pan@ibidium.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff">
<div><font size="2" face="Arial">Hello Bruce,</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Sorry for the delay. I don't really have time to
follow this list much.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">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.
</font><font size="2" face="Arial">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.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">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.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">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.</font></div>
<div><font size="2" face="Arial">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.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">With kind regards,<br>Pan B. Christensen<br>Senior
technician<br>Ibidium AS<br><a href="http://www.ibidium.no/" target="_blank">http://www.ibidium.no/</a></font></div>
<blockquote style="border-left:#000000 2px solid;padding-left:5px;padding-right:0px;margin-left:5px;margin-right:0px"><div>
<div style="font:10pt arial">----- Original Message ----- </div>
<div style="font:10pt arial;background:#e4e4e4"><b>From:</b>
<a title="bruceb444@gmail.com" href="mailto:bruceb444@gmail.com" target="_blank">Bruce B</a>
</div>
<div style="font:10pt arial"><b>To:</b> <a title="asterisk-users@lists.digium.com" href="mailto:asterisk-users@lists.digium.com" target="_blank">Asterisk Users Mailing List -
Non-Commercial Discussion</a> </div>
</div><div><div></div><div><div style="font:10pt arial"><b>Sent:</b> Tuesday, January 11, 2011 4:37
PM</div>
<div style="font:10pt arial"><b>Subject:</b> Re: [asterisk-users] Do I need a
sip proxy?</div>
<div><br></div>
<div>Thanks a lot for the great input Pan. </div>
<div><br></div>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.
<div><br></div>
<div>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?</div>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>***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?</div>
<div><br></div>
<div>***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.</div>
<div><br></div>
<div>Thanks,<br><br>
<div class="gmail_quote">On Tue, Jan 11, 2011 at 7:38 AM, Pan B. Christensen
<span dir="ltr"><<a href="mailto:pan@ibidium.no" target="_blank">pan@ibidium.no</a>></span> wrote:<br>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:'Calibri';color:#000000;font-size:12pt">
<div>Hello Bruce,</div>
<div> </div>
<div>Your understanding of NAT is correct, and your setup should work.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div><a title="http://doc.pfsense.org/index.php/VoIP_Configuration" href="http://doc.pfsense.org/index.php/VoIP_Configuration" target="_blank">http://doc.pfsense.org/index.php/VoIP_Configuration</a></div>
<div><a title="http://en.wikipedia.org/wiki/Application-level_gateway" href="http://en.wikipedia.org/wiki/Application-level_gateway" target="_blank">http://en.wikipedia.org/wiki/Application-level_gateway</a></div>
<div> </div>
<div>With kind regards,</div>
<div>Pan</div>
<div style="font-style:normal;display:inline;font-family:'Calibri';color:#000000;font-size:small;font-weight:normal;text-decoration:none">
<div style="font:10pt tahoma">
<div> </div>
<div style="background:#f5f5f5">
<div><b>From:</b> <a title="bruceb444@gmail.com" href="mailto:bruceb444@gmail.com" target="_blank">Bruce B</a> </div>
<div><b>Sent:</b> Tuesday, January 11, 2011 8:58 AM</div>
<div><b>To:</b> <a title="asterisk-users@lists.digium.com" href="mailto:asterisk-users@lists.digium.com" target="_blank">Asterisk Users
Mailing List - Non-Commercial Discussion</a> </div>
<div><b>Subject:</b> [asterisk-users] Do I need a sip
proxy?</div></div></div>
<div> </div></div>
<div style="font-style:normal;display:inline;font-family:'Calibri';color:#000000;font-size:small;font-weight:normal;text-decoration:none">
<div>
<div></div>
<div>Hi Everyone,
<div> </div>
<div>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 port. At least that is my understanding of
NAT. The provider should see me trying to register from the same IP with
multiple different ports (high number ports; not talking about 5060 as this
is outbound and not inbound) and should be able to differentiate between SIP
packets coming from various servers. However, it seems to not happen.</div>
<div> </div>
<div>There is some sort of clash and only one of the servers shows
registered with the provider and other's trunks go down. I have noticed that
keeping one server works. It could also be that my Fail2ban kicks in on all
servers if the SIP packets received are broadcasted to all servers which
shouldn't really happen and router should take of this by sending it to the
server that has the established connection through that port.</div>
<div> </div>
<div><b>My equipment:</b></div>
<div>Asterisk 1.6x</div>
<div>Pfsense 1.2.3</div>
<div>Dumb Switch</div>
<div> </div>
<div><b>My questions:</b></div>
<div>A- What is the rational behind this?</div>
<div>B- Do I need a sip proxy server? Something like Siproxd, OpenSIPs, or
Kamailio?</div>
<div>C- Which one of the above is the easiest to get running given I never
tried any of those.</div>
<div>D- If I am doing an SIP proxy server then it might have to also be
redundant. What options do I have in that and which of above or any other
suggested package might be great for future expansions.</div>
<div> </div>
<div>Clarification on how NAT would work in situations like this would be
much appreciated.</div>
<div> </div>
<div>Thanks</div></div></div>
<p></p>
<hr>
--<br>_____________________________________________________________________<br>--
Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us
for a live introductory webinar every
Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users
mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
<p></p></div></div></div></div><br>--<br>_____________________________________________________________________<br>--
Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us
for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users
mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote>
</div><br></div>
<p>
</p><hr>
<p></p>--<br>_____________________________________________________________________<br>--
Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to
Asterisk? Join us for a live introductory webinar every
Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To
UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><p></p></div></div></blockquote></div>
</blockquote></div><br>