Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phone being always 486 Busy when it has incoming call #264

Open
I3ootman opened this issue Jun 18, 2024 · 1 comment
Open

Phone being always 486 Busy when it has incoming call #264

I3ootman opened this issue Jun 18, 2024 · 1 comment

Comments

@I3ootman
Copy link

I3ootman commented Jun 18, 2024

I tried making basic phone (my own, not taken from example). Two phones then connect via Asterisk server. If Phone 2 calls Phone 1 it always gets 486 Busy. I dug into code of VoIP file and found that upon recieving sip.INVITE VoIPPhone.callback() calls _callback_MSG_Invite() where it recieves this INVITE message and should call _createCall().

But if you inspect _callback_MSG_Invite() closely you can see these lines:
if self.callCallback is None: message = self.sip.gen_busy(request) self.sip.out.sendto( message.encode("utf8"), (self.server, self.port) )
[line 564-568]

If self.callCallback is None then it calls sip.gen_busy() but the problem is self.callCallback is always None as i can see cuz callback() does not return anything.
On the other hand there is a note in documentation that says:
"This function [callback()] then creates a VoIPCall or terminates it respectively. When a VoIPCall is created, it will then pass it to the callCallback function as an argument. If callCallback is set to None, this function replies as BUSY."

That means that VoIPCall object should be created before this check but it actually created after the None check in code. @tayler6000 explain please how do i handle this situation or is it a kinda bug?

@I3ootman
Copy link
Author

I opened VoIP file in my project and commented this check on line 564. After that call actually got accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant