예제 #1
0
        public CallSession takeCallSessionOwnership()
        {
            IntPtr      cPtr = tinyWRAPPINVOKE.InviteEvent_takeCallSessionOwnership(swigCPtr);
            CallSession ret  = (cPtr == IntPtr.Zero) ? null : new CallSession(cPtr, true);

            return(ret);
        }
예제 #2
0
파일: MyAVSession.cs 프로젝트: xolile/boghe
        public MyAVSession(MySipStack sipStack, CallSession session, MediaType mediaType, InviteState callState)
            : base(sipStack)
        {
            this.session = (session == null) ? new CallSession(sipStack) : session;
            base.mediaType = mediaType;
            this.state = callState;

            // commons
            base.init();

            // SigComp
            base.SigCompId = sipStack.SigCompId;

            // 100rel
            this.session.set100rel(true); // will add "Supported: 100rel"

            /* 3GPP TS 24.173
            *
            * 5.1 IMS communication service identifier
            * URN used to define the ICSI for the IMS Multimedia Telephony Communication Service: urn:urn-7:3gpp-service.ims.icsi.mmtel.
            * The URN is registered at http://www.3gpp.com/Uniform-Resource-Name-URN-list.html.
            * Summary of the URN: This URN indicates that the device supports the IMS Multimedia Telephony Communication Service.
            *
            * Contact: <sip:[email protected];gr=urn:uuid:xxx;comp=sigcomp>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
            * Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
            * P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel
            */
            this.session.addCaps("+g.3gpp.icsi-ref", "\"urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel\"");
            this.session.addHeader("Accept-Contact", "*;+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel\"");
            this.session.addHeader("P-Preferred-Service", "urn:urn-7:3gpp-service.ims.icsi.mmtel");
        }
예제 #3
0
 internal static HandleRef getCPtr(CallSession obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
예제 #4
0
 internal static HandleRef getCPtr(CallSession obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
예제 #5
0
파일: MyAVSession.cs 프로젝트: xolile/boghe
        public static MyAVSession TakeIncomingSession(MySipStack sipStack, CallSession session, twrap_media_type_t mediaType, SipMessage sipMessage)
        {
            MediaType media;

            lock (MyAVSession.sessions)
            {
                switch (mediaType)
                {
                    case twrap_media_type_t.twrap_media_audio:
                        media = MediaType.Audio;
                        break;
                    case twrap_media_type_t.twrap_media_video:
                        media = MediaType.Video;
                        break;
                    case twrap_media_type_t.twrap_media_audiovideo:
                        media = MediaType.AudioVideo;
                        break;
                    default:
                        return null;
                }
                MyAVSession avSession = new MyAVSession(sipStack, session, media, InviteState.INCOMING);
                if (sipMessage != null)
                {
                    avSession.RemotePartyUri = sipMessage.getSipHeaderValue("f");
                }
                MyAVSession.sessions.Add(avSession.Id, avSession);
                return avSession;
            }
        }