From: S <s...@ka...> - 2004-03-25 09:14:25
|
Hi Steve, I will send a FAX to digium. First I have to find a FAX machine ;-)) (Yes there are people out which have no fax-machine (this machines are old fashioned stuff) If I have send the fax I let you know. All RISC machines need pointers word align, but some one have a special handling to remedy the problem. For example the DEC ALPHA chip get a trap and realign the pointer (in the same way I have done). This means for every pointer wich is not align the CPU has to do some extra work. Also I think some new compiler have options to handle this problem. (They add some extra code into you program). ------------------------------------------------------------ I found a other problem in iax.c function iax_header_to_event() in case IAX_COMMAND_TXREQ: In the new version there is a new assignment to session->transfer . If I let the line in I get instantly a crash. Do you know why this line is added ? case IAX_COMMAND_TXREQ: #if 0 session->transfer = *e->ies.apparent_addr; #endif session->transfer.sin_family = AF_INET; session->transfercallno = e->ies.callno; session->transferring = TRANSFER_BEGIN; ----------------------------------------------------------------- Do you have any comments about the registry problem and my IAX_COMMAND_POKE fix ? It fix the registry problem but after a time the client is unregisterd and registed again. So there must be a other problem to. Regards Stephan PS : See comments in the mail below. Steve Kann wrote: > > Stephan, > > Can you (or have you already) faxed in a disclaimer to digium for > your libiax2 changes? > > If you have, than I'd gladly take this change and send it up to Digium. > > As far as your alignment patch, I guess my questions are: > > 1) First, the patches are definitely not needed for all RISC platforms; > the code works just fine on PPC, for example. Maybe the PPC has some special handling for not align pointer. > > 2) Why haven't others who are using iaxclient on zaurus running into > this same problem? Maybe they use some special compiler (or compiler options) > > That patch seems like a lot of clutter to add to the code if it isn't > really necessary.. You are right it looks out like clutter, but the problem is the design mistake in the IAX protocol. I hope in a future version of IAX they take care of word align. On 64Bit CPU's the problem getting bigger.... Most porting problems are align bugs. A good candiate to find a align bug is the Sparc CPU (32bit) and Super Sparc III CPU (64bit), Or the Alpha CPU (where the align warning are not disabled). I have no idea how sensitively the AMD Opteron CPU is. > > -SteveK > > S wrote: > > > Hi Steve, > > > > I found the registry bug in the libiax2/src/iax2.c, > > In function iax_header_to_event(...) is no POKE command handle, so I > > add this line and it work (only POKE case section) : > > > > case IAX_COMMAND_PING: > > /* Just immediately reply */ > > e->etype = IAX_EVENT_PING; > > e->ts = ts; > > e = schedule_delivery(e, ts); > > break; > > case IAX_COMMAND_POKE: /* SKA fix registry problem */ > > send_command_immediate( session, > > AST_FRAME_IAX, > > IAX_COMMAND_PONG, > > ts, NULL, 0, fh->iseqno); > > e = NULL; > > break; > > case IAX_COMMAND_PONG: > > > > Please add the POKE case section to libiax2/src/iax2.c line 2119 > > > > iax2 show peers > > skaAtHome 172.16.16.160 (D) 255.255.255.255 4569 OK (22 ms) > > > > I suspect there is still a other bug, because afer a while ( and 4 > > times refreshing registration ) I get a UNREACHABLE and a while later > > I get a REACHABLE > > > > Regards > > > > Stephan > > > > PS : This is the next stop to iax phone on a ARM RISC Zaurs PDA. > > PS : There are still some align patches for iax2-parser.c out... > > > > > > > > S wrote: > > > >> Hi IAX Guru's, > >> > >> I have the problem to register a iaxclient (iaxcomm or my own Zaurus > >> client) to asterisk. > >> Here is my observation on asterisk with iax2 debug on where a > >> iaxclient try to register : > >> > >> Rx --> REGREQ > >> TX <-- REGAUTH > >> Rx --> REGREQ > >> TX <-- POKE > >> TX <-- REGACK > >> RX --> ACK > >> RX --> ACK > >> TX <--POKE > >> > >> iax2 show peers > >> Name/Username Host Mask Port Status > >> muggel/muggel (Unspecified) (D) 255.255.255.255 0 UNKNOWN > >> skaAtHome 172.16.16.160 (D) 255.255.255.255 4569 UNREACHABLE > >> ska/ska (Unspecified) (D) 255.255.255.255 0 UNKNOWN > >> > >> > >> And here is the iax2 debug while one asterisk register on a second one. > >> RX --> REGREQ > >> TX <-- REGAUTH > >> RX --> REGREQ > >> TX <-- REGACK > >> RX --> ACK > >> TX <-- POKE > >> RX --> PONG > >> Peer 'XXX' is now REACHABLE! > >> TX <-- ACK > >> > >> The different between both traces is the POKE PONG sequence. > >> In the libiax2/src/iax.c file is no code for the POKE request ? > >> > >> Any comment's ? > >> What is going wrong ? > >> > >> Is there anyone able to register a iaxclient to asterisk ? > >> ( iax2 show peers --> Status OK ) > >> > >> Regards > >> > >> Stephan > >> > >> > > // strings attachment.doc | more |