< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Working around an MWI notify incompatibility

[Apologies if this is a duplicate; I don't see the original.]

I'm working with a sip switch which generates MWI notifies which resip
doesn't like.

The switch's upstream does not want to risk breaking existing installs
by changing what it sends.

The easiest fix for this is to relax how resip parses such notifies to
ignore extra lines, on the theory of liberal acceptance.

Resip currently expects exactly what rfc 3842 specifies.  What the
switch sends covers both rfc 3842 and the older style of MWI.

Currently, in resip/stack/MessageWaitingContents.cxx resip basically
looks at the first letter on the line, skips past the colon, and then
(ignoring whitespace) looks for \d+/\d+.

And it fails if there are more than one such line with the same first

This switch sends lines like:

  Voicemail: 2/0
  Voice-Message: 2/0

which both match /^v.*:\d+/\d+/i.

One way around this impass would be to have resip accept more than one
line with the same first letter, allowing the latter lines to override
the earlier.

Or, instead of just skipping to the colon look for "essage" and only
then for the colon.  Skipping any lines which do not have "essage".

Or you could explicitly skip /^voicemail:/i.

I can provide a pull request, but would prefer some indication of
which change you'd find most acceptable before I write one.

James Cloos <cloos@xxxxxxxxxxx>         OpenPGP: 0x997A9F17ED7DAEA6