< 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 ?


Because receiving a NOTIFY inside of an INVITE dialog is non-standard, you can use protocol repair to 'trick' DUM into thinking the NOTIFY is actually an INFO, and then use the onInfo(..) handler.  You can do this by creating a new class that inherits from DumFeature, and manually changing the RequestLine and CSeq inside of the process(..) in your DumFeature:

 

          request->header(h_RequestLine).method() = INFO;

          request->header(h_CSeq).method() = INFO;

 

You will probably want to test for the presence of the 'talk' Event header value so that you don't mess up regular NOTIFYs.  And, you'll need both an incoming and an outgoing DumFeature, since you'll also want to repair any response to the INFO that you might send -- so that it shows up as a response to the NOTIFY when it gets sent out on the wire.

 

Jeremy

 

From: resiprocate-users-bounces@xxxxxxxxxxxxxxx [mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxx] On Behalf Of Karlsson
Sent: May-27-10 8:50 AM
To: maodong hu
Cc: resiprocate-users@xxxxxxxxxxxxxxx
Subject: Re: [reSIProcate-users] which callback will be fired once a in-dialog NOTIFY message arrived ?

 

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