[pjsip] a few questions

Tiago Ferreira maiaboy at hotmail.com
Fri Aug 14 09:00:31 EDT 2009

I changed the import but the audio still isn't transmitted. It registers
correctly, then it makes the call, the call is accepted in the other end but
the audio isn't transmitted.

This is the class that I'm creating for this purpose:

class SimplePhone:
    def __init__(self):
        self.acc = None
        self.acc_cb = None
        self.current_call = None
        self.server = None
        self.lib = pj.Lib()
        self.lib.init(log_cfg = pj.LogConfig(level=0, callback=log_cb))

    def register(self, server, extension_name, password):
        self.server = server
        self.acc = self.lib.create_account(pj.AccountConfig(server,
extension_name, password))
        self.acc_cb = LockUntilRegistrationAccountCallback(self.acc)

    def unregister(self):
        self.acc = None
        self.acc_cb = None

    def call(self,  phone_number):
        lck = self.lib.auto_lock()
        self.current_call = self.acc.make_call('sip:' + phone_number + '@' +
self.server, intInfoCallCallback())
        del lck

    def hangup(self):
    def dial_dtmf(self, digits):

    def send_audio(self):
    player = self.lib.create_player("/tmp/ring.wav", True)
    self.lib.conf_connect(self.lib.player_get_slot(player), 0)

-----Mensagem original-----
De: pjsip-bounces at lists.pjsip.org [mailto:pjsip-bounces at lists.pjsip.org] Em
nome de Saúl Ibarra
Enviada: sexta-feira, 14 de Agosto de 2009 13:53
Para: pjsip list
Assunto: Re: [pjsip] a few questions

On Fri, Aug 14, 2009 at 2:39 PM, Tiago Ferreira<maiaboy at hotmail.com> wrote:
> I simply use import pjsua, do i need to use import pjsua as pj?

Yes, if you later do pj.Something else yo should do pjsua.Something

http://www.saghul.net | http://www.sipdoc.net

Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org

More information about the pjsip mailing list