/[resiprocate]/main/resip/dum/Dialog.cxx
ViewVC logotype

Annotation of /main/resip/dum/Dialog.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2941 - (hide annotations) (download)
Mon Jun 7 00:44:01 2004 UTC (15 years, 6 months ago) by jason
Original Path: main/sip/resiprocate/dum/Dialog.cxx
File size: 19727 byte(s)
refactored Handle code
streamlined header includes

1 davidb 2603 #include "resiprocate/Contents.hxx"
2 jason 2614 #include "resiprocate/Helper.hxx"
3 jason 2885 #include "resiprocate/SipMessage.hxx"
4     #include "resiprocate/dum/BaseCreator.hxx"
5 jason 2941 #include "resiprocate/dum/ClientInviteSession.hxx"
6 jason 2885 #include "resiprocate/dum/ClientOutOfDialogReq.hxx"
7 jason 2941 #include "resiprocate/dum/ClientRegistration.hxx"
8     #include "resiprocate/dum/ClientSubscription.hxx"
9 jason 2885 #include "resiprocate/dum/Dialog.hxx"
10     #include "resiprocate/dum/DialogUsageManager.hxx"
11     #include "resiprocate/dum/InviteSessionCreator.hxx"
12 jason 2941 #include "resiprocate/dum/ServerInviteSession.hxx"
13     #include "resiprocate/dum/ServerOutOfDialogReq.hxx"
14     #include "resiprocate/dum/ServerRegistration.hxx"
15     #include "resiprocate/dum/ServerSubscription.hxx"
16     #include "resiprocate/dum/ClientPublication.hxx"
17     #include "resiprocate/dum/ServerPublication.hxx"
18 davidb 2603 #include "resiprocate/os/Logger.hxx"
19    
20     #define RESIPROCATE_SUBSYSTEM Subsystem::DUM
21    
22 ken 2520 using namespace resip;
23     using namespace std;
24    
25 derek 2867 Dialog::Dialog(DialogUsageManager& dum, const SipMessage& msg, DialogSet& ds)
26 jason 2577 : mId(msg),
27     mDum(dum),
28 derek 2867 mDialogSet(ds),
29 jason 2588 mClientSubscriptions(),
30     mServerSubscription(0),
31     mInviteSession(0),
32     mClientRegistration(0),
33     mServerRegistration(0),
34     mClientPublication(0),
35     mServerPublication(0),
36 jason 2614 mClientOutOfDialogRequests(),
37     mServerOutOfDialogRequest(0),
38 jason 2588 mType(Fake),
39     mCallId(msg.header(h_CallID)),
40     mRouteSet(),
41 jason 2611 mLocalContact(),
42 jason 2577 mLocalCSeq(0),
43     mRemoteCSeq(0),
44 jason 2588 mRemoteTarget()
45 jason 2577 {
46 davidb 2603 assert(msg.isExternal());
47 jason 2577
48 derek 2936
49 jason 2577 if (msg.isRequest()) // UAS
50     {
51     const SipMessage& request = msg;
52    
53     switch (request.header(h_CSeq).method())
54     {
55     case INVITE:
56 jason 2611 mType = Invitation;
57     break;
58    
59 davidb 2603 case SUBSCRIBE:
60 jason 2611 case REFER:
61     case NOTIFY:
62     mType = Subscription;
63     break;
64    
65     default:
66     mType = Fake;
67     }
68    
69     mRouteSet = request.header(h_RecordRoutes); // !jf! is this right order
70    
71     switch (request.header(h_CSeq).method())
72     {
73     case INVITE:
74     case SUBSCRIBE:
75     case REFER:
76 jason 2577 if (request.exists(h_Contacts) && request.header(h_Contacts).size() == 1)
77     {
78 davidb 2603 const NameAddr& contact = request.header(h_Contacts).front();
79 jason 2577 if (isEqualNoCase(contact.uri().scheme(), Symbols::Sips) ||
80     isEqualNoCase(contact.uri().scheme(), Symbols::Sip))
81     {
82 jason 2611 mLocalContact = NameAddr(request.header(h_RequestLine).uri()); // update later when send a request
83 jason 2577 mRemoteTarget = contact;
84     }
85     else
86     {
87 davidb 2603 InfoLog(<< "Got an INVITE or SUBSCRIBE with invalid scheme");
88     DebugLog(<< request);
89 jason 2611 throw Exception("Invalid scheme in request", __FILE__, __LINE__);
90 jason 2577 }
91     }
92     else
93     {
94     InfoLog (<< "Got an INVITE or SUBSCRIBE that doesn't have exactly one contact");
95     DebugLog (<< request);
96 jason 2611 throw Exception("Too many (or no contact) contacts in request", __FILE__, __LINE__);
97 jason 2577 }
98     break;
99 davidb 2603 default:
100     break;
101 jason 2577 }
102    
103     mRemoteCSeq = request.header(h_CSeq).sequence();
104 jason 2611 mLocalCSeq = 1;
105 jason 2577
106     }
107     else if (msg.isResponse())
108     {
109     const SipMessage& response = msg;
110 jason 2611
111     switch (msg.header(h_CSeq).method())
112     {
113     case INVITE:
114     mType = Invitation;
115     break;
116    
117     case SUBSCRIBE:
118     case REFER:
119     mType = Subscription;
120     break;
121    
122     default:
123     mType = Fake;
124     }
125    
126 jason 2577 if (response.exists(h_RecordRoutes))
127     {
128     mRouteSet = response.header(h_RecordRoutes).reverse();
129     }
130    
131     switch (response.header(h_CSeq).method())
132     {
133     case INVITE:
134 davidb 2603 case SUBSCRIBE:
135 jason 2611 case REFER:
136 jason 2577 if (response.exists(h_Contacts) && response.header(h_Contacts).size() == 1)
137     {
138 davidb 2603 const NameAddr& contact = response.header(h_Contacts).front();
139 jason 2577 if (isEqualNoCase(contact.uri().scheme(), Symbols::Sips) ||
140     isEqualNoCase(contact.uri().scheme(), Symbols::Sip))
141     {
142 jason 2612 BaseCreator* creator = mDum.findCreator(mId);
143     assert(creator);// !jf! throw or something here
144    
145     mLocalContact = creator->getLastRequest().header(h_Contacts).front();
146 jason 2577 mRemoteTarget = contact;
147     }
148     else
149     {
150     InfoLog (<< "Got an INVITE or SUBSCRIBE with invalid scheme");
151     DebugLog (<< response);
152 jason 2611 throw Exception("Bad scheme in contact in response", __FILE__, __LINE__);
153 jason 2577 }
154     }
155     else
156     {
157     InfoLog (<< "Got an INVITE or SUBSCRIBE that doesn't have exactly one contact");
158     DebugLog (<< response);
159 jason 2611 throw Exception("Too many contacts (or no contact) in response", __FILE__, __LINE__);
160 jason 2577 }
161     break;
162 davidb 2603 default:
163     break;
164 jason 2577 }
165    
166     mLocalCSeq = response.header(h_CSeq).sequence();
167 jason 2611 mRemoteCSeq = 0;
168    
169 jason 2577 }
170 derek 2867 mDialogSet.addDialog(this);
171 jason 2577 }
172    
173 jason 2868 Dialog::~Dialog()
174     {
175 jason 2884 mDialogSet.mDialogs.erase(this->getId());
176 jason 2868 }
177    
178 jason 2588 DialogId
179     Dialog::getId() const
180     {
181     return mId;
182     }
183    
184 davidb 2604 void
185 jason 2891 Dialog::cancel()
186     {
187     mInviteSession->end();
188     }
189    
190     void
191 davidb 2604 Dialog::dispatch(const SipMessage& msg)
192     {
193 jason 2614 if (msg.isRequest())
194 jason 2583 {
195 jason 2614 const SipMessage& request = msg;
196     switch (request.header(h_CSeq).method())
197 jason 2583 {
198 jason 2614 case INVITE: // new INVITE
199     if (mInviteSession == 0)
200     {
201 jason 2885 mInviteSession = makeServerInviteSession(request);
202 jason 2614 }
203     mInviteSession->dispatch(request);
204     break;
205 jason 2583
206 jason 2614 case ACK:
207     case CANCEL:
208     if (mInviteSession == 0)
209     {
210     InfoLog (<< "Drop stray ACK or CANCEL in dialog on the floor");
211     DebugLog (<< request);
212     }
213     else
214     {
215     mInviteSession->dispatch(request);
216     }
217     break;
218    
219     case SUBSCRIBE:
220     case REFER: //!jf! does this create a server subs?
221     if (mServerSubscription == 0)
222     {
223 jason 2885 mServerSubscription = makeServerSubscription(request);
224 jason 2614 }
225    
226     mServerSubscription->dispatch(request);
227     break;
228    
229     case NOTIFY:
230     if (request.header(h_To).exists(p_tag))
231     {
232     ClientSubscription* client = findMatchingClientSub(request);
233     if (client)
234 jason 2612 {
235 jason 2614 client->dispatch(request);
236 jason 2612 }
237     else
238     {
239 jason 2614 BaseCreator* creator = mDum.findCreator(mId);
240     if (creator)
241 jason 2612 {
242 jason 2885 ClientSubscription* sub = makeClientSubscription(request);
243 jason 2614 mClientSubscriptions.push_back(sub);
244     sub->dispatch(request);
245 jason 2612 }
246     else
247     {
248 jason 2887 SipMessage failure;
249     makeResponse(failure, request, 481);
250     mDum.sendResponse(failure);
251 jason 2614 return;
252 jason 2612 }
253     }
254 jason 2614 }
255     else // no to tag - unsolicited notify
256     {
257     assert(mServerOutOfDialogRequest == 0);
258 jason 2885 mServerOutOfDialogRequest = makeServerOutOfDialog(request);
259 jason 2614 mServerOutOfDialogRequest->dispatch(request);
260     }
261     break;
262 jason 2583
263 jason 2614 case PUBLISH:
264     if (mServerPublication == 0)
265     {
266 jason 2885 mServerPublication = makeServerPublication(request);
267 jason 2614 }
268     mServerPublication->dispatch(request);
269     break;
270 jason 2612
271 jason 2614 case REGISTER:
272     if (mServerRegistration == 0)
273     {
274 jason 2885 mServerRegistration = makeServerRegistration(request);
275 jason 2614 }
276     mServerRegistration->dispatch(request);
277     break;
278 jason 2584
279 jason 2614 default:
280     // only can be one ServerOutOfDialogReq at a time
281     assert(mServerOutOfDialogRequest == 0);
282 jason 2885 mServerOutOfDialogRequest = makeServerOutOfDialog(request);
283 jason 2614 mServerOutOfDialogRequest->dispatch(request);
284     break;
285 jason 2583 }
286 jason 2614 }
287     else if (msg.isResponse())
288     {
289     const SipMessage& response = msg;
290 jason 2885 // !jf! should this only be for 2xx responses? !jf! Propose no as an
291     // answer !dcm! what is he on?
292 jason 2614 switch (response.header(h_CSeq).method())
293 jason 2583 {
294 jason 2614 case INVITE:
295     if (mInviteSession == 0)
296     {
297 jason 2885 // #if!jf! don't think creator needs a dispatch
298     //BaseCreator* creator = mDum.findCreator(mId);
299     //assert (creator); // stray responses have been rejected already
300     //creator->dispatch(response);
301     // #endif!jf!
302    
303     mInviteSession = makeClientInviteSession(response);
304     mInviteSession->dispatch(response);
305 jason 2614 }
306     else
307     {
308     mInviteSession->dispatch(response);
309     }
310     break;
311 jason 2584
312 jason 2614 case ACK:
313     case CANCEL:
314     if (mInviteSession != 0)
315     {
316     mInviteSession->dispatch(response);
317     }
318     // else drop on the floor
319     break;
320 jason 2584
321 jason 2614 case SUBSCRIBE:
322     case REFER:
323     {
324     ClientSubscription* client = findMatchingClientSub(response);
325     if (client)
326 jason 2612 {
327 jason 2614 client->dispatch(response);
328 jason 2612 }
329 jason 2614 else
330     {
331 jason 2885 ClientSubscription* sub = makeClientSubscription(response);
332 jason 2614 mClientSubscriptions.push_back(sub);
333     sub->dispatch(response);
334     }
335     break;
336     }
337 jason 2584
338 jason 2614 case PUBLISH:
339 jason 2887 // !jf! could assert that no other usages exist
340 jason 2614 if (mClientPublication == 0)
341     {
342 jason 2885 mClientPublication = makeClientPublication(response);
343 jason 2614 }
344     mClientPublication->dispatch(response);
345     break;
346 jason 2584
347 jason 2614 case REGISTER:
348 jason 2887 // !jf! could assert that no other usages exist
349 jason 2614 if (mClientRegistration == 0)
350     {
351 jason 2885 mClientRegistration = makeClientRegistration(response);
352 jason 2614 }
353     mClientRegistration->dispatch(response);
354     break;
355 jason 2584
356 jason 2614 // unsolicited - not allowed but commonly implemented
357     // by large companies with a bridge as their logo
358     case NOTIFY:
359     case INFO:
360 jason 2612
361 jason 2614 default:
362     {
363     ClientOutOfDialogReq* req = findMatchingClientOutOfDialogReq(response);
364     if (req == 0)
365 jason 2612 {
366 jason 2885 req = makeClientOutOfDialogReq(response);
367 jason 2614 mClientOutOfDialogRequests.push_back(req);
368     }
369     req->dispatch(response);
370     break;
371 jason 2584 }
372 jason 2583 }
373     }
374 jason 2578 }
375    
376 jason 2612
377     ClientSubscription*
378     Dialog::findMatchingClientSub(const SipMessage& msg)
379 jason 2583 {
380 derek 2858 for (std::list<ClientSubscription*>::iterator i=mClientSubscriptions.begin();
381 jason 2612 i != mClientSubscriptions.end(); ++i)
382 jason 2583 {
383 jason 2614 if ((*i)->matches(msg))
384 jason 2612 {
385 jason 2614 return *i;
386 jason 2612 }
387     }
388 jason 2614 return 0;
389 jason 2612 }
390 jason 2585
391 jason 2614 ClientOutOfDialogReq*
392 jason 2612 Dialog::findMatchingClientOutOfDialogReq(const SipMessage& msg)
393     {
394 derek 2858 for (std::list<ClientOutOfDialogReq*>::iterator i=mClientOutOfDialogRequests.begin();
395 jason 2612 i != mClientOutOfDialogRequests.end(); ++i)
396     {
397 jason 2614 if ((*i)->matches(msg))
398 jason 2612 {
399 jason 2614 return *i;
400 jason 2612 }
401 jason 2583 }
402 jason 2614 return 0;
403 jason 2583 }
404    
405 jason 2612
406 jason 2941 InviteSessionHandle
407 davidb 2603 Dialog::findInviteSession()
408 ken 2520 {
409 davidb 2603 if (mInviteSession)
410     {
411     return mInviteSession->getSessionHandle();
412     }
413     else
414     {
415     throw BaseUsage::Exception("no such invite session",
416     __FILE__, __LINE__);
417     }
418 ken 2520 }
419    
420 jason 2941 std::vector<ClientSubscriptionHandle>
421 davidb 2603 Dialog::findClientSubscriptions()
422 ken 2520 {
423 jason 2941 std::vector<ClientSubscriptionHandle> handles;
424 davidb 2603
425 derek 2858 for (std::list<ClientSubscription*>::const_iterator i = mClientSubscriptions.begin();
426 davidb 2603 i != mClientSubscriptions.end(); ++i)
427     {
428     handles.push_back((*i)->getHandle());
429     }
430    
431     return handles;
432 ken 2520 }
433    
434 jason 2941 ClientRegistrationHandle
435 davidb 2603 Dialog::findClientRegistration()
436 ken 2520 {
437 davidb 2603 if (mClientRegistration)
438     {
439     return mClientRegistration->getHandle();
440     }
441     else
442     {
443 davidb 2604 throw BaseUsage::Exception("no such client registration",
444 davidb 2603 __FILE__, __LINE__);
445     }
446 ken 2520 }
447    
448 jason 2941 ServerRegistrationHandle
449 davidb 2603 Dialog::findServerRegistration()
450 ken 2520 {
451 davidb 2603 if (mServerRegistration)
452     {
453     return mServerRegistration->getHandle();
454     }
455     else
456     {
457 davidb 2604 throw BaseUsage::Exception("no such server registration",
458 davidb 2603 __FILE__, __LINE__);
459     }
460 ken 2520 }
461    
462 jason 2941 ClientPublicationHandle
463 davidb 2604 Dialog::findClientPublication()
464     {
465     if (mClientPublication)
466     {
467     return mClientPublication->getHandle();
468     }
469     else
470     {
471     throw BaseUsage::Exception("no such client publication",
472     __FILE__, __LINE__);
473     }
474     }
475 ken 2520
476 jason 2941 ServerPublicationHandle
477 davidb 2604 Dialog::findServerPublication()
478 ken 2520 {
479 davidb 2604 if (mServerPublication)
480     {
481     return mServerPublication->getHandle();
482     }
483     else
484     {
485     throw BaseUsage::Exception("no such server publication",
486     __FILE__, __LINE__);
487     }
488 ken 2520 }
489 jason 2535
490 jason 2614 #if 0
491 jason 2941 ClientOutOfDialogReqHandle
492 davidb 2604 Dialog::findClientOutOfDialog()
493 jason 2539 {
494 jason 2614 if (mClientOutOfDialogRequests)
495 jason 2539 {
496 davidb 2604 return mClientOutOfDialogReq->getHandle();
497 jason 2577 }
498 davidb 2604 else
499 jason 2577 {
500 davidb 2604 throw BaseUsage::Exception("no such client out of dialog",
501     __FILE__, __LINE__);
502 jason 2577 }
503 davidb 2604 }
504 jason 2614 #endif
505 davidb 2604
506 jason 2941 ServerOutOfDialogReqHandle
507 davidb 2604 Dialog::findServerOutOfDialog()
508     {
509 jason 2614 if (mServerOutOfDialogRequest)
510 davidb 2604 {
511 jason 2614 return mServerOutOfDialogRequest->getHandle();
512 davidb 2604 }
513 jason 2577 else
514     {
515 davidb 2604 throw BaseUsage::Exception("no such server out of dialog",
516     __FILE__, __LINE__);
517 jason 2577 }
518 jason 2539 }
519    
520 davidb 2604 #if 0
521 jason 2539 void
522 jason 2535 Dialog::processNotify(const SipMessage& notify)
523     {
524     if (notify.isRequest())
525     {
526     if (findSubscriptions().empty())
527     {
528     SubscriptionCreator* creator = dynamic_cast<SubscriptionCreator*>(DialogSetId(notify).getCreator());
529     if (creator)
530     {
531     creator->makeNewSubscription(notify);
532     }
533     }
534     else
535     {
536     for (std::list<BaseUsage*>::iterator i=mUsages.begin(); i!=mUsages.end(); i++)
537     {
538     ClientSubscription* sub = dynamic_cast<ClientSubscription*>(*i);
539     if (sub && sub->matches(notify))
540     {
541     sub->process(notify);
542     break;
543     }
544     }
545     }
546     }
547     }
548 jason 2612 #endif
549 jason 2539
550    
551 derek 2813 void
552     Dialog::makeRequest(SipMessage& request, MethodTypes method)
553     {
554     RequestLine rLine(method);
555    
556 derek 2817 rLine.uri() = mRemoteTarget.uri();
557 derek 2813
558     request.header(h_RequestLine) = rLine;
559 derek 2817 request.header(h_To) = mRemoteTarget;
560 derek 2936 request.header(h_To).param(p_tag) = mId.getRemoteTag();
561 derek 2813 request.header(h_From) = mLocalContact;
562 derek 2936 request.header(h_From).param(p_tag) = mId.getLocalTag();
563 derek 2813
564     request.header(h_CallId) = mCallId;
565     request.header(h_Routes) = mRouteSet;
566     request.header(h_Contacts).push_front(mLocalContact);
567     request.header(h_CSeq).method() = method;
568     request.header(h_MaxForwards).value() = 70;
569    
570     Via via;
571     via.param(p_branch); // will create the branch
572     request.header(h_Vias).push_front(via);
573    
574     request.header(h_CSeq).sequence() = ++mLocalCSeq;
575     }
576    
577    
578     void
579 jason 2887 Dialog::makeResponse(SipMessage& response, const SipMessage& request, int code)
580 derek 2813 {
581     assert( code >= 100 );
582 derek 2936 response.header(h_To).param(p_tag) = mId.getLocalTag();
583 derek 2813 if ( (code < 300) && (code > 100) )
584     {
585     assert(request.isRequest());
586     assert(request.header(h_RequestLine).getMethod() == INVITE ||
587     request.header(h_RequestLine).getMethod() == SUBSCRIBE);
588    
589     assert (request.header(h_Contacts).size() == 1);
590 derek 2936 response.header(h_To).param(p_tag) = mId.getLocalTag();
591 derek 2813
592 derek 2817 Helper::makeResponse(response, request, code);
593 derek 2813
594     if (!request.exists(h_Contacts) && request.header(h_Contacts).size() != 1)
595     {
596     InfoLog (<< "Request doesn't have a contact header or more than one contact, so can't create dialog");
597     DebugLog (<< request);
598     throw Exception("Invalid or missing contact header in request", __FILE__,__LINE__);
599     }
600    
601 derek 2817 assert (response.header(h_To).exists(p_tag));
602 derek 2813 }
603     else
604     {
605 derek 2817 Helper::makeResponse(response, request, code, mLocalContact);
606 derek 2813 }
607     }
608    
609 jason 2885
610     ClientInviteSession*
611     Dialog::makeClientInviteSession(const SipMessage& response)
612     {
613     InviteSessionCreator* creator = dynamic_cast<InviteSessionCreator*>(mDialogSet.getCreator());
614     assert(creator); // !jf! this maybe can assert by evil UAS
615 jason 2941 //return mDum.createAppClientInviteSession(*this, *creator);
616     return new ClientInviteSession(mDum, *this, creator->getLastRequest(), creator->getInitialOffer());
617 jason 2885 }
618    
619     ClientRegistration*
620     Dialog::makeClientRegistration(const SipMessage& response)
621     {
622     BaseCreator* creator = mDialogSet.getCreator();
623     assert(creator);
624 jason 2941 return new ClientRegistration(mDum, *this, creator->getLastRequest());
625 jason 2885 }
626    
627     ClientPublication*
628     Dialog::makeClientPublication(const SipMessage& response)
629     {
630     BaseCreator* creator = mDialogSet.getCreator();
631     assert(creator);
632 jason 2941 return new ClientPublication(mDum, *this, creator->getLastRequest());
633 jason 2885 }
634    
635     ClientSubscription*
636     Dialog::makeClientSubscription(const SipMessage& response)
637     {
638     BaseCreator* creator = mDialogSet.getCreator();
639     assert(creator);
640 jason 2941 return new ClientSubscription(mDum, *this, creator->getLastRequest());
641 jason 2885 }
642    
643     ClientOutOfDialogReq*
644     Dialog::makeClientOutOfDialogReq(const SipMessage& response)
645     {
646     BaseCreator* creator = mDialogSet.getCreator();
647     assert(creator);
648 jason 2941 return new ClientOutOfDialogReq(mDum, *this, creator->getLastRequest());
649 jason 2885 }
650    
651     ServerInviteSession*
652     Dialog::makeServerInviteSession(const SipMessage& request)
653     {
654 jason 2941 return new ServerInviteSession(mDum, *this, request);
655 jason 2885 }
656    
657     ServerSubscription*
658     Dialog::makeServerSubscription(const SipMessage& request)
659     {
660 jason 2941 return new ServerSubscription(mDum, *this, request);
661 jason 2885 }
662    
663     ServerRegistration*
664     Dialog::makeServerRegistration(const SipMessage& request)
665     {
666 jason 2941 return new ServerRegistration(mDum, *this, request);
667 jason 2885 }
668    
669     ServerPublication*
670     Dialog::makeServerPublication(const SipMessage& request)
671     {
672 jason 2941 return new ServerPublication(mDum, *this, request);
673 jason 2885 }
674    
675     ServerOutOfDialogReq*
676     Dialog::makeServerOutOfDialog(const SipMessage& request)
677     {
678 jason 2941 return new ServerOutOfDialogReq(mDum, *this, request);
679 jason 2885 }
680    
681 davidb 2603 Dialog::Exception::Exception(const Data& msg, const Data& file, int line)
682     : BaseException(msg, file, line)
683 jason 2885 {
684     }
685 davidb 2603
686 jason 2853 void
687     Dialog::update(const SipMessage& msg)
688     {
689     }
690    
691     #if 0
692 derek 2839 void
693     Dialog::setLocalContact(const NameAddr& localContact)
694     {
695     mLocalContact = localContact;
696     }
697    
698     void
699     Dialog::setRemoteTarget(const NameAddr& remoteTarget)
700     {
701     mRemoteTarget = remoteTarget;
702     }
703 jason 2853 #endif
704 derek 2839
705 derek 2858 void Dialog::possiblyDie()
706     {
707     if (mClientSubscriptions.empty() &&
708     mClientOutOfDialogRequests.empty() &&
709     !(mServerSubscription ||
710     mInviteSession ||
711     mClientRegistration ||
712     mServerRegistration ||
713     mClientPublication ||
714     mServerPublication ||
715     mServerOutOfDialogRequest))
716     {
717     delete this;
718     }
719     }
720 derek 2862
721 jason 2884 ostream&
722     resip::operator<<(ostream& strm, const Dialog& dialog)
723     {
724    
725     return strm;
726     }
727    

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27