VDK Discussion Forum

You must be logged in to post

Could not create RTP Session! Error was: Can't retrieve login name

UserPost

3:31
5 July 2012


zanes

Member

posts 7

Hi…

I tried VDK in ubuntu 11 with qtcreator. When I run the program and click the call button, the call is not established.

the following is logged:

[19:03:15] [LOGGER] Logger Started
[19:03:15] [LOGGER] Opened logfile vdklog-1.txt for writing
[19:03:36] [Line 0] [CRITICAL] Could not create RTP Session! Error was: Can't retrieve login name
[19:03:36] [CORE] [CRITICAL] Cannot place call for we couldn't create the media flow


In application output in qtcreator:

capp is not null
haveParsedDefaulProxyIp= 1
haveParsedDefaultRegistrarIp= 1
haveParsedDefaultDomainName= 1
auth-module: db.txt: No such file or directory

Using RTP port Cycling code


the following returns 0

vdk->setActiveSipAccount(0);


My vdk.ini file:

[NETWORK]
LocalIP=192.168.1.171
LocalUdpPort=5060
LocalTcpPort=5060

[SIP_DEFAULTS]
ProxyIP=192.168.1.178
ProxyPort=5060
ProxyDiscovery=IP_ADDRESS
RegistrarIp=192.168.1.178
RegistrarPort=5060
RegistrarDiscovery=IP_ADDRESS
DomainName=192.168.1.178
RegisterExpiration=3600

[SIP_ACCOUNTS]
1User=102
1Username=102
1Password=102
size=1

Environment:

Qt 4.8

ubuntu 11

local voip server: 3CX


Other voip clients can communicate and works fine.

Please help..


Thanks,

Zanes

15:34
10 July 2012


lamonica

Admin

posts 28

Post edited 11:46 – 11 July 2012 by lamonica
Post edited 11:46 – 11 July 2012 by lamonica


Hello Zanes,

in order to help you i need some more info:


1) what is the result of the init() method?

2) in the vdk.ini excerpt you posted there is a missing "\" (backslash) symbol in the SIP_ACCOUNTS section. Is that symbol really missing?

3) have you set the current sip account?


best regards

2:21
11 July 2012


zanes

Member

posts 7

Post edited 7:50 – 11 July 2012 by zanes


Thanks for the reply.

Below are the answers:

1. 0


2. I have backslash. Its not showing here in this post.

[SIP_ACCOUNTS]

1\User=102

1\Username=102

1\Password=102

size=1


3. Yes,

vdk->setActiveSipAccount(0);

which returns 0.

and the username and password works fine with other sip clients.


I get this messages in qt creator:

auth-module: db.txt: No such file or directory

Everytime i click the "call" button, I get the below message..

Using RTP port Cycling code


Hope these helps.


Thanks again.

11:45
11 July 2012


lamonica

Admin

posts 28

Hello Zanes,

are you launching your application from command line?


2:23
12 July 2012


zanes

Member

posts 7

No, Not from command line.

by clicking "Run" in QtCreator.

5:16
12 July 2012


zanes

Member

posts 7

Dear Iamonica,


When I tried in windows 7..  with MSVC2010 and microsoft visual c++ compiler 10.0 in qt creator.. I get the following

WARNING: QApplication was not created in the main() thread.

haveParsedDefaulProxyIp= 1

haveParsedDefaultRegistrarIp= 1

haveParsedDefaultDomainName= 1

Adding nameserver: 192.168.10.1

Adding nameserver: 121.169.3.4

Adding nameserver: 192.168.1.1

auth-module: db.txt: No such file or directory

before paHostApiInitializers[0].

after paHostApiInitializers[0].

before paHostApiInitializers[1].

after paHostApiInitializers[1].

before paHostApiInitializers[2].

after paHostApiInitializers[2].

before paHostApiInitializers[3].

after paHostApiInitializers[3].

Using RTP port Cycling code


8:38
12 July 2012


lamonica

Admin

posts 28

zanes said:

No, Not from command line.

by clicking "Run" in QtCreator.


Hello zanes,

can you check if you environment exports the LOGNAME env variable?

by default it should be set automatically to the anme of the user you are logged on with.

try explicitly setting it before calling the executable that uses the VDK.

i.e. from command line:

