[Home]

Summary:ASTERISK-08142: [patch] Add OSP support
Reporter:Di-Shi Sun (homesick)Labels:
Date Opened:2006-11-16 10:22:31.000-0600Date Closed:2011-06-07 14:03:24
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) oh323.diff
Description:Several changes to add OSP support in oh323 channel driver.

1. Add dialplan function OH323CHANINFO to get peerip and osptoken from inbound call setup messages, to set callid and osptoken for outbound call setup messages.

2. Add char* ospToken in call_details_t structure to store the OSP token from the inbound call setup message.

3. Add char callId[CALLIDSIZE] and char ospToken[OSPTOKENSIZE] in call_options_t structure to store the call identifier and OSP token for the outbound call setup message.

4. Add PBYTEArray ospToken in class MyH323Connection to pass the OSP token from call_options_t structure to the outbound call setup message.

5. Add code to obtain the OSP token from the inbound call setup message.

6. Add code to set the call identifier in MyH323Connection class.

7. Add code to set the ospToken in MyH323Connection class and to the outbound call setup message.

Note: some OSP support code is in/from OpenH323, such as using external call identifier.

BTW, chan_h323.cxx svn 47575 has some problems for compiling. I had reported it on dev mail list. It does not been caused by this patch.

Thanks.


****** ADDITIONAL INFORMATION ******

Disclaimer signed by TransNexus, Inc. 1/27/05
Comments:By: Paul Cadach (pcadach) 2007-01-24 00:45:52.000-0600

Did you tried Transnexus OSP support code included in latest OpenH323 library? Could you please describe OSP interactions in your code (OSP token, etc.) in comparsion with existing OSP support in OpenH323?

By: Paul Cadach (pcadach) 2007-01-24 01:05:31.000-0600

Your code
+ if (ospToken.GetSize() != 0) {
+ setup.IncludeOptionalField(H225_Setup_UUIE::e_tokens);
+ H225_ArrayOf_ClearToken& clearTokens = setup.m_tokens;
+ PINDEX tokenCount = clearTokens.GetSize();
+ clearTokens.SetSize(tokenCount + 1);
+ H235_ClearToken& clearToken = clearTokens[tokenCount];
+ clearToken.m_tokenOID = OpalOSP::ETSIXMLTokenOID;
+ clearToken.IncludeOptionalField(H235_ClearToken::e_nonStandard);
+ clearToken.m_nonStandard.m_nonStandardIdentifier = OpalOSP::ETSIXMLTokenOID;
+ clearToken.m_nonStandard.m_data = ospToken;
+ }
looks like
void OpalOSP::Transaction::DestinationInfo::InsertToken(H225_ArrayOf_ClearToken & clearTokens, BOOL useCiscoBug)
from opalosp.cxx with useCiscoBug parameter set to true.

Also,
+ if (setupPDU.m_h323_uu_pdu.m_h323_message_body.GetTag() == H225_H323_UU_PDU_h323_message_body::e_setup) {
+ const H225_Setup_UUIE& setup = setupPDU.m_h323_uu_pdu.m_h323_message_body;
+ if (setup.HasOptionalField(H225_Setup_UUIE::e_tokens)) {
+ const H225_ArrayOf_ClearToken& clearTokens = setup.m_tokens;
+ PINDEX tokenCount = clearTokens.GetSize();
+ for (PINDEX i = 0; i < tokenCount; i++) {
+ H235_ClearToken& clearToken = clearTokens[i];
+ if (clearToken.m_tokenOID == OpalOSP::ETSIXMLTokenOID &&
+ clearToken.HasOptionalField(H235_ClearToken::e_nonStandard) &&
+ clearToken.m_nonStandard.m_nonStandardIdentifier == OpalOSP::ETSIXMLTokenOID)
+ {
+ PBYTEArray token = clearToken.m_nonStandard.m_data;
+ cd->ospToken = (char*)malloc(OSPTOKENSIZE);
+ if (cd->ospToken != NULL) {
+ ast_base64encode(cd->ospToken, token.GetPointer(), token.GetSize(), OSPTOKENSIZE - 1);
+ }
+ break;
+ }
+ }
+ }
+ }
is very similar to BOOL OpalOSP::Transaction::ValidationInfo::ExtractToken(const H225_ArrayOf_ClearToken & clearTokens) called from BOOL OpalOSP::Transaction::ValidationInfo::Extract(const H323SignalPDU & setupPDU).

Could we try to re-use OpenH323's code instead of our one?


WBR,
Paul.

By: Serge Vecher (serge-v) 2007-01-29 15:24:18.000-0600

I think homesick works for Transnexus ...

By: Di-Shi Sun (homesick) 2007-01-31 00:11:24.000-0600

Sorry for the delay. I just come back from vacation.

Craig had implemented a full featured OSP client end in Open H323 library. The code is in opalosp.cxx and some in other source files.  

We did not use this OSP client end implementation for two reasons.  First, we implemented the OSP client in Asterisk in a different way. We moved all channel independent code to osplookup application. The channel drivers only provide two or three simple functions or APIs to insert/retrieve OSP token, insert call ID, etc. It is reasonable to disable the OSP client implementation in Open H323 library by adding --disable-transnexusosp parameter to configure. It will simplify the code. That also means we have to write the OSP support code by ourself. Fortunately, the code is very simply and we have Craig's code as reference. Second, working for both Open H323 library and H323 channel driver of Asterisk projects at the same time will seriously delay the OSP client implementation for Asterisk. So, we did not re-use the OSP support code in Open H323 library.

By: Paul Cadach (pcadach) 2007-03-16 00:45:17

Could you please contact me off-list to discuss this patch?

By: Di-Shi Sun (homesick) 2007-03-16 01:46:39

Hi PCadach, you can reach me at di-shi at transnexus.com.

By: jmls (jmls) 2008-02-06 04:27:32.000-0600

can this be closed ?

By: Jason Parker (jparker) 2008-03-05 16:28:10.000-0600

Reopen if there is any further progress.