<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Olle, <br>
<br>
I had previously tried this, and it seemed to help somewhat,
although I then have to create the following fields too otherwise
Asterisk complains about not being able to update them:<br>
alter table subscriber add column `fullcontact` int(35) DEFAULT
NULL;<br>
alter table subscriber add column `lastms` int(11) DEFAULT NULL;<br>
alter table subscriber add column `useragent` int(11) DEFAULT NULL;<br>
alter table subscriber add column `host` varchar(40) DEFAULT NULL,<br>
alter table subscriber add column `port` varchar(5) DEFAULT `5060`;<br>
alter table subscriber add column `regserver` varchar(40) DEFAULT
NULL;<br>
alter table subscriber add column `ipaddr` varchar(40) DEFAULT NULL;<br>
alter table subscriber add column `defaultip` varchar(40) DEFAULT
NULL;<br>
alter table subscriber add column `regseconds` int(11) DEFAULT NULL;<br>
<br>
But this doesn't help either since now when Asterisk updates the
tables I end up getting the following error when I try to register
the user:<br>
[Apr 14 13:37:33] WARNING[11455]: chan_sip.c:13880
__set_address_from_contact: Invalid contact uri 0 (missing sip: or
sips:), attempting to use anyway<br>
[Apr 14 13:37:33] WARNING[11444]: chan_sip.c:13880
__set_address_from_contact: Invalid contact uri 0 (missing sip: or
sips:), attempting to use anyway<br>
<br>
<br>
All in all, I'm not having much luck with that tutorial at all. I am
guess that the problem could be down to not having exact version
numbers for Asterisk and openSIPS, although the tutorial states
"This tutorial is made for OpenSIPS 1.8.x and Asterisk 1.8.x"<br>
<br>
Another point that I've just realised from the tutorial - And this
is something I hadn't realised previously - is that openSIPS should
be dealing with the registration, and not passing this onto
Asterisk. From the routing section of opensips.cfg:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre class="escaped" style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; padding: 6px; border: 1px solid rgb(235, 235, 235); background-color: rgb(251, 254, 250); color: rgb(102, 102, 102); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">        # requests for my domain
        if (is_method("REGISTER")) {
                # authenticate the REGISTER requests
                if (!www_authorize("", "subscriber")) {
                        www_challenge("", "0");
                        exit;
                }
                if (!check_to()) {
                        send_reply("403","Forbidden auth ID");
                        exit;
                }
                if (!save("location"))
                        sl_reply_error();
                exit;
        }
</pre>
So in this instance, asterisk should only be dealing with the
endpoints, such as voicemail and stuff and sipusers is only shared
with asterisk because it needs to know which users should have
voicemail, in which case, it really shouldn't matter if the users do
not have "host=dynamic" set. Is that correct? If that is so, it
would lead me to believe that there is some issue with the
configuration of openSIPS rather than asterisk. Can anyone advise
how I could debug this? <br>
<br>
Kind regards, <br>
<br>
Steven <br>
<br>
<div class="moz-cite-prefix">On 04/14/2013 08:59 AM, Olle E.
Johansson wrote:<br>
</div>
<blockquote
cite="mid:C0C592E0-F9F1-4E8F-9D8E-A6C541637477@edvina.net"
type="cite">
<pre wrap="">
13 apr 2013 kl. 22:08 skrev sjs205 <a class="moz-txt-link-rfc2396E" href="mailto:sjs205.linux@gmail.com"><sjs205.linux@gmail.com></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Hello N,
Thanks for getting back to me on this. This is one of the issues with this tutorial, one can not set the asterisk sip_peers to dynamic since the tutorial creates a view from the 'subscriber' table and uses the 'domain' field as the 'host', 'default', 'ipaddr', 'fromdomain' and 'regserver' fileds in the asterisk table. And hence, if one changes the one of the user's 'host' field to dynamic in the database, that then changes all of these fields.
So changing each of the sip_peers (or sipusers in this case) in the table to is not possible. Based on this, I would expect that this is an error with the tutorial itself, although I'm just not 100% sure.
</pre>
</blockquote>
<pre wrap="">If you add a column called host to the subscriber table I am pretty sure, but not 100%, that OpenSIPS won't mind. Asterisk will be much more happy.
/O
</pre>
<blockquote type="cite">
<pre wrap="">
Steven
On 04/13/2013 08:43 PM, Nick Khamis wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Make sure that you have host=dynamic on both the general level (i.e.,
sip.conf) and at the
peer level (i.e., extensions, sip_peers in the database etc...)
N.
On 4/13/13, sjs205 <a class="moz-txt-link-rfc2396E" href="mailto:sjs205.linux@gmail.com"><sjs205.linux@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello all,
I'm going round and round in circles trying to integrate openSIPS and
asterisk using the tutorial found at:
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Resources/DocsTutAsterisk18">http://www.opensips.org/Resources/DocsTutAsterisk18</a>
I have managed to get openSIPS installed and starting without errors
using the configuration scripts included in the above tutorial. I have
also installed Asterisk 1.8 from the ubuntu repo and have managed to get
this working to.
The problem comes when I follow the final section of the tutorial - 1.9
How to use it.
I can do everything up to the "Test Voicemail" section where I am trying
to register my user using twinkle on a separate host. - I've added the
following to my /etc/hosts file on the twinkle client machine:
192.168.5.20 test.com test.com
192...20 is the openSIPS server, with "test.com" being the domain
assigned to the new sip user, alice, created. I know that this resolves
perfectly...
Whenever I try to register the user alice, I get the following error
from Asterisk:
[Apr 13 19:45:47] ERROR[1706]: chan_sip.c:14798 register_verify: Peer
'alice' is trying to register, but not configured as host=dynamic
[Apr 13 19:45:47] NOTICE[1706]: chan_sip.c:24905
handle_request_register: Registration from '"alice"
<a class="moz-txt-link-rfc2396E" href="mailto:sip:alice@swannsips.com"><sip:alice@swannsips.com></a>' failed for '192.168.5.10:5060' - Peer is not
supposed to register
From looking at the Asterisk documentation I see that this *seems* to
be correct since we do not declare the new users with "host=dynamic" in
the database.
Is this correct and the fact that the tutorial tells one to "register"
the user an error? Or is there clearly something else I am missing?
Any help on this would be greatly appreciated since I've spent the
better part of the last week trying to resolve this, including trying to
change the database layout itself to support "host=dynamic" - see my
post on the asterisk forum here:
<a class="moz-txt-link-freetext" href="http://forums.asterisk.org/viewtopic.php?f=1&t=86342">http://forums.asterisk.org/viewtopic.php?f=1&t=86342</a> although that
didn't really help much...
Kind regards,
Steven
</pre>
</blockquote>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>