Exemplo n.º 1
0
def create_invite(ctx, username):
    ci = ClientInvite()
    ci.set_values(
        client_ctx = ctx,
        calle_name_length = len(username),
        calle_name = username,
        num_of_codecs = len(Codecs.values()),
        codec_list = ''.join(Codecs.values()))
        
    return ci.pack()
Exemplo n.º 2
0
 def answer(self):
     print 'snoipclient-answer'
     ca = ClientAnswer()
     ca.set_values(client_ctx=self.client_ctx, 
         call_ctx=self.call_ctx, codec=Codecs.values()[0])
     print 'answering a ring of call_ctx:', repr(self.call_ctx)
     self._send(ca.pack())