[OpenSIPS-Users] osipsconsole address failed

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Dec 12 13:22:53 CET 2012


Mimi, when doing "make install", the osipsconsile $PATH_CTLRC is 
automatically updated with the installation path (prefix variable). So, 
how did you compile and install opensips (the exact commands) ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 12/12/2012 01:37 PM, Mimi Cafe wrote:
> Thanks for your input. It explains why I  couldn't add the new gateway 
> earlier on. it now worked fine with 24 bit mask.
>
> I'm running version 1.8  (sorry I forgit to mention it), and 
> osipconsole and osipconsolerc are installed in the paths below.
>
> -rwxr-xr-x. 1 opensips opensips 202930 Dec 11 20:33 
> /usr/local/opensips_proxy/sbin/osipsconsole
> -rw-r--r--. 1 opensips opensips 2978 Dec  8 20:21 
> /usr/local/opensips_proxy/etc/opensips/osipsconsolerc
>
> Looking in osipsconsole again, I now realise $PATH_CTLRC = 
> "./scripts/" could be the reason why the config script is not found. 
> Is this the case?
>
>
> Cheers
>
> Mimi
>
>
> On 12/12/2012 10:37, Bogdan-Andrei Iancu wrote:
>> Hi Mimi,
>>
>> starting with 1.7 (if I remember correctly), the address mask is not 
>> anymore as 255.255.255.0, but as length 24 (number of bites). So, the 
>> osipsconsole works the same now.
>>
>> Simply do: osipsconsole address add 0 192.168.1.192 24 5060 UDP
>>
>>
>> Regarrding the DB issue - do you use osipsconsole from the source 
>> tree or installed ? if installed, what is the path of osipsconsole 
>> and what is the path of osipsconsolerc ? BTW, what version of 
>> opensips are you using ?
>>
>> Regards,
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 12/11/2012 11:17 PM, Mimi Cafe wrote:
>>> Hi
>>>
>>> I have updated osipsconsole via svn and it appears the previous 
>>> issue is resolved, but I now see two more issues.
>>>
>>> The mattern below does not match the dot in netmask $cmd[4] !~ 
>>> /^[0-9]+$/. This seem to look for only one octet?
>>>
>>> if ( $cmd[4] !~ /^[0-9]+$/ || $cmd[4] < 0 || $cmd[4] > 32 ) {
>>>                                 print "mask '$cmd[4]' is not valid - 
>>> it must be between 0 and 32 (biti)\n";
>>>                                 return;
>>>                         }
>>>
>>>
>>> The resulting error is:
>>>
>>> Control engine FIFO loaded
>>> Used database is mysql
>>> Warn fallback to local workdir ./mysql
>>> mask '255.255.255.255' is not valid - it must be between 0 and 32 (biti)
>>> [sbin]$ sudo ./osipsconsole address add 0 192.168.1.192 
>>> 255.255.255.0 5060 UDP
>>> which: no md5 in (/sbin:/bin:/usr/sbin:/usr/bin)
>>> Control engine FIFO loaded
>>> Used database is mysql
>>> Warn fallback to local workdir ./mysql
>>> mask '255.255.255.0' is not valid - it must be between 0 and 32 (biti)
>>>
>>>
>>> The other (trivial) issue is that osipsconsole does not use the 
>>> database parameters specified in my osicpsconsolerc. Instead, it 
>>> attempts to use detail values here.
>>>
>>> [sbin]$ sudo ./osipsconsole address add 0 192.168.1.192 
>>> 255.255.255.255 5060 UDP
>>> which: no md5 in (/sbin:/bin:/usr/sbin:/usr/bin)
>>> which: no db4.4_dump in (/sbin:/bin:/usr/sbin:/usr/bin)
>>> Control engine FIFO loaded
>>> Used database is mysql
>>> Warn fallback to local workdir ./mysql
>>> Failed to connect the configured Database 
>>> (database=opensips;host=localhost;user=opensips)[babs at mognoreborder 
>>> sbin]$ sudo vim osipsconsole
>>>
>>> Mimi
>>>
>>>
>>> On 10/12/2012 14:38, Bogdan-Andrei Iancu wrote:
>>>> Hi Mimi,
>>>>
>>>> I made some fixes in osipsconsole on SVN (trunk and 1.8 branch) - 
>>>> please update and let me know if now works for you.
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Founder and Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>>
>>>> On 12/08/2012 11:00 PM, Mimi Cafe wrote:
>>>>> I attempted using osipsconsole to add a gateway address, but it 
>>>>> failed because there is no data in the dbaliases table. How is 
>>>>> this linked to the dbaliases tables? What is the prerequisite to 
>>>>> adding a gateway address in addresses table?
>>>>>
>>>>> osipsconsole address add 0 192.168.18.89 255.255.255.255 5060 UDP
>>>>>
>>>>> Control engine FIFO loaded
>>>>> Used database is mysql
>>>>> Retrieving data from table failedYou have an error in your SQL 
>>>>> syntax; check the manual that corresponds to your MySQL server 
>>>>> version for the right syntax to use near 'WHERE 
>>>>> ip='192.168.18.89'' at line 1
>>>>> Introducing the address rule 0 192.168.18.89 255.255.255.255 5060 
>>>>> UDP to the database failed
>>>>> You have an error in your SQL syntax; check the manual that 
>>>>> corresponds to your MySQL server version for the right syntax to 
>>>>> use near '( grp, ip, mask, port, proto , context_info ) VALUES ( 
>>>>> 0, '192.168.18.89', '255.' at line 1
>>>>>
>>>>>
>>>>> Mimi
>>>>>
>>>>> _______________________________________________
>>>>> 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/20121212/8c17722e/attachment.htm>


More information about the Users mailing list