Send BYE after sending ACK message ( when making a video call)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all, 

 

I want to modify pjsip for support video call ( needed only for negotiate in
context : invite -> 200Ok --> ACK).

 

I have modified as follow :

            - In endpoint.c, i added pjmedia_endpt_create_audio_sdp(),
pjmedia_endpt_create_video_sdp() into pjmedia_endpt_create_sdp() to
create 2 thread: audio and video.

 

       + status = pjmedia_endpt_create_audio_sdp(endpt, pool,

                                            &sock_info[0], 0, &m);

 

      if (status != PJ_SUCCESS)

            return status;

      sdp->media[sdp->media_count++] = m;

 

 

 

    /* The remaining stream, if any, are videos (by convention as well) */

            for (i=1; i<stream_cnt; ++i) {

       status = pjmedia_endpt_create_video_sdp(endpt, pool,

                                         &sock_info[i], 0, &m);

             if (status != PJ_SUCCESS)

 

      + pjmedia_endpt_create_sdp() in pjsua_media.c, pjsua_core.c and
pjsual_call.c just change stream_cnt=2;

 

- Result: 

      

      + Making a video call to Xlite: Accept Video call in Xlite, Xlite sent
200OK to me, then pjsip  send ACK to Xlite, Xlite send 200OK,

      After pjsip send Bye immediately.

      

      + Making a audio call normally.

 

 

- Here is the INVITE, 200 OK and BYE session when making a video call:

 

 

 + INVITE session:

INVITE sip:115 at 192.168.11.28:57224;rinstance=5e904c9dbce32cf4 SIP/2.0

Record-Route: <sip:192.168.2.51;lr=on>

Via: SIP/2.0/UDP 192.168.2.51;branch=z9hG4bKf081.b56f00f5.0

Via: SIP/2.0/UDP
192.168.2.240:42912;received=192.168.2.240;rport=42912;branch=z9hG4bKPjPicj6
TFTK3PBMReI4X5IFrIOqIIz4ig3

Max-Forwards: 69

From: <sip:112@192.168.2.51>;tag=JK8oP5jMjY9ctewNwCEV8ovzejYVGd2V

To: <sip:115 at 192.168.2.51>

Contact: <sip:112 at 192.168.2.240:42912;transport=UDP;ob>

Call-ID: MTFvhmrhDzzXptmC03Ys8VmQ6cN48bWJ

CSeq: 24805 INVITE

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER,
MESSAGE, OPTIONS

Supported: replaces, 100rel, timer, norefersub

Session-Expires: 1800

Min-SE: 90

User-Agent: CSipSimple r86 / buzz-8

Content-Type: application/sdp

Content-Length:   421

v=0

o=- 3523666209 3523666209 IN IP4 192.168.1.109

s=pjmedia

c=IN IP4 192.168.1.109

t=0 0

a=X-nat:0

m=audio 4000 RTP/AVP 9 104 103 102 0 8 101

a=sendrecv

a=rtpmap:9 G722/8000

a=rtpmap:104 speex/32000

a=rtpmap:103 speex/16000

a=rtpmap:102 speex/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

m=video 32270 RTP/AVP 105

a=sendrecv

a=rtpmap:105 h263/90000

 

 

 

200OK ( Xlite)

+ 200 OK session:

SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.168.2.51;branch=z9hG4bKf081.b56f00f5.0

Via: SIP/2.0/UDP
192.168.2.240:42912;received=192.168.2.240;rport=42912;branch=z9hG4bKPjPicj6
TFTK3PBMReI4X5IFrIOqIIz4ig3

Record-Route: <sip:192.168.2.51;lr>

Contact: <sip:115 at 192.168.11.28:57224;rinstance=5e904c9dbce32cf4>

To: <sip:115 at 192.168.2.51>;tag=8b3225ce

From: <sip:112@192.168.2.51>;tag=JK8oP5jMjY9ctewNwCEV8ovzejYVGd2V

Call-ID: MTFvhmrhDzzXptmC03Ys8VmQ6cN48bWJ

CSeq: 24805 INVITE

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,
INFO

Content-Type: application/sdp

Supported: replaces

User-Agent: X-Lite 4 release 4.1 stamp 63214

Content-Length: 615

v=0

o=- 12959151073121216 1 IN IP4 192.168.11.28

s=CounterPath X-Lite 4.1

c=IN IP4 192.168.11.28

t=0 0

a=ice-ufrag:eb8dab

a=ice-pwd:47b9a5be439f510115b169e20e71f61d

m=audio 63144 RTP/AVP 102 101

a=rtpmap:102 SPEEX/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=sendrecv

a=candidate:1 1 UDP 659136 192.168.11.28 63144 typ host

a=candidate:1 2 UDP 659134 192.168.11.28 63145 typ host

m=video 64328 RTP/AVP 105

a=rtpmap:105 H263/90000

a=fmtp:105 QCIF=1;CIF=1;VGA=2

a=sendrecv

a=candidate:1 1 UDP 659136 192.168.11.28 64328 typ host

a=candidate:1 2 UDP 659134 192.168.11.28 64329 typ host

 

 

ACK message( from pjsip)

 

ACK sip:115 at 192.168.11.28:57224;rinstance=5e904c9dbce32cf4 SIP/2.0

Via: SIP/2.0/UDP 192.168.2.51;branch=z9hG4bKf081.b56f00f5.2

Via: SIP/2.0/UDP
192.168.2.240:42912;received=192.168.2.240;rport=42912;branch=z9hG4bKPjxAK8I
CwCyXMh8yGbj4XBWp8GhzBxlydm

Max-Forwards: 69

From: <sip:112@192.168.2.51>;tag=JK8oP5jMjY9ctewNwCEV8ovzejYVGd2V

To: <sip:115 at 192.168.2.51>;tag=8b3225ce

Call-ID: MTFvhmrhDzzXptmC03Ys8VmQ6cN48bWJ

CSeq: 24805 ACK

Content-Length:  0

 

 

+ BYE Message: (from pjsip, after receive sending ACK to Xlite)

 

#Z0]E@?f3BYE sip:115 at 192.168.11.28:57224;rinstance=5e904c9dbce32cf4 SIP/2.0

Via: SIP/2.0/UDP 192.168.2.51;branch=z9hG4bKc081.fa62ff24.0

Via: SIP/2.0/UDP
192.168.2.240:42912;received=192.168.2.240;rport=42912;branch=z9hG4bKPjQrBkb
EMfPSkn4vplXNfM1Yy.BQqTFmKC

Max-Forwards: 69

From: <sip:112@192.168.2.51>;tag=JK8oP5jMjY9ctewNwCEV8ovzejYVGd2V

To: <sip:115 at 192.168.2.51>;tag=8b3225ce

Call-ID: MTFvhmrhDzzXptmC03Ys8VmQ6cN48bWJ

CSeq: 24806 BYE

Content-Length:  0

 

 

Have any meet this problem, help me?

 

Thanks in advanced.

 

 

pjsip list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110830/31c5eb20/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux