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

Re: [reSIProcate-users] which callback will be fired once a in-dialog NOTIFY message arrived ?


I checked the source code, seems resip does not allows the NOTIFY message with a "event" header in a dialog, dialog.cxx, line 566

 else
                  {
                     if (mInviteSession != 0 && (!msg.exists(h_Event) || msg.header(h_Event).value() == "refer") && 
                         mDum.getClientSubscriptionHandler("refer")!=0) 
                     {
                        DebugLog (<< "Making subscription from NOTIFY: " << msg);
                        ClientSubscription* sub = makeClientSubscription(msg);
                        mClientSubscriptions.push_back(sub);
                        ClientSubscriptionHandle client = sub->getHandle();
                        mDum.mInviteSessionHandler->onReferAccepted(mInviteSession->getSessionHandle(), client, msg);      
                        sub->dispatch(request);
                     }
                     else
                     {
                        SharedPtr<SipMessage> response(new SipMessage);
                        makeResponse(*response, msg, 406);
                        send(response);
                     }



On Thu, May 27, 2010 at 11:50 PM, Karlsson <boost.regex@xxxxxxxxx> wrote:
Thank you Scott,  but in my code I have been added below long ago:

mMasterProfile->addSupportedMethod(INVITE);
mMasterProfile->addSupportedMethod(ACK);
mMasterProfile->addSupportedMethod(CANCEL);
mMasterProfile->addSupportedMethod(OPTIONS);
mMasterProfile->addSupportedMethod(BYE);
mMasterProfile->addSupportedMethod(REFER);
mMasterProfile->addSupportedMethod(NOTIFY);
mMasterProfile->addSupportedMethod(MESSAGE);
mMasterProfile->addSupportedMethod(REGISTER);
mMasterProfile->addSupportedMethod(SUBSCRIBE);
mMasterProfile->addSupportedMethod(INFO);


mMasterProfile->addSupportedMimeType(NOTIFY, Mime("message", "sipfrag"));
mMasterProfile->addSupportedMimeType(NOTIFY, Mime("application", "simple-message-summary"));
mMasterProfile->addSupportedMimeType(NOTIFY, Pidf::getStaticType());




On Thu, May 27, 2010 at 11:24 PM, maodong hu <hhmmdd@xxxxxxx> wrote:
I think you may need add mProfile->addSupportedMethod(NOTIFY);
and if you have content in NOTIFY also need add like
mProfile->addSupportedMimeType(NOTIFY, Mime("message", "sipfrag"));

2010/5/27 Karlsson <boost.regex@xxxxxxxxx>
Hi all, as below log, which callback will be fired once a in-dialog NOTIFY message arrived ?

Note: I just has the log, can't test with this server.

Thanks


INVITE sip:1128@xxxxxxxxxxxxxx:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 110.15.7.138:5060;branch=z9hG4bK67de75d73a794ea
Via: SIP/2.0/UDP 192.168.20.108:5060;branch=z9hG4bKb50526655
From: <sip:1108@xxxxxxxxxxxxxx:5060>;tag=de5da391aa20c54
CSeq: 728354 INVITE
Allow: INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, INFO, OPTIONS, SUBSCRIBE
Max-Forwards: 70
Privacy: none
P-Asserted-Identity: <sip:1108@xxxxxxxxxxxxxx:5060>
User-Agent: Hexus of UNICN Inc. v2.11.1005.131
Content-Type: application/sdp
Content-Length: 250

v=0
o=DNVoIP 743215 743215 IN IP4 110.15.7.138
s=Hexus Media Session
c=IN IP4 110.15.7.138
t=0 0
m=audio 45972 RTP/AVP 0 8 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20


SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 110.15.7.138:5060;branch=z9hG4bK67de75d73a794ea
Via: SIP/2.0/UDP 192.168.20.108:5060;branch=z9hG4bKb50526655
Contact: <sip:1128@xxxxxxxxxxxxxx:5060;transport=udp>
To: <sip:1128@xxxxxxxxxxxxxx:5060>;tag=b1376a45
From: <sip:1108@xxxxxxxxxxxxxx:5060>;tag=de5da391aa20c54
CSeq: 728354 INVITE
User-Agent: UNICN SoftPhone.Unicn 2.11.1005.251
Content-Length: 0



NOTIFY sip:1128@xxxxxxxxxxxxxx:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 110.15.7.138:5060;branch=z9hG4bK954b476656194a0
From: <sip:1108@xxxxxxxxxxxxxx:5060>;tag=de5da391aa20c54
To: <sip:1128@xxxxxxxxxxxxxx:5060>;tag=b1376a45
CSeq: 728364 NOTIFY
Event: talk
Max-Forwards: 70
Privacy: none
P-Asserted-Identity: <sip:1108@xxxxxxxxxxxxxx:5060>
User-Agent: Hexus of UNICN Inc. v2.11.1005.131
Content-Length: 0



SIP/2.0 406 Not Acceptable
Via: SIP/2.0/UDP 110.15.7.138:5060;branch=z9hG4bK954b476656194a0
To: <sip:1128@xxxxxxxxxxxxxx:5060>;tag=b1376a45
From: <sip:1108@xxxxxxxxxxxxxx:5060>;tag=de5da391aa20c54
CSeq: 728364 NOTIFY
User-Agent: UNICN SoftPhone.Unicn 2.11.1005.251
Content-Length: 0

_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/



--
Best Regards

Maodong Hu