Re: [Opalvoip-user] Problem with EndPoint/Transport when linkstatus changes
Brought to you by:
csoutheren,
rjongbloed
|
From: David J. <dav...@se...> - 2014-03-26 10:59:26
|
Hello Robert, Thank you for the quick response and for your advice. After removing the listener handling code, the phone does not show the described behaviour anymore. It works like expected. In fact, this was legacy code that I had to adopt, and which worked with the previous version of opal/ptlib that was used. After upgrading from previously Sirius to Eridani now, the code did not work anymore and showed the behaviour I described. It is nice to see, that I now do not have to handle these network events and can remove this code. Thank you again for your help. Kind regards David Jaschuk On 03/25/2014 11:40 PM, Robert Jongbloed wrote: > You should not need to touch the listeners, the system will already > handle a network interface going up and down. A very large amount of > work was done in this area a number of years ago for the Ekiga guys. > If there is a regression in the above that caused you to try stopping > and starting the listeners then it should be fixed. > > Which version of PTLib/OPAL are you using? > > Can you remove the code regarding stopping listeners, just start them > once at the start, and send me a log file exhibiting the failure? > > P.S. Asterisk is notoriously sensitive and often not "compliant" to > standards or best practice. This might need yet another work around. > > *Robert Jongbloed* > /OPAL/OpenH323/PTLib Architect and Co-founder./ > Commercial support at http://www.voxlucida.com.au > > On 25/03/2014 10:56 PM, David Jaschuk wrote: >> Hello, >> >> I am experiencing a strange behaviour and am not sure if I am using Opal >> correctly or missing something. >> >> These are the steps executed: >> - Creation of OpalManager and SIPEndPoint >> - Creation of custom listeners: >> - PStringArray my_listeners; >> - my_listeners.AppendString("udp$<MY_IP>:5060"); //<MY_IP> = ip >> of my eth0 >> - my_listeners.AppendString("tcp$<MY_IP>:5060"); >> - Starting of Listeners: SIPEndPoint->StartListeners(my_listeners); >> - Registration on Server: SIPEndPoint->Register(params, token); >> >> After this, the registration succeeds and the phone can be used. Calls >> can be started and received. >> >> Now I pull the ethernet cable. Since I am observing the state of the >> connection, and realise the link went down, I stop the listeners: >> - SIPEndPoint->RemoveListener(0); >> >> After replugging the cable and realising the link went up again, I >> restart the listeners and try to register the same way as above: >> - SIPEndPoint->StartListeners(my_listeners); >> - SIPEndPoint->Register(params, token); >> >> This registration does not succeed. It does not matter how often I am >> retrying it. >> >> Here comes the thing I do not understand. I am monitoring all traffic >> with wireshark. After the reconnect of the ethernet cable, I see >> SIP-register packets being sent from the phone. I also see the response >> from the SIP-server (Asterisk), which is a "401 Unauthorized" packet. >> The log, that is written from the phone-application (the PTRACE output), >> does show the sent register packets (PDU send), but does not show the >> ones from the SIP server. There is no "PDU received" after the >> reconnect. The application does not seem to see them. >> >> >> So, what am I doing wrong / missing here? >> Has anyone experienced a similar problem? >> >> I am using the version Eridani of Opal and Ptlib (3/2.12.9). >> >> Thank you in advance for your help. >> >> >> Kind regards >> David Jaschuk >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/13534_NeoTech >> _______________________________________________ >> Opalvoip-user mailing list >> Opa...@li... >> https://lists.sourceforge.net/lists/listinfo/opalvoip-user > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > > > _______________________________________________ > Opalvoip-user mailing list > Opa...@li... > https://lists.sourceforge.net/lists/listinfo/opalvoip-user -- Dipl.-Inf David Jaschuk Berater Entwicklung Client- & Netzwerksicherheit Public Sector secunet Security Networks AG Alt-Moabit 91c 10559 Berlin Telefon +49-201-5454-3627 Telefax +49-201-5454-1321 dav...@se... http://www.secunet.com Public Sector secunet Security Networks AG ______________________________________________________________________ Sitz: Kronprinzenstraße 30, 45128 Essen, Deutschland Amtsgericht Essen HRB 13615 Vorstand: Dr. Rainer Baumgart (Vors.), Willem Bulthuis, Thomas Pleines Aufsichtsratsvorsitzender: Dr. Peter Zattler ______________________________________________________________________ |