[Asterisk-Dev] Possible Solution To IAX2 Client Inbound Call Bug

Steven M. Sokol ssokol at sokol-associates.com
Mon Jan 19 08:15:35 MST 2004


Mark,

I think you are correct, but...  I tracked this back to the
iax_find_session() /match() functions where I discovered that existing
sessions were being matched to the host address, port, and call number of
the incoming message.  Since iaxclient_lib wasn't destroying the sessions,
they were still out there to be found and matched.

My only question is... Why were we re-using sessions at all?  The
communication interchange that handles the REG/REGACK is started by calling
iax_session_new() to create a new session.  Somehow Asterisk chose to reply
by re-using an existing session on it's end?

I will read a bit further into chan_iax2.c and see what I can find.  Does
asterisk attempt to re-use existing sessions until they are explicitly
destroyed by the associated client (peer)?

FWIW - several developers have now confirmed that this does fix the problem
with all of the iaxClient-derived clients.

Thanks,

Steven

P.S.  Any chance you could (in your copious spare time) hack out a
"definitive guide to IAX2"?  I have a friend who is hoping to prototype an
IAX2-enabled hard IP phone in the next few months.  A solid white paper
would be a big help.  (I know you are extremely busy -- just a wishful
thought.)  - SMS

-----Original Message-----
From: Mark Spencer [mailto:markster at digium.com] 
Sent: Sunday, January 18, 2004 10:24 PM
To: asterisk-dev at lists.digium.com
Cc: Steven Sokol; iaxclient-devel at lists.sourceforge.net
Subject: Re: [Asterisk-Dev] Re: [Iaxclient-devel] Possible Solution To IAX2
Client Inbound Call Bug

is it confirmed then that this is not, in fact, a bug in libiax2 but in
the application using it?  Are there any more patches for libiax2 that
need to be merged?  It would be nice to make a release.

Mark

On Sun, 18 Jan 2004, Michael Van Donselaar wrote:

> On Sun, 18 Jan 2004 19:06:39 -0600, Steven Sokol
<ssokol at sokol-associates.com>
> wrote:
>
> >Ok, I can't do the dance of joy yet.  Somebody else here has to try this
> >and agree that the solution works across the board.  BUT, so far I can't
> >get it to fail (which is a first for me).  So.... a minor hooray is in
> >order.
>
> I think you can start dancing.
>
> I've patched my local sources, and compiled Win32 and Linux-Gtk versions
of
> iaxComm.
>
> I can't get them to fail after an hour of testing.
>
> Plain binaries are at
> http://iaxclient.sourceforge.net/iaxcomm/iaxcomm-win-test.exe and
> http://iaxclient.sourceforge.net/iaxcomm/iaxcomm-lin-test
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>







More information about the asterisk-dev mailing list