[OpenSIPStack] MWI Notify
Brought to you by:
joegenbaclor
|
From: Jamieson, W. W <jam...@RL...> - 2009-04-16 13:50:05
|
I'm really after sending an MWI Notify and I'm using the MWIResource and MWIPackage classes. It's an unsolicited Notify so I can't see why I need a subscription but that's the way the classes were written, I think.
For now, I have given up on the two MWI classes. This is what I have:
Make a SIPMessage called notify which I fill with all the fields I see defined in RFC 3842 (MWI)
... (code omitted)
Make a sessionManager
B2BUserAgent ua("MWI");
RFC3265ClientManager sessionMgr(ua, "MWI", 1, 1024 * 2);
Make a SIPSession:
RFC3265ClientManager::SubscriptionInfo info("reg", fromURI, "application/reginfo+xml"); // stole this so not sure what the args are
OString sessionId = ParserTools::GenGUID();
SIPSession *session = sessionMgr.CreateClientSession(info, sessionId);
// now I have the sessionId for the notify CallId which I add to the notify SIPMessage
Send the request
sessionMgr.SendRequest(invite);
Though it compiles, I know it's not right since I'm not getting anything out on the wire. Am I even close? I thought of using this instead of the call to SendRequest but it doesn't seem right to call an event procedure directly...
sessionMgr.OnUnsolicitedNotification(invite);
It's very frustrating to work with no samples or docs, it's like trying to reverse engineer the whole thing. Can someone steer me to where I might find these?
billjam
|