reSIProcate:Typical DUM callflow

一 Typical DUM callflow is:
Client Side:
1.  Call dum.makeInviteSession
2.  Add SDP (if required)
3.  dum.send to send invite.
4.  onNewSession gets called on first response from server with status >
100.
5.  onProvisional gets called if server responds with a 1xx response
(excluding 100)
6.  onConnected gets called when server responds with a 2xx response.
ackConnection should then be called on the ClientInviteSession.
...
7.  To disconnect:  on the ClientInviteSession - call cis.send(cis.end()) -
this will send the BYE request.
8. onTerminated is then called after receiving the 200 response to the BYE.

Server Side
1.  onNewSession gets called when an inbound INVITE is received.
2.  Server can then use ServerInviteSession to send provisional() - if
required.
3.  Server uses ServerInviteSession to send accept() - adding any required
SDP.  This sends the 200 response to the client.
...
4.  onTerminated is called when client sends BYE.  DUM sends the 200
response.

二 关于实例化DUM个数的问题

 在reSIProcate wiki资料中说"a single DUM can be shared by multiple UAs."就是多个UA(User Agent)可以共用一个DUM(Dialog Usage Manager,会话管理器)。
那为什么在reSIProcate代码中的resiprocate-1.5/resip/dum/test/BasicCall.cxx中用了两个DUM呢?如下:
   SipStack stackUac;
   DialogUsageManager* dumUac = new DialogUsageManager(stackUac);
   SipStack stackUas;
   DialogUsageManager* dumUas = new DialogUsageManager(stackUas);
两个SipStack,两个DUM。

这是因为该例子是用于实现本机呼叫本机,即本机上同时登陆两个用户,用不同的端口,这两个用户之间呼叫。
One DUM is recommended.  BasicCall is setup so that it can call itself
(on a different port and stack instance) for demo/test purposes only.

三 BasicCall CallFlow

reSIProcate:Typical DUM callflow_第1张图片

你可能感兴趣的:(server,manager,user,dialog)