2008/8/5 Timo Bruhn <[EMAIL PROTECTED]>:
> The Problem now is, that sofia-sip increases the sdp version in o-line by two 
> and
> not by one as stated in RFC 3264 section 8:
>
> "When issuing an offer that modifies the session,
>  the "o=" line of the new SDP MUST be identical to that in the
>  previous SDP, except that the version in the origin field MUST
>  increment by one from the previous SDP. "
>
> Version in my INVITE:              4138572302028389133
> Version in my Answer to Re-INVITE: 4138572302028389135

The section 8 concerns only the version number in offer, not the
version number in answer.

> What happens now is, that the ISP ignores my sdp. Seems that they have
> a very strict implementation there...

Bit too strict...

> Can anyone please give me a hint on how to fix this problem?

The offer_answer_step() now increments the version number when it
processes the answer. Please try the attached patch, I'll try to see
if it breaks anything and submit it to darcs, too.

-- 
Pekka.Pessi mail at nokia.com
diff -c /home/ppessi/S/sofia-sip/_darcs/pristine/libsofia-sip-ua/soa/soa_static.c /home/ppessi/S/sofia-sip/libsofia-sip-ua/soa/soa_static.c
*** /home/ppessi/S/sofia-sip/_darcs/pristine/libsofia-sip-ua/soa/soa_static.c	Wed Aug  6 18:57:35 2008
--- /home/ppessi/S/sofia-sip/libsofia-sip-ua/soa/soa_static.c	Wed Aug  6 18:57:35 2008
***************
*** 87,92 ****
--- 87,95 ----
    int  *sss_u2s;
    /** Mapping from session SDP m= lines to user SDP m= lines */
    int *sss_s2u;
+ 
+   /** Our latest offer or answer */
+   sdp_session_t *sss_latest;
  }
  soa_static_session_t;
  
***************
*** 1103,1108 ****
--- 1106,1113 ----
  
    int *u2s = NULL, *s2u = NULL, *tbf;
  
+   sdp_session_t *latest = NULL, *previous = NULL;
+ 
    char const *phrase = "Internal Media Error";
  
    su_home_t tmphome[SU_HOME_AUTO_SIZE(8192)];
***************
*** 1327,1336 ****
  
    if (ss->ss_local->ssd_sdp != local &&
        sdp_session_cmp(ss->ss_local->ssd_sdp, local)) {
!     /* We have modified local session: update origin-line */
!     if (local->sdp_origin != o)
!       *o = *local->sdp_origin, local->sdp_origin = o;
!     o->o_version++;
  
      /* Do sanity checks for the created SDP */
      if (!local->sdp_subject)	/* s= is mandatory */
--- 1332,1359 ----
  
    if (ss->ss_local->ssd_sdp != local &&
        sdp_session_cmp(ss->ss_local->ssd_sdp, local)) {
!     int bump;
! 
!     switch (action) {
!     case generate_offer:
!       bump = sdp_session_cmp(local, sss->sss_latest);
!       break;
!     case generate_answer:
!       bump = 1;
!       break;
!     case process_answer:
!     default:
!       bump = 0;
!       break;
!     }
! 
!     if (bump) {
!       /* Upgrade the version number 
! 	 if the offer or answer SDP has been modified */
!       if (local->sdp_origin != o)
! 	*o = *local->sdp_origin, local->sdp_origin = o;
!       o->o_version++;
!     }
  
      /* Do sanity checks for the created SDP */
      if (!local->sdp_subject)	/* s= is mandatory */
***************
*** 1362,1367 ****
--- 1385,1395 ----
  
        goto internal_error;
      }
+ 
+     if (bump) {
+       latest = sdp_session_dup(ss->ss_home, ss->ss_local->ssd_sdp);
+       previous = sss->sss_latest;
+     }
    }
  
    if (u2s) {
***************
*** 1373,1382 ****
--- 1401,1412 ----
    switch (action) {
    case generate_offer:
      ss->ss_local_user_version = user_version;
+     sss->sss_latest = latest;
      break;
    case generate_answer:
      ss->ss_local_user_version = user_version;
      ss->ss_local_remote_version = remote_version;
+     sss->sss_latest = latest;
      break;
    case process_answer:
      ss->ss_local_remote_version = remote_version;
***************
*** 1384,1389 ****
--- 1414,1422 ----
      break;
    }
  
+   if (previous)
+     su_free(ss->ss_home, previous);
+ 
    su_home_deinit(tmphome);
    return 0;
  
-------------------------------------------------------------------------
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=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to