<div dir="ltr"><div>Hello,</div><div><br></div><div>I&#39;m investigating the suitability of OpenSIPS for use in a new system we are designing. Not only for use in a production environment, but also how it can be used to facilitate automated integration tests.</div>
<div><br></div><div>I have a automated testing scenario where I need to have two SIP UAs that need to have a SIP session. What I would like to do is bring up a SIP server (in userspace) before the integration test starts, and bring it down after the integration test ends (fails/succeeds). The automated test will run on OS X.</div>
<div><br></div><div>I downloaded OpenSIPS and built it on my iMac without any major problems. I am able to run it in userspace simply by calling it from the command line like `/sbin/opensips -D -f /path/to/opensips.cfg`.</div>
<div><br></div><div>In section D of the INSTALL file, &quot;opensips with Persistent Data Storage&quot;, it says:</div><div><br></div><div>&quot;The default configuration is very simple and features many simplifications. </div>
<div>In particular, it does not authenticate users and loses User Location database </div><div>on reboot. To provide persistence, keep user credentials and remember users&#39; </div><div>locations across reboots, opensips can be configured to use MySQL. Before you</div>
<div>proceed, you need to make sure MySQL is installed on your box.&quot;</div><div><br></div><div>This sounds ideal to me; I don&#39;t need any real kind of account management or authentication. I would like OpenSIPS to start, accept whatever REGISTER/INVITE from my two UAs, and then stop after I&#39;m done. I would prefer not to require any database and keep it all in-memory, so there&#39;s nothing to clean up before or after the test (and no other dependencies to clean up before and after, e.g. MySQL databases).</div>
<div><br></div><div>However, I can&#39;t seem to connect a SIP UA client to OpenSIPS when it&#39;s started up like this. I am trying to connect with Jitsi, a Mac client, as well as the ipjsua test app that ships with the pjsip C library. (I am able to connect both of those to the <a href="http://sip2sip.info">sip2sip.info</a> service, so I know they are both functional.)</div>
<div><br></div><div>With Jitsi, I set up a SIP account with Advanced settings (username: test1, password: test1, display name: test1, registrar: 127.0.0.1, port: 5060, manual proxy configuration, proxy: 127.0.0.1, port: 5060). </div>
<div><br></div><div>Log output from opensips in Console.app looks like this:</div><div><br></div><div>13-02-06 1:48:21.934 PM opensips: WARNING:core:warn: warning in config file /path/to/opensips-with-local-changes.cfg, line 50, column 13-16: tls support not compiled in</div>
<div>13-02-06 1:48:22.010 PM opensips: WARNING:core:main: no fork mode </div><div>13-02-06 1:48:22.011 PM opensips: NOTICE:core:main: version: opensips 1.8.2-notls (x86_64/darwin)</div><div>13-02-06 1:48:22.013 PM opensips: NOTICE:signaling:mod_init: initializing module ...</div>
<div>13-02-06 1:50:58.328 PM opensips: ERROR:registrar:update_contacts: invalid cseq for aor &lt;test1&gt;</div><div>13-02-06 1:51:02.335 PM opensips: ERROR:registrar:update_contacts: invalid cseq for aor &lt;test1&gt;</div>
<div>13-02-06 1:51:06.342 PM opensips: ERROR:registrar:update_contacts: invalid cseq for aor &lt;test1&gt;</div><div>...</div><div><br></div><div>With ipjsua/pjsip, I use the following configuration switches: </div><div><br>
</div><div>--id <a href="mailto:sip%3Atest1@127.0.0.1">sip:test1@127.0.0.1</a></div><div>--registrar sip:127.0.0.1</div><div>--realm *</div><div>--username test1</div><div>--password test1</div><div>--nameserver 127.0.0.1</div>
<div>--outbound sip:127.0.0.1</div><div><br></div><div>Log output in Console.app looks the same as with Jitsi except for the &quot;invalid cseq&quot; lines:</div><div><br></div><div>13-02-06 1:56:39.004 PM opensips: ERROR:registrar:update_contacts: invalid cseq for aor &lt;&gt;</div>
<div><br></div><div><br></div><div>What do I need to do to run OpenSIPS in userspace, have it accept connections from my two SIP UAs, allow them to call each other, and do it all without requiring a database running?</div>
<div><br></div><div>Do I absolutely require a database? If so, can someone explain how to configure the db_text module to work for my testing scenario?</div><div><br></div><div>Thanks!</div><div><br></div></div>