linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] message waiting [SIP-Notify] RFC3842


From: Johnny Ritzer
Subject: Re: [Linphone-developers] message waiting [SIP-Notify] RFC3842
Date: Mon, 21 Sep 2020 10:22:06 -0600

so i think im close.  Using the onNotifyReceived() but what im  noticing  is that  its not pulling the  custom  header  of Messages-Waiting as it shows null.  event.getCustomHeader()

im doing a event.getCustomHeader (i  can see it spit out in logcat. but i dont know which side  of the packet this event is seeing 

public void onNotifyReceived(Core core, Event event, String s, Content content) {
android.util.Log.d(LOGG, "NOTIFY : " + event.getName().toString());
android.util.Log.d(LOGG, "NOTIFY : " + event.getCustomHeader("Content-Type").toString());
android.util.Log.d(LOGG, "NOTIFY : FROM: " + event.getResource().getDisplayName());
android.util.Log.d(LOGG, "NOTIFY : " + event.getCustomHeader("Messages-Waiting").toString());

09-21 08:20:16.854 17950 18213 D LOGG_LM : NOTIFY : message-summary
09-21 08:20:16.854 17950 18213 D LOGG_LM : NOTIFY : application/simple-message-summary
09-21 08:20:16.855 17950 18213 D LOGG_LM : NOTIFY : FROM: mwiapp


09-21 08:30:35.043 18691 19168 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference

though what i do notice is that  in the SIP header theres a empty line  so  does it  think   the  last  one is Content-Length and doesn't try 

09-21 09:14:23.744 27090 27242 I Linphone Mini: Content-Type: application/simple-message-summary
09-21 09:14:23.744 27090 27242 I Linphone Mini: Subscription-State: active;expires=30
09-21 09:14:23.744 27090 27242 I Linphone Mini: Event: message-summary
09-21 09:14:23.744 27090 27242 I Linphone Mini: Content-Length: 22
09-21 09:14:23.744 27090 27242 I Linphone Mini:
09-21 09:14:23.744 27090 27242 I Linphone Mini: Messages-Waiting: no


On Sun, Sep 20, 2020 at 8:45 PM Johnny Ritzer <ritztech@gmail.com> wrote:
looking to  wait for the SIP NOTIFY event  in the payload it shows event message-summary

  ....

│Content-Type: application/simple-message-summary
Subscription-State: active;expires=30
Event: message-summary
Messages-Waiting: yes


if maybe waiting for the SIP packet NOTIFY to come in can i just tee off  and build upon IF message-waiting then we can  fire off a blinking indicator/button that  a message is waiting.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]