export LOGNAME=<yourusername>

./yourapp


from QtCreator:

go to the "Projects" tab, choose run settings and add an entry in the environment variables list.


let me know if this helps

8:39
12 July 2012


lamonica

Admin

posts 28

zanes said:

Dear Iamonica,


When I tried in windows 7..  with MSVC2010 and microsoft visual c++ compiler 10.0 in qt creator.. I get the following

WARNING: QApplication was not created in the main() thread.

haveParsedDefaulProxyIp= 1

haveParsedDefaultRegistrarIp= 1

haveParsedDefaultDomainName= 1

Adding nameserver: 192.168.10.1

Adding nameserver: 121.169.3.4

Adding nameserver: 192.168.1.1

auth-module: db.txt: No such file or directory

before paHostApiInitializers[0].

after paHostApiInitializers[0].

before paHostApiInitializers[1].

after paHostApiInitializers[1].

before paHostApiInitializers[2].

after paHostApiInitializers[2].

before paHostApiInitializers[3].

after paHostApiInitializers[3].

Using RTP port Cycling code



i do not understand… did it work? did it report the same error?

9:21
12 July 2012


zanes

Member

posts 7

it didn't work..

everytime i click the call button.. i get "Using RTP port Cycling code".


When i check in the server… the user is not registered and i get the above error when i click the call button.


Thanks

11:54
12 July 2012


lamonica

Admin

posts 28

Hello zanes,

let me recap the problem.

1) you see the message "cant'retrieve login name" in the log file both on linux and windows

2) you do have exported the LOGNAME environemnt variable (or checked it was correctly set) before invoking your application


as of your last message you mention also that you cannot register; now, the registration to the SIP server should take place before the start of the call but is totally unrelated with the media session, hence you should be able to register to your sip registrar despite the error you reported.

register problem:

have you called the registerSipAccount() method?

what shows up in the logs as result of this call?


call problem:

does the LOGNAME env var has the same value of USERNAME env var?

have you tried launching the app from command line? (i wonder if qtcreator might be messing with environment)

9:27
16 July 2012


zanes

Member

posts 7

I like to make this work in windows first.

I added registerSipAccount() method and it returned 0 while running the application.

In the log I got these messages:

[10:29:04] [LOGGER] Logger Started
[10:29:04] [LOGGER] Opened logfile vdklog-1.txt for writing
[10:29:18] [SIP] [WARNING] Unhandled response to REGISTER ( 407 )


In windows, I'm using Qt4.8.0 for Desktop- MSVC2010 to compile the application.

When i run my application in the command prompt. The application runs fine. But can't make the calls and In the log i got the same as above.

I have set the LOGNAME and USERNAME.

Thanks.

16:57
16 July 2012


lamonica

Admin

posts 28

Hello zanes,

regarding your registration issue on windows… there is a known bug in the downloadable trial (already fixed in retail version) that on some occasion prevents the correct handling of the 407 response to a SIP REGISTER message.

the registerSipAccount() method returns 0 as it correctly sends out a register message but you are not receiving the registerOk signal because of the 407 from the server.

If you can configure the server to authenticate register messages with 401 instead of 407 you will succeed to register.

3:53
18 July 2012


zanes

Member

posts 7

Thanks a lot for you support Iamonica… It works now..

Made the changes in the 3CX server. In edit extension->other(tab)->set the supports Re-Invite to false.

Can you tell me when the final version of VDK 2.0 will be released ?


Thanks again.


15:46
24 July 2012


lamonica

Admin

posts 28

Hello zanes,

glad i could help :)

version 2.0 (with video support) for windows should be out by the end of the year.

version 1.2 should be out way before that date, i am afraid i cannot give you a more accurate timeframe but i don't know these info.


regards



About the VoipDevKit forum

Most Users Ever Online:

23


Currently Online:

1 Guest

Forum Stats:

Groups: 1

Forums: 2

Topics: 20

Posts: 75

Membership:

There are 235 Members

There has been 1 Guest

There are 2 Admins

There are 2 Moderators

Top Posters:

Antti – 9

zanes – 7

simon – 5

chedy – 3

Elimu – 3

grin – 3

Administrators: lamonica (28 Posts), admin (0 Posts)

Moderators: alienpenguin (8 Posts), murgia (0 Posts)