tayler6000 / pyVoIP

Pure python VoIP/SIP/RTP library. Currently supports PCMA, PCMU, and telephone-event
https://pypi.org/project/pyVoIP/
GNU General Public License v3.0
234 stars 109 forks source link

Doesn't print any logs or calls the answer callback #232

Closed hassantauqeer closed 10 months ago

hassantauqeer commented 10 months ago

I am using this example from the documentations:

from pyVoIP.VoIP import VoIPPhone, InvalidStateError
def answer(call):
    try:
        call.answer()
        call.hangup()
    except InvalidStateError:
        pass

if __name__ == "__main__":
    phone = VoIPPhone(<SIP server IP>, <SIP server port>, <SIP server username>, <SIP server password>, myIP=<Your computer's local IP>, callCallback=answer)
    phone.start()
    input('Press enter to disable the phone')
    phone.stop()

I am running a Dialler(Microsip) on my server, and trying to connect to that using python. These are all my internal (network)configurations

When i try to run this simple example, it runs successfully but when i make a call at this agent/number from LinPhone it doesn't trigger any logs OR doens't even call the callCallback function.

I used a ReactJS example and i was able to communicate between 2 apps over my VoIP/Microsip dialler but not with this package.

hassantauqeer commented 10 months ago

My bad, I was passing the port as string. "5060" instead of 5060. I still have other issues but atleast it proceeds, prints logs although it doesn't call the callback because of other reasons. I will investigate and create an issue if it seems like i am blocked.