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

Failing to connect to sip:[email protected] #2

Open
sosaucily opened this issue Dec 6, 2019 · 4 comments
Open

Failing to connect to sip:[email protected] #2

sosaucily opened this issue Dec 6, 2019 · 4 comments

Comments

@sosaucily
Copy link

sosaucily commented Dec 6, 2019

Hey guys,

I'm trying this code, I actually made a few tweaks so it would work with only c code, no arduino and no pub/sub for now. Using your esp32 branch of baresip though.

I can get it all to build, and the baresip sipphone task runs, but it prints the following when I try to use

ua_connect(uag_current(), NULL, NULL, "sip:[email protected]", VIDMODE_OFF); in the task main loop.

Sometimes the errors show 'sipphone: call: sipsess_connect: Invalid argument'

other times they show 'sipphone: call: sipsess_connect: Unknown protocol'

Wondering if you have any ideas. Below are two sets of logs showing these. Thanks

call: alloc with params laddr=10.27.99.135, af=AF_INET, use_rtp=1
.[0;32mI (4498) sipphone: call: alloc with params laddr=10.27.99.135, af=AF_INET, use_rtp=1
.[0m
call: use_video=0
.[0;32mI (4518) sipphone: call: use_video=0
.[0m
call: connecting to 'sip:[email protected]'..
.[0;32mI (4518) sipphone: call: connecting to 'sip:[email protected]'..
.[0m
.[31mcall: sipsess_connect: Invalid argument
.[;m.[0;32mI (4538) sipphone: call: sipsess_connect: Invalid argument
.[0m
audio: destroyed (started=0)
.[0;32mI (4538) sipphone: audio: destroyed (started=0)
.[0m
call: alloc with params laddr=10.27.99.135, af=AF_INET, use_rtp=1
.[0;32mI (4558) sipphone: call: alloc with params laddr=10.27.99.135, af=AF_INET, use_rtp=1
.[0m
call: use_video=0
.[0;32mI (4578) sipphone: call: use_video=0
.[0m
call: connecting to 'sip:[email protected]'..
.[0;32mI (4578) sipphone: call: connecting to 'sip:[email protected]'..
.[0m
.[31mcall: sipsess_connect: Invalid argument
.[;m.[0;32mI (4598) sipphone: call: sipsess_connect: Invalid argument
.[0m
audio: destroyed (started=0)
.[0;32mI (4598) sipphone: audio: destroyed (started=0)
.[0m

And this

call: alloc with params laddr=0.0.0.0, af=AF_INET, use_rtp=1
.[0;32mI (4518) sipphone: call: alloc with params laddr=0.0.0.0, af=AF_INET, use_rtp=1
.[0m
call: use_video=0
.[0;32mI (4528) sipphone: call: use_video=0
.[0m
call: connecting to 'sip:[email protected]'..
.[0;32mI (4528) sipphone: call: connecting to 'sip:[email protected]'..
.[0m
.[31mcall: sipsess_connect: Unknown protocol
.[;m.[0;32mI (4548) sipphone: call: sipsess_connect: Unknown protocol
.[0m
audio: destroyed (started=0)
.[0;32mI (4558) sipphone: audio: destroyed (started=0)
.[0m
call: alloc with params laddr=0.0.0.0, af=AF_INET, use_rtp=1
.[0;32mI (4558) sipphone: call: alloc with params laddr=0.0.0.0, af=AF_INET, use_rtp=1
.[0m
call: use_video=0
.[0;32mI (4578) sipphone: call: use_video=0
.[0m
@cspiel1
Copy link
Collaborator

cspiel1 commented Dec 6, 2019 via email

@fAuernigg
Copy link
Owner

Hi Jesse

Please test with the new repo esp-baresip.git. It is also integrated in "esp32-baresip-client"

Following line in your log is interesting:
"call: alloc with params laddr=0.0.0.0, af=AF_INET, use_rtp=1"

Could it be that you initialize baresip before you are connected to Wifi / Network?

The current implementation does not support update of the local ip (laddr) after baresip was initialized.

@sosaucily
Copy link
Author

sosaucily commented Dec 15, 2019

Hey guys,

@mrxa13, yes you were correct, with an ip addr of 0.0.0.0 the "Unknown protocol" error would occur, but making sure the IP was set first solved that.

When an IP address WAS set properly, I was getting the "Invalid argument" error. That error was happening because I was using a dns name for the SIP client/server. I'm trying a setup with the two clients trying to call each other using 'sip.antisip.com'. When I switched it to the IP address of that server instead of the DNS name, it worked better. It was an error with the dnsc DNS Client parameter being null in one of the calling functions. Is that not supported in this package?

I've gotten it a bit further now. My goal is to be able to call from the esp32 with a sip.antisip.com account to another baresip client also on sip.antisip.com, like the android client.

However, does this esp32 implementation work when making an outgoing call with ua_connect? What if the server this account uses is a hosted service like sip.antisip.com? The log prints "connecting to " the other sip client, but it doesn't ring, and no more messages print.

Is there a state machine that needs to be set up somewhere?

Anyway, thanks for your guys' help. I'll also try out the other repo tomorrow.

@fAuernigg
Copy link
Owner

Hi Jesse

I saw in your logs that you initiate a call to a domain. We tested only with (local) ip addresses.

I need to double check but I think resolving domains is not implemented yet for the esp32 platform in baresip. A patch inside libre or baresip is required for that.

Franz

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

3 participants