Re: [Opalvoip-devel] "userinput" disables "fax" for H.323
Brought to you by:
csoutheren,
rjongbloed
From: Robert J. <ro...@vo...> - 2008-09-24 00:50:27
|
Can you change this block of code to: static const char * sessionOrder[] = { OpalMediaType::Audio(), OpalMediaType::Video(), OpalMediaType::UserInput(), 0 }; PINDEX simultaneous; for (PINDEX s = 0; s < PARRAYSIZE(sessionOrder); s++) { simultaneous = P_MAX_INDEX; for (OpalMediaFormatList::iterator format = formats.begin(); format != formats.end(); ++format) { if (format->GetMediaType() == sessionOrder[s] && format->IsTransportable()) simultaneous = localCapabilities.AddMediaFormat(0, simultaneous, *format); } } And let me know if that fixes the problem? Thanks, Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. > -----Original Message----- > From: Vyacheslav Frolov [mailto:v.f...@or...] > Sent: Tuesday, 23 September 2008 4:37 PM > To: cr...@po... > Cc: opa...@li... > Subject: Re: [Opalvoip-devel] "userinput" disables "fax" for H.323 > > The code that causes the fax codec to be ignored > (opal\src\h323\h323.cxx[3411]): > > void H323Connection::OnSetLocalCapabilities() > { > .................. > > // Add those things that are in the other parties media format list > static unsigned sessionOrder[] = { > OpalMediaFormat::DefaultAudioSessionID, > OpalMediaFormat::DefaultVideoSessionID, > OpalMediaFormat::DefaultDataSessionID, > 0 > }; > PINDEX simultaneous; > > for (PINDEX s = 0; s < PARRAYSIZE(sessionOrder); s++) { > simultaneous = P_MAX_INDEX; > for (OpalMediaFormatList::iterator format = formats.begin(); > format != formats.end(); ++format) { > if (format->GetDefaultSessionID() == sessionOrder[s] && format- > >IsTransportable()) > simultaneous = localCapabilities.AddMediaFormat(0, > simultaneous, *format); > } > } > > .................. > } > > > Craig Southeren wrote: > > We have slowly been bringing in code to allow the creation of > arbitrary > > numbers of channels within a call. It appears you have found a > place we > > have not yet fixed > > > > Do you know where the code is that causes the fax codec to be > ignored? We > > need to change that code to use media types instead of assuming > session ID > > 3 > > > > Craig > > > > On Fri, September 19, 2008 1:58 am, Vyacheslav Frolov wrote: > > > >>Hello, > >> > >>If audio and video enabled the "userinput" gets default session ID > = 3, > >>so the "fax" gets default session ID = 4 (instead 3) and H.323 > ignores > >>"fax" codecs. > >> > >> > >>The problem root is in > >> OpalMediaTypeDefinition::OpalMediaTypeDefinition() > >>and > >> H323Connection::OnSetLocalCapabilities() > >> > >> > >>For more common demonstration of the problem below is a patch that > >>must do nothing, but it disables audio and video for H.323. > >> > >>------------------------------------------------------------------- > -------- > >>Index: src/opal/mediatype.cxx > >>=================================================================== > >>--- src/opal/mediatype.cxx (revision 20916) > >>+++ src/opal/mediatype.cxx (working copy) > >>@@ -47,6 +47,10 @@ > >> int mediaTypeLoader; > >> }; // namespace PWLibStupidLinkerHacks > >> > >>+// simple1-3 will disable for H.323 audio and video because it > allocates > >>sessions 1-3 > >>+OPAL_INSTANTIATE_SIMPLE_MEDIATYPE_NO_SDP(simple1); > >>+OPAL_INSTANTIATE_SIMPLE_MEDIATYPE_NO_SDP(simple2); > >>+OPAL_INSTANTIATE_SIMPLE_MEDIATYPE_NO_SDP(simple3); > >> > >> OPAL_INSTANTIATE_MEDIATYPE(audio, OpalAudioMediaType); > >> > >>------------------------------------------------------------------- > -------- > > ********************************************************************* > ********************************** > This message and any attachments (the "message") are confidential and > intended solely for the addressees. > Any unauthorised use or dissemination is prohibited. > Messages are susceptible to alteration. Orange Business Services > shall not be liable for the message if altered, changed or > falsified. If you are not the intended addressee of this message, > please cancel it immediately and inform > the sender. > ********************************************************************* > ********************************** > > --------------------------------------------------------------------- > ---- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Opalvoip-devel mailing list > Opa...@li... > https://lists.sourceforge.net/lists/listinfo/opalvoip-devel |