[reSIProcate] Working around an MWI notify incompatibility
Scott Godin
sgodin at sipspectrum.com
Thu Feb 23 14:49:09 CST 2017
Hi James
I like the idea of being tolerant on what we accept (where possible), but
standards based on what we send.
I like this option the best:
>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".
Thanks for helping out!
Scott
On Wed, Feb 22, 2017 at 1:45 AM, James Cloos <cloos at jhcloos.com> wrote:
> [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
> letter.
>
> 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.
>
> -JimC
> --
> James Cloos <cloos at jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20170223/9b35a023/attachment.htm>
More information about the resiprocate-devel
mailing list