Summary:ASTERISK-19446: Improvement to MWI (with Teksavvy Tektalk service (Metaswitch Networks equipment)
Reporter:Daryl Boyd (dboyd)Labels:
Date Opened:2012-02-28 22:27:23.000-0600Date Closed:2017-12-15 10:00:13.000-0600
Versions: Frequency of
Environment:Attachments:( 0) mwi_patch
Description:(Disclaimer: This is my first patch for asterisk, and I learnt SIP this week to figure this out...)

When subscribing to MWI the subscription would last for less than 15min after which an unknown dialog error would eventually occur.
After some debug, it traced it to the switch sending a NOTIFY with a "Subscription-State: terminated;reason=timeout" line in it. Asterisk did not handle this line, it would think its dialog is still good and try and reuse it. I modified asterisk to handle these requests, by closing the dialog and re-registering.
I also then got issues with asterisk complaining about bad sequence numbers with NOTIFY packets. Looking in the standards it seems that asterisk is assuming that CSeq numbers for NOTIFY packets must be sequential. My reading shows otherwise, and this switch does not present them in a sequential order. I patched the code to ignore order just for NOTIFY messages.

I have a patch that when applied has been running MWI successfully with TekTalk for 2 weeks with no issues.
Comments:By: Matt Jordan (mjordan) 2012-02-29 08:24:15.787-0600

If you want to have this patch considered for Asterisk, the next steps are:

1) Sign a contributor license agreement
2) Attach the patch as a unified diff on this issue.  The patch must be developed against trunk.
3) Once the patch is on this issue, post the patch to reviewboard for developer review.

Instructions on posting to review board can be found here:


Note that if you need a review board account, you can contact me at mjordan@digium.com.

By: Matt Jordan (mjordan) 2012-04-02 15:24:58.049-0500

Issue reporter never provided feedback.  I've acknowledged this issue, but the previously mentioned steps need to be followed for this patch to be considered for inclusion.

By: Daryl Boyd (dboyd) 2012-04-11 08:12:48.766-0500

Been rather busy... I will try and look at this again. Is the diff good, or do I need to do it against another version. You mentioned trunk. what svn number is trunk ie: what do I check out?

By: Corey Farrell (coreyfarrell) 2017-12-15 10:00:13.539-0600

Suspending ticket for inactivity.  Feel free to reopen by posting an updated patch and following Code Review instructions \[1\].

\[1\] https://wiki.asterisk.org/wiki/display/AST/Code+Review