exosip2ctypes.register module¶
eXosip2 REGISTER and Registration Management
-
class
exosip2ctypes.register.
InitialRegister
(context, from_, proxy, contact=None, expires=3600)¶ Bases:
exosip2ctypes.message.ExosipMessage
initial REGISTER request.
To start a registration, you need to build a default REGISTER request by providing several mandatory headers.
You can start as many registration you want even in one eXosip_t context.
The created instance has a registration identifier (
rid
) that you can use to update your registration. In future events about this registration, you’ll see that registration identifier when applicable.Note
You should let eXosip2 manage contact headers alone. The setup you have provided will generate various behavior, all being controlled by eXosip2. See the “NAT and Contact header” section in setup documentation.
Build initial REGISTER request.
Parameters: -
proxy
¶ :return:Proxy used for registration. :rtype: str
-
remove
()¶ Remove existing registration without sending REGISTER.
If you need to delete a context without sending a REGISTER with expires 0, you can use this method to release memory.
-
send
()¶ Send this REGISTER request
-
-
class
exosip2ctypes.register.
Register
(context, rid, expires=3600)¶ Bases:
exosip2ctypes.message.ExosipMessage
REGISTER request for an existing registration.
Use this class if you need to update a registration, You just need to reuse the registration identifier (
InitialRegister.rid
)Note
An UAC should delete its registration on the SIP server when terminating. To do so, you have to send a REGISTER request with the expires header set to value “0”.
Build a new REGISTER request for an existing registration.
Parameters: -
remove
()¶ Remove existing registration without sending REGISTER.
If you need to delete a context without sending a REGISTER with expires 0, you can use this method to release memory.
-
send
()¶ Send this REGISTER request
-