[OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS User

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 19 06:36:07 CEST 2009


Hi Larry,

Kemp, Larry wrote:
> Hi Bogdan, Thanks for your help very very much.
>
> I edited /etc/openser/openser.cfg adding alias="usmetrotel.com" and restarted OpenSER. It crashes the openser daemon.
>   
what you mean by "crash" ? does not start? do you get an error and it 
stops?

Regards,
Bogdan
> I cannot place calls, but I can see the SIP messages from the softphones when I do the ngrep on the OpenSER. I statically entered the extensions 1000 and 1001 in the OpenSER via the:
> /sbin/openserctl add 1000 password 1000 at usmetrotel.com
> /sbin/openserctl add 1001 password 1001 at usmetrotel.com
> Commands, as the book states to do.
>
> So when I perform an "openserctl ul show" I expected to see my two statically entered users (1000 and 1001) show up. But here is what comes back:
> database engine "MYSQL" loaded
> Control engine "FIFO" loaded
> entering fifo_cmd ul_dump
> 200 OK
> Domain:: aliases table=512 records=0 max_slot=0
> Domain:: location table=512 records=0 max_slot=0
> FIFO command was:
> :ul_dump:openser_receiver_31972
>
> If I try to run:
> /sbin/openserctl add 1000 password 1000 at usmetrotel.com or
> /sbin/openserctl add 1001 password 1001 at usmetrotel.com
> again, the system tells me:
> database engine "MYSQL" loaded
> Control engine 'FIFO' loaded
> is_user: user counter=1
> ERROR: user 1000 already exists.
>
> Yet if I try to remove it using:
> /sbin/openserctl rm 1000
>
> the command hangs with this output:
> database engine "MYSQL" loaded
> Control engine "FIFO" loaded
> is_user: user counter=1
>
>
> Also, when I run the command "openserctl domain showdb" it displays:
> +----+----------------+---------------------+
> | id | domain         | last_modified       |
> +----+----------------+---------------------+
> | 1  | usmetrotel.com | 0000-00-00 00:00:00 |
> +----+----------------+---------------------+
>
> So I am not sure if the server knows that it hosts the domain usmetrotel.com and the extensions 1000 and 1001 for that domain or not.
>
> Not sure how to tell the openser.cfg that usmetrotel.com is a local domain and make my soft phones communicate with the OpenSER. According to everything I have read in the book, it states it should be working. Perhaps the next section on page 101 "Enhancing The Script" and page 102 "Managing Multiple Domains" will make thing s more clear. I guess I was expecting the calls to work as the book states they should be working and able to call each other several times by this point.
>
> Again I appreciate the help, very much.
>
> Thanks
>
> LK
>
> -----Original Message-----
> From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Thursday, October 15, 2009 1:40 PM
> To: users at lists.opensips.org
> Subject: Re: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS User
>
> No, it is not in RC file, but in opensips.cfg - there you need to
> configure that domains should be considered as local.
>
> Regards,
> Bogdan
>
> Kemp, Larry wrote:
>   
>> Bogdan,
>>
>> Assuming you are talking about the file /etc/openser/openserctlrc; at the top of that script it shows:
>> ## your SIP domain
>> SIP_DOMAIN=usmetrotel.com
>>
>> Would I still need to place:  alias="usmetrotel.com" or ALIAS=USMEROTEL.COM in there and restart the daemon? All the variables look to be all CAPS. Not certain if the /sbin/openserctlrc cares or not.
>>
>> Right underneath the SIP_DOMAIN=usmetrotel.com line in /etc/openser/openser.cfg I added ALIAS="usmetrotel.com" and restarted the service. It restarted okay so this did not apparently break the OpenSER service. I'll try registering the X-Lite phones and let you know what happens.
>>
>>
>>
>> -----Original Message-----
>> From: Kemp, Larry
>> Sent: Thursday, October 15, 2009 10:57 AM
>> To: 'Bogdan-Andrei Iancu'
>> Subject: RE: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS User
>>
>> Bogdan,
>>
>> Thanks always for your very much appreciated help!
>>
>> Is that in the /etc/openser/openser.cfg in /etc/openser/openserctl or some other file?
>>
>> In /etc/openser/openser.cfg a search for the word "alias" shows results at Line 151 at Col 25 as:
>> lookup("aliases");
>>
>> And then again at line 153 Column 53 as:
>> append_hf ("P-hint: outbound alias\r\n");
>>
>> In /etc/openser/openserctlrc the word alias appears several times commented out at Line 31 and then two lines down as a variable:
>> ALIASES+TYPE="DB"
>>
>> It seems more like it would go in this file but I have no idea, I am not a Kung Fu Master with C or OpenSER either. I am having a tough go of it.
>>
>>
>>
>> -----Original Message-----
>> From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
>> Sent: Wednesday, October 14, 2009 11:53 PM
>> To: OpenSIPS users mailling list
>> Subject: Re: [OpenSIPS-Users] FW: An Old OpenSER Error For A New OpenSIPS User
>>
>> Hi Larry,
>>
>> most probably your opensips does not recognize the usmetrotel.com as a
>> local domain, so it is keep forwarding the request to itself.
>>
>> adding something like:
>>     alias="usmetrotel.com"
>>
>> in your script should solve the problem.
>>
>> Regards,
>> Bogdan
>>
>> Kemp, Larry wrote:
>>
>>     
>>> After Bogdan helped me to correct my errors I was able to manually register extension 1000 on my OpenSER 1000 by entering: /sbin/openstlrc add 1000 password 1000 at mydomain.com
>>>
>>> Then when I went to register my soft-phone to the OpenSER as extension 1000. On my soft-phone (X-Lite 3.0 running on WinXP) I got the message "503 - Message Too Big". I corrected this by editing the file on the OpenSER /etc/openser/openser.cfg (at line 96 Column 24) increasing the default value from 2048 to 8192.
>>>
>>> Then I got the message "483 - Too Many Hops" on my soft phone. So back on the OpenSER I edited /etc/openser/openser.cfg (at Line 91 Column 40) and increased the default value from 10 to 100. I still got the "488 - Too Many Hops" message on the client.
>>>
>>> So I ran a SIP capture on the OpenSER by using the command: ngrep -p -q -W byline port 5060 >test.txt
>>>
>>> Here is the output of that capture:
>>> ----------------------------------------------------------------------------------------------------
>>> interface: eth0 (10.100.100.0/255.255.255.0)
>>> filter: (ip or ip6) and ( port 5060 )
>>>
>>> U 208.76.137.2:31215 -> 10.100.100.199:5060 REGISTER sip:usmetrotel.com SIP/2.0.
>>> Via: SIP/2.0/UDP 208.76.137.2:31215;branch=z9hG4bK-d8754z-1271d5783f053154-1---d8754z-;rport.
>>> Max-Forwards: 70.
>>> Contact: <sip:1000 at 208.76.137.2:31215;rinstance=705236a41a2fcc6d>.
>>> To: "Larry-Kemp"<sip:1000 at usmetrotel.com>.
>>> From: "Larry-Kemp"<sip:1000 at usmetrotel.com>;tag=863d2266.
>>> Call-ID: OTljYmExZTU2ZjI0ODU2NDlhYzYwYmFmMmE3OTkxYjU..
>>> CSeq: 1 REGISTER.
>>> Expires: 3600.
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
>>> User-Agent: X-Lite release 1103k stamp 53621.
>>> Content-Length: 0.
>>> .
>>>
>>> U 10.100.100.199:5060 -> 208.76.137.2:31215 SIP/2.0 483 Too Many Hops.
>>> Via: SIP/2.0/UDP 208.76.137.2:31215;branch=z9hG4bK-d8754z-1271d5783f053154-1---d8754z-;rport=31215.
>>> To: "Larry-Kemp"<sip:1000 at usmetrotel.com>;tag=329cfeaa6ded039da25ff8cbb8668bd2.cb9e.
>>> From: "Larry-Kemp"<sip:1000 at usmetrotel.com>;tag=863d2266.
>>> Call-ID: OTljYmExZTU2ZjI0ODU2NDlhYzYwYmFmMmE3OTkxYjU..
>>> CSeq: 1 REGISTER.
>>> Server: OpenSER (1.2.2-notls (i386/linux)).
>>> Content-Length: 0.
>>> .
>>> :
>>> ----------------------------------------------------------------------------------------------------
>>>
>>> I am not sure what else it could be with the Soft-phone client or OpenSER.
>>> Here is a brief outlook of what my IP network & traffic routing looks like:
>>>
>>> Network/Device                                               Private IP              Public IP (if it has one)
>>> ---------------------------------------------------------------------------------------------
>>> -Network 1 (Private LAN):
>>>    My WinXP PC containing X-Lite Soft Phone  172.20.30.22            None
>>>    Default gateway:                                  172.20.30.254   208.76.137.2
>>>
>>>      -Internet
>>>
>>> -Network 2 (DMZ):
>>>    My OpenSER Server:                                        10.100.100.199  =       208.76.137.116
>>> ---------------------------------------------------------------------------------------------
>>>
>>> Questions:
>>>
>>> - Do you think the OpenSER is having trouble making its way back to the soft-client or to the Internet based on what the SIP capture shows?
>>> - Could the OpenSER have a problem leaving one private network, traversing the Internet, and then going back into another private network?
>>> - Do I perhaps need to somehow add a route on the OpenSER server to tell it how to get to that remote network?
>>>
>>> Larry Kemp
>>> Network Engineer
>>> U.S. Metropolitan Telecom
>>> Bonita Springs, FL USA
>>>
>>>
>>> -----Original Message-----
>>> From: Kemp, Larry
>>> Sent: Wednesday, October 14, 2009 10:15 AM
>>> To: 'Bogdan-Andrei Iancu'; OpenSIPS users mailling list
>>> Subject: RE: [OpenSIPS-Users] An Old OpenSER Error For A New OpenSIPS User
>>>
>>> ------------------------------------------------------------------------------------
>>> ------------------------------------------------------------------------------------
>>>
>>> Bogdan,
>>>
>>> Thank you very much for your help with OpenSER. I have seen many people report this issue in forums but was never really able to see where folks found a resolve for this. I see too in Flavio's book on page 100 where he states what the user openser's password must be entered as when adding VoIP extensions. In the book it states to change HAS_SERWEB="yes". I guess later on it will cover the PHP & SerMyAdmin possibilities. Now that I know that this is controlled in this location if I need the SERWEB enabled again, I can as needed and then restart OpenSER. Now I can move on to getting the VoIP X-Lite soft-phones to register to OpenSER and make hopefully make interdomain test calls.
>>>
>>> Here is my output now:
>>> -------------------------------------------------------------------------------------
>>>
>>> MY-SERVERS-NAME:/etc/openser# /sbin/openserctl add 1000 password 1000 at mydomain.com database engine 'MYSQL' loaded Control engine 'FIFO' loaded
>>> is_user: user counter=0
>>> check_db_alias: alias counter=0
>>> MySql password for user 'openser at localhost':
>>> new user '1000' added
>>>
>>> MY-SERVERS-NAME:/etc/openser# /sbin/openserctl add 1001 password 1001@ mydomain.com database engine 'MYSQL' loaded Control engine 'FIFO' loaded
>>> is_user: user counter=0
>>> check_db_alias: alias counter=0
>>> MySql password for user 'openser at localhost':
>>> new user '1001' added
>>> -------------------------------------------------------------------------------------
>>>
>>> Multumiri!
>>>
>>> Larry Kemp
>>> Network Engineer
>>> U.S. Metropolitan Telecom, LLC
>>> Bonita Springs, FL USA
>>> -------------------------------------------------------------------------------------
>>> -------------------------------------------------------------------------------------
>>>
>>> -----Original Message-----
>>> From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
>>> Sent: Tuesday, October 13, 2009 5:06 PM
>>> To: OpenSIPS users mailling list
>>> Subject: Re: [OpenSIPS-Users] An Old OpenSER Error For A New OpenSIPS User
>>>
>>> Hi Larry,
>>>
>>> in openserctlrc check for the SERWEB compatibility field and disable it.
>>> When this is enabled, openserctl tries to populate the phplib_id field in the subscriber table (which by default does not exists).
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Kemp, Larry wrote:
>>>
>>>
>>>       
>>>> I am certain for anyone experienced this is an easy fix, so help me
>>>> out OpenSIPS community.
>>>>
>>>> I am using OpenSER Source 1.2.2 on Linux version 2.6.26-2-686 (Debian
>>>> 2.6.26-19) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)).
>>>>
>>>> I am using Flavio's book. On page 100 (Adding Authentication with
>>>> MySQL) at step 4 it states:
>>>>
>>>> Configure two user accounts using the openserctl utility.
>>>>
>>>> /sbin/openserctl add 1000 password 1000 at voffice.com.br (mydomain.com)
>>>>
>>>> /sbin/openserctl add 1001 password 1001 at voffice.com.br (mydomain.com)
>>>>
>>>> In either instance the system returns:
>>>>
>>>> Database 'MYSQL' loaded
>>>>
>>>> Control engine 'FIFO' loaded
>>>>
>>>> is_user: user counter=0
>>>>
>>>> check_db_alias: alias counter=0
>>>>
>>>> *ERROR 1045 (28000): Access denied for user 'openser'@'localhost'
>>>> (using password: YES)*
>>>>
>>>> or
>>>>
>>>> *ERROR 1054 (42S22) at line 1: Unknown column 'phplib_id' in 'field
>>>> list'*
>>>>
>>>> *ERROR: introducing the new user'1000' to the database failed*
>>>>
>>>> I have verified that the users openser, openserro and root have the
>>>> correct passwords to access the MySQL database named openser (as one
>>>> forum stated it was a password issue). I have tried several changes to
>>>> the file /etc/openser/openserctlrc as several online forums indicated
>>>> this was the issue. I have found this listed in many online forums but
>>>> I have not been able to fix this trying several of the things that are
>>>> mentioned.
>>>>
>>>> Can anyone on this users at lists.opensips.org please advise me? I am
>>>> using OpensSER 1.2.2 as that is what the book I have procured
>>>> indicates to use and I want to strictly follow what Flavio's book
>>>> states to use. Thanks in advance.
>>>>
>>>> Respectfully,
>>>>         




More information about the Users mailing list