Re: how to get a message channel from incoming SIPResponse?
"Jeroen van Bemmel" <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <006001c70c1c$82a186f0$0601a8c0@BEMBUSTER> |
Park,
MessageChannel, SIPRequest and others are all implementation classes which
are not part of the JAIN API. It is not recommended / supported / portable
to base your implementation on these
You are probably better of using the transport in the topmost Via header,
i.e.
boolean isSecure( Message m ) {
ViaHeader via = (ViaHeader) m.getHeader( ViaHeader.NAME );
if (via!=null) {
return ListeningPoint.TLS.equalsIgnoreCase( via.getTransport() );
}
return false;
}
Regards,
Jeroen
Young-Geun Park wrote:
> Thank you for your answer.
>
> I am implementing sip application server based on the sip
> servlet(jsr116). Sip servlet wants to know whether sip
> request/response is secure.
>
> So, I planed to decide that by comparing with a message channel
> instance. If messageChannel instanceof TLSMessageChannel is true, the
> request/response would true.
>
> As I said before, SIPRequest can get a message channel, but
> SIPResponse cannot.
>
> Is there any idea?
>
> Regards,
>
> Park
> -----Original Message-----
> From: M. Rangnathan [mailto:[email protected]]
> Sent: Saturday, November 18, 2006 1:09 AM
> To: Young-Geun Park
> Cc: [email protected]
> Subject: Re: [nist-sip] how to get a message channel from incoming
> SIPResponse?
>
>
> You may be using the API at the wrong level, unless you are building
> some extension features for which you need to touch the implementation
> objects. If you are building a JAIN-SIP application, you should not
> need
> to access the MessageChannel.
>
> Regards,
>
> Ranga
>
> Young-Geun Park wrote:
>
>> Hi, all
>>
>> Is there anyone who gives me how to get a message channel from a
>> incoming SIPResponse?
>>
>> In SIPTransactionStack.newSIPServerResponse() method, there is no a
>> method related to the message channel such as setMessageChannel.
>>
>> In case of a incoming SIPRequest, there is getMessageChannel()
>> method:
>>
>> In SIPTransactionStack.newSIPServerRequest() method, there is
>> requestReceived.setMessageChannel(requestMessageChannel).
>>
>> Regards,
>>
>> Park
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> nist-sip mailing list
>> [email protected]
>> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip