logan wrote:
> Hello,
>   
>> Are you executing this in another thread? Because some of the functions
>> take longer to complete. There you also access a singleton, if this is
>> in another thread then application might not be thread safe.
>>     
> Yes, I execute this in another thread. Can you please elaborate the second 
> point? How does this make an application thread unsafe?
>
>   
I don't know whether you access that singleton from the GUI thread as 
well. If you do it without locking then it's
not thread safe and you might get random crashes. To avoid locking I 
access a copy of configuration in the thread.
That copy is passed as a parameter to initialization.
>> I have noticed crosstalk doesn't freeze during initialization like 
>> sipxezphone.
>> When waiting for STUN result, be careful you need to wait for all
>> results, not just the first success, as PC can have multiple interfaces
>> which lead to different networks and they can be in different NATs. You
>> should get a result for each IP address.
>>     
> Ok, so you mean that I should see how many interfaces there are and wait for 
> equal number of STUN responses?
>   
You should see how many IP addresses there are, and await so many STUN 
responses. There is no STUN
response for 127.0.0.1 (loopback).
>   
>> I will compare the code with
>> mine later, as I have to do something else right now, but I see you
>> followed the bad habbit in sipxezphone to call sipxtapi functions
>> without checking results.
>>     
> No, I just stripped the error checking to make it easy to read. Please see 
> my code to find the problem, I'm grateful to you.
>
>   
I found out the problem was in supplying sip proxy hostname instead of 
IP address. When I supply IP address it works.
My phone strangely somehow works also if you provide hostname, but 
somewhat slower.

Also if you try to send a message during call to the same sip uri, or 
after a call, you will get a nice crash :-)

I also noticed the same problem in my phone although it seems to be 
happening less often. It occured to me in vmware only.
On my host operating system, I couldn't reproduce it with my phone. Its 
probably a problem in sipxtacklib.

Jaroslav Libak

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to