From: Steve K. <st...@st...> - 2004-02-13 18:53:09
|
Michael Van Donselaar wrote: >Steve Sokol and I have been trying to track down this problem for quite some >time. > >I think that the problem had nothing to do with scheduling, but with native >transfers. > >(I think that iax.conf needs a canreinvite parameter, like sip.conf) > >I changed the debug code to print to a log file (since wxWindows appears to eat >stderr) and found that the problems seemed to be occurring when asterisk sent a >TXREQ and the softphone sent a TXCNT. And another TXCNT. And another TXCNT. >And ..... the asterisk sent several TXREJs and then audio stopped flowing. > >I tried to follow the chan-iax2 code in the asterisk code, but then looked at >the iaxlib code on the digium ftp site. > >Then I looked at the CVS *libiax2* code. Aha, we're out of date. I noticed >that we weren't applying the apparent_address when we were sending our TXCNT, so >I just copied the iax.c from digium's libiax2 CVS into the iaxclient's >libiax2/src and recompiled. > >IT WORKS (mostly) > >iaxComm -> asterisk -> iaxComm works fine if there's no NAT anywhere in the >picture. > >Steve Sokol tells me that > >iax Phone ->| > |linksys router -> asterisk >iax Phone ->| > >doesn't work. > >I've found that > >iaxComm -> asterisk -> NAT VPN -> iaxComm > >doesn't work. > >Steve Kann: I'd like to update the iaxclient CVS to have iax.c from digium, but >with the addition of Steve Sokol's blind_transfer function, OK? > > There looks like there's a few changes; I really need to synch us up properly, because we have a couple of other fixes in there other than the blind transfer stuff. In iax.c itself: 1) A couple of fixes for non-GNU C (but not complete). -#ifdef __GNUC__ f.src = __FUNCTION__; -#else - f.src = __FILE__; -#endif 2) A fix for plaintext passwords. } else { - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, password); + iax_ie_append_str(&ied, IAX_IE_PASSWORD, password); } 3) Steve U's fixes for some lost frames: - /* Queue for immediate delivery */ - iax_sched_event(e, NULL, 0); - return NULL; - //return e; + return e; [and more] 4) A memory allocation fix. - e = (struct iax_event *)malloc(sizeof(struct iax_event) + datalen + 1); + e = (struct iax_event *)malloc(sizeof(struct iax_event) + datalen); Also, there's similar changes in the other side. The two changes you're referring to: 1.17 (markster 04-Dec-03): return send_command(session, AST_FRAME_IAX, IAX_COMMAND_TXREADY, 0, ied.buf, ied.pos, -1); and 1.17 (markster 04-Dec-03): session->transfer = *e->ies.apparent_addr; were obviously committed by mark in Early December.. Here's what he wrote to the log: ---------------------------- revision 1.17 date: 2003/12/04 22:20:38; author: markster; state: Exp; lines: +2 -1 libiax2 fix ============= anyway, Michael, you can commit those two changes to our version if you want, or I will do this sometime early next week. I do need to go through and synchronize the versions and send a patch over to Mark with the changes, and notes on who is contributing the changes. -SteveK |