<div dir="ltr">You're in the ballpark, Nick. I'm working on a design for a new system that includes a SIP component, and while I'd prefer if the end-to-end solution stuck with UDP, there are some technical reasons why TCP may be required, and it's not something I'd be able to work around.<div>
<br></div><div>So far OpenSIPS has been relatively easy to work with and so I'm continuing my experiments with it, while a colleague is investigating Kamailio. I may stick with OpenSIPS irrespective of what my colleague goes ahead with, simply because I want a SIP server solution that will be the easiest to use in an automated testing environment -- my goal being to test a SIP user agent and not to care much about the server side.</div>
<div><br></div><div>-PKCK<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 19, 2013 at 3:34 PM, Nick Khamis <span dir="ltr"><<a href="mailto:symack@gmail.com" target="_blank">symack@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello PKCK,<br>
<br>
I am not sure but I can only think of a few reasons why you would like<br>
to run SIP on the TCP protocol, and none that are even good reasons as<br>
that. Are you sure you need to run OpenSIPS on TCP? UDP should suffice<br>
99% pf the time. I take it you're just experimenting.<br>
<br>
N.<br>
<div><div class="h5"><br>
On 3/19/13, Pink Cupcake <<a href="mailto:pinkcupcake1979@gmail.com">pinkcupcake1979@gmail.com</a>> wrote:<br>
> It looks like I answered my question almost immediately after sending my<br>
> last message (of course!) -- I was invoking opensips thusly:<br>
><br>
> ./sbin/opensips -D -f<br>
> /path/to/opensips/1.8.2/opensips-with-local-changes.cfg<br>
><br>
> I just read that OpenSIPS will not be able to listen on more than one<br>
> interface unless it forks, and since it always must listen on UDP, it will<br>
> skip listening on TCP if it must.<br>
><br>
> It looks like the -D parameter prevents OpenSIPS from forking, which means<br>
> no TCP port connection; if I run that command without the -D, TCP<br>
> connections seem to work.<br>
><br>
> Of course I liked using -D because it made it easy to start/stop OpenSIPS<br>
> (just with a ^C). I'm assuming that "daemon mode" means it's going to leave<br>
> a pid file around somewhere to make it easier to skill using a shell (or<br>
> shell script), so I'm off to find out if that's the case.<br>
><br>
> -PKCK<br>
><br>
><br>
> On Tue, Mar 19, 2013 at 2:45 PM, Pink Cupcake<br>
> <<a href="mailto:pinkcupcake1979@gmail.com">pinkcupcake1979@gmail.com</a>>wrote:<br>
><br>
>> Thanks, Nick. I'm having a read through it now.<br>
>><br>
>> I fixed my initial problem, though, and it was a pretty silly mistake: I<br>
>> had OpenSIPS and my SIP client (Jitsi) both using the same port. Oops! I<br>
>> switched Jitsi over to ports 55060/55061 and then things started working.<br>
>><br>
>> Working, at least with UDP. I need to get TCP working now.<br>
>><br>
>> The default configuration file has TCP disabled. Searching for<br>
>> information<br>
>> on how to set up TCP is quite difficult. The PDF you linked to has a few<br>
>> tips, luckily. But not enough to get it working.<br>
>><br>
>> Here's a portion of my config file:<br>
>><br>
>> #listen=udp:<a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a> # CUSTOMIZE ME<br>
>> listen=udp:<a href="http://172.16.23.79:5060" target="_blank">172.16.23.79:5060</a> # CUSTOMIZE ME<br>
>> listen=tcp:<a href="http://172.16.23.79:5060" target="_blank">172.16.23.79:5060</a> # CUSTOMIZE ME<br>
>> #disable_tcp=yes<br>
>> disable_tcp=no<br>
>> tcp_children=4<br>
>><br>
>> When I try to connect with Jitsi, or with telnet, and sniff the traffic<br>
>> with Wireshark, I can see a SYN sent from Jitsi->OpenSIPS and a RST/ACK<br>
>> returned, but that's it. I don't think the TCP connection is getting<br>
>> properly established, and Jitsi bails out saying it can't create a<br>
>> connection.<br>
>><br>
>> Jitsi does successfully connect to OpenSIPS if I set the proxy transport<br>
>> setting to UDP in Jitsi.<br>
>><br>
>> What do I need to do to take OpenSIPS, from out of the box, and get it to<br>
>> accept REGISTERs/INVITEs on TCP and not UDP?<br>
>><br>
>> -PKCK<br>
>><br>
>><br>
>><br>
>> On Fri, Feb 8, 2013 at 4:49 PM, Nick Khamis <<a href="mailto:symack@gmail.com">symack@gmail.com</a>> wrote:<br>
>><br>
>>> Pink,<br>
>>><br>
>>> A great resource that can get you up and going in at most a week can<br>
>>> be found here:<br>
>>><br>
>>><br>
>>><br>
>>> <a href="http://www.google.com/url?q=http://www.h6315.com/ast_book/Building%2520Telephony%2520Systems%2520with%2520OpenSIPS%25201.6.pdf&sa=U&ei=AJ0VUdahEvG10AGl4IDIDA&ved=0CB8QFjAA&sig2=q5gYZ0W2OeVVhS-YaZ0xjg&usg=AFQjCNFrbF0lgZG6kcTaZwI5uu-azQSx-w" target="_blank">http://www.google.com/url?q=http://www.h6315.com/ast_book/Building%2520Telephony%2520Systems%2520with%2520OpenSIPS%25201.6.pdf&sa=U&ei=AJ0VUdahEvG10AGl4IDIDA&ved=0CB8QFjAA&sig2=q5gYZ0W2OeVVhS-YaZ0xjg&usg=AFQjCNFrbF0lgZG6kcTaZwI5uu-azQSx-w</a><br>
>>><br>
>>> Happy Routing!<br>
>>><br>
>>> Nick.<br>
>>><br>
>>> On 2/8/13, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br>
>>> > Hi,<br>
>>> ><br>
>>> > On 02/08/2013 12:17 AM, Pink Cupcake wrote:<br>
>>> >> Hi Bogdan-Andrei,<br>
>>> >><br>
>>> >> Your response really doesn't help me or deal with the questions I<br>
>>> >> laid<br>
>>> >> out in my original post. Perhaps I was not being clear. Let me start<br>
>>> >> over.<br>
>>> >><br>
>>> > Well, my answer was related to the error logs you posted :).<br>
>>> ><br>
>>> >><br>
>>> >><br>
>>> >> I need to implement an automated testing scenario on an OS X build<br>
>>> >> machine.<br>
>>> >><br>
>>> >> The test requires two different SIP UAs -- which are both running<br>
>>> >> locally on the same machine -- to successfully engage in a SIP<br>
>>> >> call. In order for two UAs to talk to one another, they need to be<br>
>>> >> registered with a SIP server.<br>
>>> >><br>
>>> >> I am trying to determine if OpenSIPS can be used as the server<br>
>>> >> component in my testing scenario.<br>
>>> >><br>
>>> >> Since this is an integration test and doesn't require any state being<br>
>>> >> retained, the test steps look like this: (1) bring up an OpenSIPS<br>
>>> >> server in userspace, (2) have the two SIP UA clients register with<br>
>>> >> that server, as simply as possible, (3) have the two SIP UA clients<br>
>>> >> engage in and then end a SIP call, (4) stop the SIP UA clients, (5)<br>
>>> >> shut down the server.<br>
>>> >><br>
>>> >> If anything is unclear from the above, please reply back.<br>
>>> > Clear and no issues here,<br>
>>> ><br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> Please can someone answer the following:<br>
>>> >><br>
>>> >> If I can run OpenSIPS in userspace, I would also not like to have it<br>
>>> >> "installed" on the build machine. I used the "prefix" parameter to<br>
>>> >> `make install` into a separate directory and I am attempting to run<br>
>>> >> OpenSIPS from that directory.<br>
>>> >> It looks like I can run OpenSIPS in userspace. Is that correct?<br>
>>> > true<br>
>>> >><br>
>>> >> From the documentation is looks like OpenSIPS does not use a database<br>
>>> >> by default, and keeps everything in memory. Is that correct?<br>
>>> > true<br>
>>> >><br>
>>> >> Can any SIP UA client "REGISTER" with OpenSIPS when it is launched in<br>
>>> >> the "default" mode? If so, is there any special way the clients<br>
>>> >> should<br>
>>> >> send the request?<br>
>>> > if using the opensips default script, no authentication will be<br>
>>> > required<br>
>>> > - but you need to use in the REGISTER RURI the IP of the server (so<br>
>>> > that<br>
>>> > opensips will consider them be handled locally).<br>
>>> >><br>
>>> >> If it is necessary for OpenSIPS to be run with a database in order to<br>
>>> >> allow clients to register? If so, will the db_text module suffice? If<br>
>>> >> so, how do I perform this configuration (given my testing scenario)?<br>
>>> > no, no need for DB - by default, in cfg, the usrloc module comes with<br>
>>> > no<br>
>>> > DB support.<br>
>>> ><br>
>>> > Regards,<br>
>>> > Bogdan<br>
>>> >><br>
>>> >><br>
>>> >> PKCK<br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> On Thu, Feb 7, 2013 at 5:13 AM, Bogdan-Andrei Iancu<br>
>>> >> <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a> <mailto:<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>>> wrote:<br>
>>> >><br>
>>> >> Hi,<br>
>>> >><br>
>>> >> Without a trace I cannot tell for sure, but I suspect your<br>
>>> >> clients<br>
>>> >> send several REGISTER requests without increasing the CSEQ no<br>
>>> >> (which is mandatory) - this is the meaning of the error you get.<br>
>>> >><br>
>>> >> So, to be sure, make a network capture with the sip traffic<br>
>>> >> (ngrep) and see what are the replies from opensips.<br>
>>> >><br>
>>> >> Regards,<br>
>>> >><br>
>>> >> Bogdan-Andrei Iancu<br>
>>> >> OpenSIPS Founder and Developer<br>
>>> >> <a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a><br>
>>> >><br>
>>> >><br>
>>> >> On 02/07/2013 12:01 AM, Pink Cupcake wrote:<br>
>>> >>> Hello,<br>
>>> >>><br>
>>> >>> I'm investigating the suitability of OpenSIPS for use in a new<br>
>>> >>> system we are designing. Not only for use in a production<br>
>>> >>> environment, but also how it can be used to facilitate automated<br>
>>> >>> integration tests.<br>
>>> >>><br>
>>> >>> I have a automated testing scenario where I need to have two SIP<br>
>>> >>> UAs that need to have a SIP session. What I would like to do is<br>
>>> >>> bring up a SIP server (in userspace) before the integration test<br>
>>> >>> starts, and bring it down after the integration test ends<br>
>>> >>> (fails/succeeds). The automated test will run on OS X.<br>
>>> >>><br>
>>> >>> I downloaded OpenSIPS and built it on my iMac without any major<br>
>>> >>> problems. I am able to run it in userspace simply by calling it<br>
>>> >>> from the command line like `/sbin/opensips -D -f<br>
>>> >>> /path/to/opensips.cfg`.<br>
>>> >>><br>
>>> >>> In section D of the INSTALL file, "opensips with Persistent Data<br>
>>> >>> Storage", it says:<br>
>>> >>><br>
>>> >>> "The default configuration is very simple and features many<br>
>>> >>> simplifications.<br>
>>> >>> In particular, it does not authenticate users and loses User<br>
>>> >>> Location database<br>
>>> >>> on reboot. To provide persistence, keep user credentials and<br>
>>> >>> remember users'<br>
>>> >>> locations across reboots, opensips can be configured to use<br>
>>> >>> MySQL. Before you<br>
>>> >>> proceed, you need to make sure MySQL is installed on your box."<br>
>>> >>><br>
>>> >>> This sounds ideal to me; I don't need any real kind of account<br>
>>> >>> management or authentication. I would like OpenSIPS to start,<br>
>>> >>> accept whatever REGISTER/INVITE from my two UAs, and then stop<br>
>>> >>> after I'm done. I would prefer not to require any database and<br>
>>> >>> keep it all in-memory, so there's nothing to clean up before or<br>
>>> >>> after the test (and no other dependencies to clean up before and<br>
>>> >>> after, e.g. MySQL databases).<br>
>>> >>><br>
>>> >>> However, I can't seem to connect a SIP UA client to OpenSIPS<br>
>>> >>> when<br>
>>> >>> it's started up like this. I am trying to connect with Jitsi, a<br>
>>> >>> Mac client, as well as the ipjsua test app that ships with the<br>
>>> >>> pjsip C library. (I am able to connect both of those to the<br>
>>> >>> <a href="http://sip2sip.info" target="_blank">sip2sip.info</a> <<a href="http://sip2sip.info" target="_blank">http://sip2sip.info</a>> service, so I know they are<br>
>>> >>> both functional.)<br>
>>> >>><br>
>>> >>> With Jitsi, I set up a SIP account with Advanced settings<br>
>>> >>> (username: test1, password: test1, display name: test1,<br>
>>> >>> registrar: 127.0.0.1, port: 5060, manual proxy configuration,<br>
>>> >>> proxy: 127.0.0.1, port: 5060).<br>
>>> >>><br>
>>> >>> Log output from opensips in Console.app looks like this:<br>
>>> >>><br>
>>> >>> 13-02-06 1:48:21.934 PM opensips: WARNING:core:warn: warning in<br>
>>> >>> config file /path/to/opensips-with-local-changes.cfg, line 50,<br>
>>> >>> column 13-16: tls support not compiled in<br>
>>> >>> 13-02-06 1:48:22.010 PM opensips: WARNING:core:main: no fork<br>
>>> >>> mode<br>
>>> >>> 13-02-06 1:48:22.011 PM opensips: NOTICE:core:main: version:<br>
>>> >>> opensips 1.8.2-notls (x86_64/darwin)<br>
>>> >>> 13-02-06 1:48:22.013 PM opensips: NOTICE:signaling:mod_init:<br>
>>> >>> initializing module ...<br>
>>> >>> 13-02-06 1:50:58.328 PM opensips:<br>
>>> >>> ERROR:registrar:update_contacts: invalid cseq for aor <test1><br>
>>> >>> 13-02-06 1:51:02.335 PM opensips:<br>
>>> >>> ERROR:registrar:update_contacts: invalid cseq for aor <test1><br>
>>> >>> 13-02-06 1:51:06.342 PM opensips:<br>
>>> >>> ERROR:registrar:update_contacts: invalid cseq for aor <test1><br>
>>> >>> ...<br>
>>> >>><br>
>>> >>> With ipjsua/pjsip, I use the following configuration switches:<br>
>>> >>><br>
>>> >>> --id <a href="mailto:sip%3Atest1@127.0.0.1">sip:test1@127.0.0.1</a> <mailto:<a href="mailto:sip%253Atest1@127.0.0.1">sip%3Atest1@127.0.0.1</a>><br>
>>> >>> --registrar sip:127.0.0.1<br>
>>> >>> --realm *<br>
>>> >>> --username test1<br>
>>> >>> --password test1<br>
>>> >>> --nameserver 127.0.0.1<br>
>>> >>> --outbound sip:127.0.0.1<br>
>>> >>><br>
>>> >>> Log output in Console.app looks the same as with Jitsi except<br>
>>> >>> for<br>
>>> >>> the "invalid cseq" lines:<br>
>>> >>><br>
>>> >>> 13-02-06 1:56:39.004 PM opensips:<br>
>>> >>> ERROR:registrar:update_contacts: invalid cseq for aor <><br>
>>> >>><br>
>>> >>><br>
>>> >>> What do I need to do to run OpenSIPS in userspace, have it<br>
>>> >>> accept<br>
>>> >>> connections from my two SIP UAs, allow them to call each other,<br>
>>> >>> and do it all without requiring a database running?<br>
>>> >>><br>
>>> >>> Do I absolutely require a database? If so, can someone explain<br>
>>> >>> how to configure the db_text module to work for my testing<br>
>>> scenario?<br>
>>> >>><br>
>>> >>> Thanks!<br>
>>> >>><br>
>>> >>><br>
>>> >>> _______________________________________________<br>
>>> >>> Users mailing list<br>
>>> >>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
>>> >>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>>> >><br>
>>> >><br>
>>> ><br>
>>><br>
>><br>
>><br>
><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
</div></div><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br></div></div></div>