[OpenSIPS-Users] Asterisk+OpenSIPS Integration using Dynamic Friends

Nick Khamis symack at gmail.com
Mon Jan 7 16:15:27 CET 2013


Makes sense. I will give it a try, and share my approach for others to see.


>> The error you are receiving is because you are duplication the domain in the R-URI during some operation.

Exactly what happened.

Cheers,

Nick.

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



More information about the Users mailing list