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

Audio Support #9

Open
6 tasks
Flattermann78 opened this issue Aug 27, 2018 · 10 comments
Open
6 tasks

Audio Support #9

Flattermann78 opened this issue Aug 27, 2018 · 10 comments

Comments

@Flattermann78
Copy link
Contributor

Hi,
having a look at the code, I thought that including audio should be the next stage :-) I tried to compile a list of tasks:

  • Basic audio encoding in PCMA or PCMU (codecs 0 and 8)
  • Parsing body for m=audio in sipPacket (provides IP port of receiver)
  • providing adequat answer in send_sip_ack()
  • Processing incoming voice in rtp_task()
  • Determine IP address of recipient
  • Start task that sends audio to port/IP (SIP server and SIP receiver are not the same in all scenarios)

Have I missed something? I tried the audio encoding and think that one is there. I'm missing a good way to determine the IP adress of the receiver.

@rechner
Copy link

rechner commented Sep 9, 2018

The IP and port number for RTP audio of the calling/called party is part of the information found in the INVITE packet. Take a look at a breakdown of it's anatomy here

In particular, you'll need the "media descriptor" (m=<media> <port> <proto> <fmt>) to determine what port to send RTP audio on. The IP to send RTP audio to is specified by the "connection information" SDP field (c=IN IP4 10.101.6.120)

@chrta
Copy link
Owner

chrta commented Sep 11, 2018

Accepting pull requests...

@latonita
Copy link

i think major question is how much ram is available now.
russian guys tried to port pjsip to stm32 with 192k ram and after a lot of pain did that.
major issue - not enough ram. after some rework they make it working within 150k ram + they have some ram for app/logic.
try google translate on this article https://habr.com/company/embox/blog/259721/

@latonita
Copy link

@Flattermann78
Copy link
Contributor Author

My first thought on this was much in line with the g711 approach. Using

http://web.mit.edu/audio/src/build/i386_linux2/sox-11gamma-cb/g711.c

and a reference project for audio streaming (https://www.hackster.io/julianfschroeter/esp32-voice-streamer-52bd7e) provides a first running system which is able to do PCMA and PCMU.

@sikorapatryk
Copy link

Here is my a bit primitive audio implementation on this project.

ESP32 simple VoIP phone based on SPH0645 mic and UDA1334A decoder

@chrta
Copy link
Owner

chrta commented Mar 14, 2019

@sikorapatryk Great, thank you. I will have a look at it. Which hardware did you use? Some board that is readily available?

Edit: added strike-through

@ale-trevizoli
Copy link

ale-trevizoli commented Oct 28, 2019

Hi....If it could receive and send audio and DTMF encode and decode, I can help the project with some money, my intention is transform an Analog Intercom with Keypad into an IP SIP INTERCOM simply adding an ESP32. I think ESP32 has ADC that can do G711 encoding. We can add too, an client for an RTSP stream (h264) and send together with media packet to SIP Server.
If anyone have time to do it, please talk to me.
my email ale.trevizoli@gmail.com

@Olejan
Copy link

Olejan commented Mar 21, 2024

Here is my a bit primitive audio implementation on this project.

ESP32 simple VoIP phone based on SPH0645 mic and UDA1334A decoder

@sikorapatryk Hi, Patryk. I get error when I try to compile yours project. I get undefined reference to 'app_main'. Can you help me to build yours project

@Olejan
Copy link

Olejan commented Mar 21, 2024

@sikorapatryk Hi, Patryk! Your sip-call project on github does not have CMakeList.txt files in the main folder and in all components. Can you add them to the repository and push it?

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

No branches or pull requests

7 participants