[OpenSIPS-Users] Automated Testing Scenario with OpenSIPS
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Feb 7 14:13:08 CET 2013
Hi,
Without a trace I cannot tell for sure, but I suspect your clients send
several REGISTER requests without increasing the CSEQ no (which is
mandatory) - this is the meaning of the error you get.
So, to be sure, make a network capture with the sip traffic (ngrep) and
see what are the replies from opensips.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 02/07/2013 12:01 AM, Pink Cupcake wrote:
> Hello,
>
> I'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.
>
> 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.
>
> 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`.
>
> In section D of the INSTALL file, "opensips with Persistent Data
> Storage", it says:
>
> "The default configuration is very simple and features many
> simplifications.
> In particular, it does not authenticate users and loses User Location
> database
> on reboot. To provide persistence, keep user credentials and remember
> users'
> locations across reboots, opensips can be configured to use MySQL.
> Before you
> proceed, you need to make sure MySQL is installed on your box."
>
> This sounds ideal to me; I don'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'm
> done. I would prefer not to require any database and keep it all
> in-memory, so there's nothing to clean up before or after the test
> (and no other dependencies to clean up before and after, e.g. MySQL
> databases).
>
> However, I can't seem to connect a SIP UA client to OpenSIPS when it'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 sip2sip.info
> <http://sip2sip.info> service, so I know they are both functional.)
>
> 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).
>
> Log output from opensips in Console.app looks like this:
>
> 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
> 13-02-06 1:48:22.010 PM opensips: WARNING:core:main: no fork mode
> 13-02-06 1:48:22.011 PM opensips: NOTICE:core:main: version: opensips
> 1.8.2-notls (x86_64/darwin)
> 13-02-06 1:48:22.013 PM opensips: NOTICE:signaling:mod_init:
> initializing module ...
> 13-02-06 1:50:58.328 PM opensips: ERROR:registrar:update_contacts:
> invalid cseq for aor <test1>
> 13-02-06 1:51:02.335 PM opensips: ERROR:registrar:update_contacts:
> invalid cseq for aor <test1>
> 13-02-06 1:51:06.342 PM opensips: ERROR:registrar:update_contacts:
> invalid cseq for aor <test1>
> ...
>
> With ipjsua/pjsip, I use the following configuration switches:
>
> --id sip:test1 at 127.0.0.1 <mailto:sip%3Atest1 at 127.0.0.1>
> --registrar sip:127.0.0.1
> --realm *
> --username test1
> --password test1
> --nameserver 127.0.0.1
> --outbound sip:127.0.0.1
>
> Log output in Console.app looks the same as with Jitsi except for the
> "invalid cseq" lines:
>
> 13-02-06 1:56:39.004 PM opensips: ERROR:registrar:update_contacts:
> invalid cseq for aor <>
>
>
> 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?
>
> Do I absolutely require a database? If so, can someone explain how to
> configure the db_text module to work for my testing scenario?
>
> Thanks!
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130207/b9d84436/attachment.htm>
More information about the Users
mailing list