leogomezz4t / PyTextNow_API

Python texting API utilizing TextNow API
MIT License
69 stars 42 forks source link

calling #31

Closed libmarleu closed 3 years ago

libmarleu commented 3 years ago

is there a way that sending an mp3 file over voice call or sip is possible? or a way to pipe audio into the program?

or vice versa and answer or decline calls?

leogomezz4t commented 3 years ago

Haha it's funny mention it. I've been trying to do that for like 6 months. I'm going to keep this issue open so if I find it I'll alert this thread.

SilverStrings024 commented 3 years ago

is there a way that sending an mp3 file over voice call or sip is possible? or a way to pipe audio into the program?

or vice versa and answer or decline calls?

I've actually been thinking of how to do this as well. Short of building on top of the sip provider (correct verbeage?) from Twisted, which would require a lot of work, I'm not sure how we can allow for sip. If you find anything that we could use for it, let us know! As for the files, Leo did some investigating and he thinks that you can send files like that but bigger files take forever to send or never do. If you end up finding anything about sip or sending bigger files, please let us know. Once the new additions are stable I'll likely attempt to send some files in smaller chunks and a few other methods but for now, we have no idea lol.

libmarleu commented 3 years ago

is there a way that sending an mp3 file over voice call or sip is possible? or a way to pipe audio into the program? or vice versa and answer or decline calls?

I've actually been thinking of how to do this as well. Short of building on top of the sip provider (correct verbeage?) from Twisted, which would require a lot of work, I'm not sure how we can allow for sip. If you find anything that we could use for it, let us know! As for the files, Leo did some investigating and he thinks that you can send files like that but bigger files take forever to send or never do. If you end up finding anything about sip or sending bigger files, please let us know. Once the new additions are stable I'll likely attempt to send some files in smaller chunks and a few other methods but for now, we have no idea lol.

Haha it's funny mention it. I've been trying to do that for like 6 months. I'm going to keep this issue open so if I find it I'll alert this thread.

Awesome Thank you both!

aaronjamt commented 3 years ago

Been looking for a free way to do programmable bi-directional audio calls to/from U.S. phone numbers, this looks like exactly what I need. I kinda understand what SIP is and the high-level but I have no idea how to try to implement something like that. Does it seem possible, maybe headless chromium in a Docker container and use PulseAudio loopbacks?

SilverStrings024 commented 3 years ago

Been looking for a free way to do programmable bi-directional audio calls to/from U.S. phone numbers, this looks like exactly what I need. I kinda understand what SIP is and the high-level but I have no idea how to try to implement something like that. Does it seem possible, maybe headless chromium in a Docker container and use PulseAudio loopbacks?

Honestly, No clue. I was looking into using twisted sip provider but the docs aren't clear. If you do some tests and they work out, feel free to create a PR!

aaronjamt commented 3 years ago

Been looking for a free way to do programmable bi-directional audio calls to/from U.S. phone numbers, this looks like exactly what I need. I kinda understand what SIP is and the high-level but I have no idea how to try to implement something like that. Does it seem possible, maybe headless chromium in a Docker container and use PulseAudio loopbacks?

Honestly, No clue. I was looking into using twisted sip provider but the docs aren't clear. If you do some tests and they work out, feel free to create a PR!

Yeah, I'll have to try that out. You said "twisted sip provider". Is that a Python SIP module or something? I can try MITMProxy and see if TextNow uses SIP behind-the-scenes, if so (and it's accessable client-side) that might be the way to go...

SilverStrings024 commented 3 years ago

Been looking for a free way to do programmable bi-directional audio calls to/from U.S. phone numbers, this looks like exactly what I need. I kinda understand what SIP is and the high-level but I have no idea how to try to implement something like that. Does it seem possible, maybe headless chromium in a Docker container and use PulseAudio loopbacks?

Honestly, No clue. I was looking into using twisted sip provider but the docs aren't clear. If you do some tests and they work out, feel free to create a PR!

Yeah, I'll have to try that out. You said "twisted sip provider". Is that a Python SIP module or something? I can try MITMProxy and see if TextNow uses SIP behind-the-scenes, if so (and it's accessable client-side) that might be the way to go...

Here's a link to some docs https://twistedmatrix.com/documents/8.2.0/api/twisted.protocols.sip.html I'm not a fan of their docs but maybe you can figure it out.

If you look at the cookies you can see that they ping an sip server. On a desktop browser, they seem to do this every few seconds (their sip server seems to silently call you, its weird), probably to test if the connection is alive. I would think if you can emulate textnow sending to its sip server it would work; I doubt they have an API endpoint so it might involve a robot to force a connection between the program and the website so you can blast audio packets through the site but I haven't looked into it too much. Short of using an API endpoint like the rest of the functions (send_sms and such) or using a robot, I have no idea how we can send audio through textnow If you want, you can join our development discord and we can all discuss the sip possibilities of the package Invite Link: https://discord.gg/VQs8RBhJ I think the invite is good for an hour

leogomezz4t commented 3 years ago

Been looking for a free way to do programmable bi-directional audio calls to/from U.S. phone numbers, this looks like exactly what I need. I kinda understand what SIP is and the high-level but I have no idea how to try to implement something like that. Does it seem possible, maybe headless chromium in a Docker container and use PulseAudio loopbacks?

Honestly, No clue. I was looking into using twisted sip provider but the docs aren't clear. If you do some tests and they work out, feel free to create a PR!

Yeah, I'll have to try that out. You said "twisted sip provider". Is that a Python SIP module or something? I can try MITMProxy and see if TextNow uses SIP behind-the-scenes, if so (and it's accessable client-side) that might be the way to go... Textnow does use sip behind the scenes so I could try and use chromium but I've been trying to have PyTextNow not be dependent on chromium because it can be a bit unreliable.

SilverStrings024 commented 3 years ago

Currently in the works.