[OpenSIPS-Users] Routing Permission errors
Erik Dekkers
erik.dekkers at wvds.nl
Tue Sep 21 12:29:26 CEST 2010
I can tell from my own experience the eBootcamp is a great way to learn opensips.
-----Oorspronkelijk bericht-----
Van: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] Namens Deon Vermeulen
Verzonden: dinsdag 21 september 2010 12:02
Aan: OpenSIPS users mailling list
Onderwerp: Re: [OpenSIPS-Users] Routing Permission errors
Thank you the reply Bogdan.
Really appreciate it.
I have downloaded all the videos and the Virtual Machine.
I've also dissected the config file into multiple sections, just to get a better understanding of what each section and its components does.
I'll keep an eye out for the next eBootcamp and hopefully that time round I'll be able to attend.
Regards
Deon
On 21 Sep 2010, at 10:51 AM, Bogdan-Andrei Iancu wrote:
> Hi Deon,
>
> As a good start for you, I strongly suggest to learn the basics via
> the existing webinars (http://www.opensips.org/Resources/Webinars)
> (especially the one about the opensips default script) - after that
> you can start playing around with the opensips Virtual Machine -
> http://www.voice-system.ro/shortcuts::opensips_livedvd
>
> Both will give you a good understanding of opensips.
>
> Regards,
> Bogdan
>
> Deon Vermeulen wrote:
>> Hi List
>>
>> Attached is my opensips config file.
>> I guess this will make it much easier to spot why I am experiencing
>> problems.
>>
>> I am still learning how opensips work, but it is a bit difficult for
>> me as I have no prior programming knowledge or experience.
>>
>> My goal is as follows:
>> 1. Multi-Domain Support
>> 2. Presence
>> 3. Instant Messaging
>> 3. Permissions per domain and per user (Groups should be local, Long
>> distance (ld), International (Int), calls allowed between users only
>> within a specific domain
>> (domain-name_voip))
>> 4. Users are Names and not numbers. ie. john at domain.com and not
>> 123456 at domain.com.
>> 5. Dynamic routing to Gateways
>> 6. Integrate Asterisk with Opensips for Media (I still have to do
>> this, but I would first like to get the above issues resolved before
>> moving on to this point)
>>
>> Hope the above is clear enough for the goal I am looking to achieve.
>>
>> Any other suggestions how to achieve my goals will be appreciated.
>>
>> Symptoms: I can't make any calls, presence and instant messaging
>> doesn't work at the moment.
>>
>> I use Sermyadmin and created the users with a test domain and put 2
>> users in that domain.
>> I selected all the predefined groups to both users, but no calls,
>> presence or instant Messaging works.
>>
>> For some unknown reason the Group Permissions in my previous mail are
>> not returning errors when starting opensips.
>>
>> I am using the Building Telephony Systems with OpenSIPS 1.6 guide,
>> but I've picked up that what it says should work doesn't.
>>
>> Thanks for the help/guidance.
>>
>> Regards
>> Deon
>>
>>
>>
>> On 18 Sep 2010, at 4:36 PM, Deon Vermeulen wrote:
>>
>>> Good Day
>>>
>>> I am trying to setup Routing Parameters but get errors when checking
>>> opensips config.
>>>
>>> Can some one please point out what I'm doing wrong in my script
>>> below or suggestions doing it differently will really be
>>> appreciated?
>>>
>>> ##################################
>>> #----- Group Routing Params -----#
>>> ##################################
>>> #Normalize the local number e.164 - Windhoek (061) if
>>> (uri=~"^sip:[2-9][0-9]{6}@") { if
>>> (db_is_user_in("credentials","local")) { prefix("061"); route(4);
>>> exit; } else { sl_send_reply("403", "No permissions for local
>>> calls"); exit; } } # ---- National Calls ---- # if
>>> (uri=~"^sip:06[1-9]{6}@") { if (db_is_user_in("credentials","ld")) {
>>> route(4); exit; } else { sl_send_reply("403", "No permissions for
>>> long distance"); exit; } } # ---- International Calls ---- # if
>>> (uri=~"^sip:00[0-9]*@") { if (db_is_user_in("credentials","Int")) {
>>> strip(3); route(4); exit; } else { sl_send_reply("403", "No
>>> permissions for internat. calls"); exit; } }
>>>
>>> #########################
>>> #----- PSTN Routes -----#
>>> #########################
>>> #######################################################
>>> # Send the calls to the PSTN #
>>> # Change the IP Address below to reflect network #
>>> #######################################################
>>>
>>> # ---- "Static" Routing ---- #
>>> ##route[4] {
>>> ## rewritehostport("x.x.x.x");
>>> ## route(1);
>>>
>>> # ---- Dynamic Routing ---- # #### ---- THIS IS WHAT SHOULD BE USED
>>> ---- #####
>>> if(!do_routing()){
>>> send_reply("503", "No rules found matching the URI prefix"); exit; }
>>> # flag 10 - flag the transaction to handle the failure route
>>> setflag(10); route(1); } failure_route[1] { if (t_was_cancelled()) {
>>> exit; } if(isflagset(10)){ if (use_next_gw()) { #xlog ("next gateway
>>> $ru \n"); t_on_failure("1"); t_relay(); exit; } else {
>>> t_reply("503", "Service not available, no more gateways"); exit; } }
>>> }
>>>
>>>
>>> I get this error when checking the config with "opensipsctl -C
>>> /etc/opensips/opensips.cfg
>>>
>>> Sep 18 18:21:11 [19963] CRITICAL:core:yyerror: parse error in config
>>> file, line 409, column 2-4: syntax error Sep 18 18:21:11 [19963]
>>> CRITICAL:core:yyerror: parse error in config file, line 409, column
>>> 2-4:
>>> Sep 18 18:21:11 [19963] ERROR:core:main: bad config file (2 errors)
>>>
>>>
>>> " if (uri=~"^sip:[2-9][0-9]{6}@") { " Starts on line 409
>>>
>>>
>>> I have the uri.so module loaded.
>>> Do I need the regex.so module?
>>>
>>>
>>> I am also looking for help to setup a Group permission "VOIP_XYZ" to
>>> only allow calls between users in a specific Domain "XYZ".
>>>
>>>
>>> Thank you very very much in advance.
>>>
>>>
>>> Regards
>>> Deon
>>
>> ---------------------------------------------------------------------
>> ---
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro
>
>
> _______________________________________________
> 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