[Asterisk-Users] Snom 200 MWI Button

Paul Oster devious at minot.com
Sun Feb 8 09:48:33 MST 2004


Well, that definately got me going in the correct direction, I was able to hack chan_sip.c to activate the MWI button for my installation.  It was really quite simple to implement statically... perhaps I'll work on hacking it into the config file and making a more formal patch for chan_sip.c.  But for anyone that needs it, here is my static hack.  Just change the 777 to whatever your voicemail extension is and patch chan_sip.c

Paul


  ----- Original Message ----- *** chan_sip.c  Sun Feb  8 10:35:46 2004
  --- chan_sip.c.new      Sun Feb  8 10:33:35 2004
  ***************
  *** 3087,3092 ****
  --- 3087,3093 ----
          struct sip_request req;
          char tmp[256];
          char tmp2[256];
  +       char tmp3[256];
          char clen[20];
          initreqprep(&req, p, "NOTIFY", NULL);
          add_header(&req, "Event", "message-summary");
  ***************
  *** 3094,3102 ****

          snprintf(tmp, sizeof(tmp), "Messages-Waiting: %s\n", newmsgs ? "yes" : "no");
          snprintf(tmp2, sizeof(tmp2), "Voicemail: %d/%d\n", newmsgs, oldmsgs);
  !       snprintf(clen, sizeof(clen), "%d", strlen(tmp) + strlen(tmp2));
          add_header(&req, "Content-Length", clen);
          add_line(&req, tmp);
          add_line(&req, tmp2);

          if (!p->initreq.headers) {
  --- 3095,3105 ----

          snprintf(tmp, sizeof(tmp), "Messages-Waiting: %s\n", newmsgs ? "yes" : "no");
          snprintf(tmp2, sizeof(tmp2), "Voicemail: %d/%d\n", newmsgs, oldmsgs);
  !       snprintf(tmp3, sizeof(tmp3), "Message-Account: 777\n");
  !       snprintf(clen, sizeof(clen), "%d", strlen(tmp) + strlen(tmp2) + strlen(tmp3));
          add_header(&req, "Content-Length", clen);
          add_line(&req, tmp);
  +       add_line(&req, tmp3);
          add_line(&req, tmp2);

          if (!p->initreq.headers) {

  From: Christian Stredicke 
  To: asterisk-users at lists.digium.com 
  Sent: Sunday, February 08, 2004 1:58 AM
  Subject: RE: [Asterisk-Users] Snom 200 MWI Button


  Please take a look at http://www.ietf.org/internet-drafts/draft-ietf-sipping-mwi-04.txt. The snom phone tries to use the Message-Account line, if it's present; otherwise it will take the From header: 



  Messages-Waiting: yes

  Message-Account: sip:alice at vmail.example.com

  Voice-Message: 2/8 (0/2)



  Hope this helps,



  Christian 



  -----Original Message-----
  From: asterisk-users-admin at lists.digium.com [mailto:asterisk-users-admin at lists.digium.com] On Behalf Of Paul Oster
  Sent: Sunday, February 08, 2004 2:22 AM
  To: asterisk-users at lists.digium.com
  Subject: [Asterisk-Users] Snom 200 MWI Button



  I'm trying to get the MWI button to work with my Asterisk configuration.  The snom is accepting and responding to the Message indications from *, but when I press the MWI button, it is dialing my extension (the one with the voice mail on it).



  I'm wondering if there is a way to specify what extension to dial to check email in the configuration, either the phone, or * itself.



  Asterisk Version 1/30/2003 checked out and compiled this evening

  Snom Version 2.03o (most recent auto-update)



  Any help would be greatly appreciated.  At one point Mark had talked about adding a voicemail=XXXX directive in sip.conf on the mailing list at one point, however grepping the code doesn't reveal a feature like that at this time.



  Anyone have success in getting the MWI button to work on Snoms?  If so I would LOVE to hear from you.



  Paul M. Oster


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040208/88db7029/attachment.htm


More information about the asterisk-users mailing list