#515 Fix PIDF aggregation

trunk
closed-accepted
saghul
modules (454)
7
2012-05-17
2012-04-25
saghul
No

Hi,

The current code for PIDF aggregation produces invalid documents (ie they don't validate) mainly due to the ordering of XML elements in the resulting document. There is also no way to prevent OpenSIPS from automatically generating a PIDF when a PUBLISH with Expires: 0 is received.

The attached patch adds a new modparam to presence_xml 'generate_offline_body' (enabled by default) to control if offline PIDFs should be generated automatically. It also refactors the way PIDFs are aggregated to ensure the order is correct and duplicates are pruned.

Since the patch is quite big, I'll send an email to the -dev mailing list with a detailed explanation of the issues I discovered and how the patch addresses them.

Regards,

--
Saúl Ibarra Corretgé
AG Projects

Discussion

  • Bogdan-Andrei Iancu

    • priority: 5 --> 7
    • assigned_to: nobody --> bogdan_iancu
     
  • Bogdan-Andrei Iancu

    Hi Saúl,

    Thank you for your patch - it looks really complicated (especially the logic behind the changes), so I will ask you straight : have you tested properly the patch ? is it stable ?

    If so, I will go on your hand (as having more experience on the presence_xml stuff than me) and commit the patch.

    Thanks and regards,
    Bogdan

     
  • saghul

    saghul - 2012-05-16

    Hi Bogdan,

    Thanks for looking into this. I did test the patch and it works well with all aggregation tests I did, so I consider it stable. Even if code is complicated, IMHO it's easier to follow now, so if issues arise they should be easy to fix.

    If any issue related to this is reported, feel free to assign it to me, I'll take care of it.

    Kind regards,
    Saúl

     
  • Bogdan-Andrei Iancu

    Hi Saúl,

    OK, perfect - please apply the patch on the relevant versions and close this ticket when done.

    Thanks and regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • assigned_to: bogdan_iancu --> saghul
     
  • saghul

    saghul - 2012-05-16

    Hi Bogdan,

    I'll commit the changes to branches 1.8 and trunk tonight then.

    Regards,

     
  • saghul

    saghul - 2012-05-17
    • status: open --> closed-accepted
     
  • saghul

    saghul - 2012-05-17

    Bogdan,

    I committed it to trunk and 1.8 in revisions 9037-9039. I also updated the README with the new 'generate_offline_body' parameter, you may want to mention that on the ChangeLog.

    Kind regards,

    Saúl

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks