Hi Nick, <div><br></div><div>For DID routing, you should have a normal peer pointing to OpenSIPS on Asterisk. In the OpenSIPS side, use an alias table and alias_db_lookup to translate DIDs to the final destination. If the user is registered use alias_db_llokup and lookup(location), if you already know the final address(static users) translate directly. </div>
<div><br></div><div>The error you are receiving is because you are duplication the domain in the R-URI during some operation. Use ngrep to check exactly what is arriving on OpenSIPS. </div><div><br></div><div class="gmail_extra">
<br clear="all"><div><div>Flavio E. Goncalves</div><div><a href="http://www.sippulse.com">www.sippulse.com</a></div><div> </div></div>
<br><br><div class="gmail_quote">2013/1/5 Nick Khamis <span dir="ltr"><<a href="mailto:symack@gmail.com" target="_blank">symack@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Falvio, thank you so much for your response. I actually used your book<br>
for the biggest parts of the configuration I am running right now.<br>
The only thing I cannot seem to get going with OpenSIPS in the front<br>
is the DID routing. I am either gettng the following:<br>
<br>
Dec 14 16:36:26 [1855] ERROR:core:parse_uri: bad char '@' in state 5<br>
parsed: <<a href="mailto:sip%3A1001@asterisk.example.com">sip:1001@asterisk.example.com</a>> (29) /<br>
<sip:1001@opensips.example.com@<a href="http://opensips.example.com" target="_blank">opensips.example.com</a>> (48)<br>
<br>
If I change default user in sip_buddies from<br>
'"<a href="mailto:1001@opensips.example.com">1001@opensips.example.com</a>' to just '1001', I run into an evil loop<br>
between opensips and asterisk when it comes to<br>
rounting DIDs. Outbound trunking always worked perfectly.<br>
<br>
<br>
Thanks in Advnace,<br>
<br>
Nick.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Sat, Jan 5, 2013 at 11:49 AM, Flavio Goncalves<br>
<<a href="mailto:flavio@asteriskguide.com">flavio@asteriskguide.com</a>> wrote:<br>
> Hi Nick,<br>
><br>
> This setup seems to be wrong. If you are not going to register on Asterisk,<br>
> it does not make sense to use host=dynamic. Use host=opensips_ip or<br>
> opensips_domain.<br>
><br>
> Please check the tutorial <a href="http://www.opensips.org/Resources/DocsTutAsterisk" target="_blank">http://www.opensips.org/Resources/DocsTutAsterisk</a>.<br>
> Create the view exactly in the way presented.<br>
><br>
> I'm not sure exactly what you want to to, but during registration, Asterisk<br>
> write to some columns in the database dynamically. That's why you see the<br>
> fullcontact column.<br>
><br>
> These are the columns written during registration:<br>
><br>
> `regseconds` int(11) DEFAULT NULL,<br>
> `fullcontact` varchar(35) DEFAULT NULL,<br>
> `regserver` varchar(20) DEFAULT NULL,<br>
> `useragent` varchar(20) DEFAULT NULL,<br>
> `lastms` int(11) DEFAULT NULL,<br>
><br>
><br>
> Please, check:<br>
><br>
> <a href="https://wiki.asterisk.org/wiki/display/AST/SIP+Realtime%2C+MySQL+table+structure" target="_blank">https://wiki.asterisk.org/wiki/display/AST/SIP+Realtime%2C+MySQL+table+structure</a><br>
><br>
> There is a setting on Asterisk in the file res_config_mysql.conf<br>
><br>
> requirements=warn ; or createclose or createchar<br>
><br>
> Use requirements=createclose and Asterisk will create the columns<br>
> automagically for you.<br>
><br>
> Flavio E. Goncalves<br>
> <a href="http://www.sippulse.com" target="_blank">www.sippulse.com</a><br>
><br>
><br>
><br>
><br>
> Flavio E. Goncalves<br>
> CEO - V.Office<br>
><br>
><br>
><br>
> 2013/1/5 Nick Khamis <<a href="mailto:symack@gmail.com">symack@gmail.com</a>><br>
>><br>
>> Hello Everyone,<br>
>><br>
>> Using asterisk friends that are static (i.e., using host=ip address<br>
>> vs. host=dynamic) everything works fine. However, when setting the UA<br>
>> as dynamic in Asterisk, the lack of proper registration leads to:<br>
>><br>
>> Name/username Host Dyn<br>
>> Forcerport ACL Port Status Realtime<br>
>> 1001/<a href="mailto:1001@toronto.example.com">1001@toronto.example.com</a> (Unspecified) D N 0<br>
>> UNREACHABLE Cached RT<br>
>><br>
>> All my REGISTER and AUTH is handled on the OpenSIPS side, and this is<br>
>> working fine. Is there any way to bind "contact" from the "location<br>
>> table", to "fullcontact" in sip_buddies table?<br>
>> In my rigorous changing escapades, I did see occasions where<br>
>> "fullcontact" was filled in by Asterisk correctly, I just can't for<br>
>> the life of me get it to do it again!!!!<br>
>><br>
>> I just wanted to mention that OpenSIPS is setup as a peer in Asterisk<br>
>><br>
>> OpenSIPS/<a href="http://toronto.example.com" target="_blank">toronto.example.com</a> 192.168.2.5 5060 UNKNOWN<br>
>> Cached RT<br>
>><br>
>> I did see how in the past the REGISTER request was passed over to *<br>
>> however, I do not think that example applies to me?<br>
>><br>
>> Thanks in Advance,<br>
>><br>
>> Nick.<br>
>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <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>
> Users mailing list<br>
> <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>
Users mailing list<br>
<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>
</div></div></blockquote></div><br></div>