python-sipsimple | SIP SIMPLE implementation for Python | SDK library
kandi X-RAY | python-sipsimple Summary
kandi X-RAY | python-sipsimple Summary
SIP SIMPLE client SDK is a Software Development Kit for easy development of SIP end-points that support rich media like Audio, Video, Instant Messaging, File Transfers, Desktop Sharing and Presence. Other media types can be easily added by using an extensible high-level API. The software has undergone in the past years several interoperability tests at SIPIT (and today is of industry strength quality.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Register a new DNSService
- Return the length and the length of the TXT string
- Decode the value
- End the media stream
- Calls a function in a thread
- Return a thread by id
- Parse an email message
- Create a PIDF document from an xml element
- Handle notification when a notification is received
- Resubscribe all channels
- Process a DNSService service result
- Handle notification received from the server
- Called when the subscription is received
- Create a connection to the DNSS API
- Create function bindings
- Parse the content of the message
- Construct the full name of a service
- Updates the specified record
- Resolve a DNS record
- Reconfigure a DNSService record
- Creates a new record
- Enumerate DNSService domains
- Create a new DNSService record
- Browse a DNSService service
- Register a record
- Removes a record from the server
python-sipsimple Key Features
python-sipsimple Examples and Code Snippets
Community Discussions
Trending Discussions on python-sipsimple
QUESTION
I am working on a project where I need to write a server to initiate SIP sessions with connecting clients and a remote soft-switch. Once the session has been initiated, voice streams should be transmitted back and forth between the end-points using real time transport protocol. Given my above scenario, I have a few questions on how to go about solving this problem.
1) How is SIP initiated? I do understand SIP are usually initiated by SIP clients in IP telecommunication devices. But if you want to initiate SIP sessions programatically, how do you do it without a SIP client? Currently I am using Python, so I came across a few libraries. Like simplesip (which looks overly complicated and not sure if it can do what I want), then there is sippy, which looks promising.
I was also thinking if you can manually create SIP/SDP packets manually through the program and try to initiate a SIP session. I feel like I am reinventing the wheel here by trying to do that. So my question is how do initiate a SIP session programatically? If libraries are used, what are some good libraries. Or is it OK to create and send SIP packets manually in a program?
2) When RTP is created during SIP, how can this RTP channel be referenced to a remote device so that it can use this referenced RTP channel? When researching online, I was told that SIP doesn't provide services to transmit media but just creates a session. Actually RTP does the heavy lifting of doing things in real time. So when a RTP is initiated what does this really mean in a software terminology. Is it a object which can which can be referenced to a device? How can I even add streams of media to this RTP?
...ANSWER
Answered 2017-Dec-20 at 08:071) Setting up and maintaining SIP sessions is done by sending and receiving messages in the Internet Message Format (see RFC 5322): text messages, usually sent using UDP or TCP. It's all about what message to send and when. SIP libraries can help you with that (and with sending/receiving RTP streams) but you can easily do it yourself if you just know how to send UDP messages.
In short: to set up a SIP session you send a SIP INVITE request message, the other party returns SIP INVITE response message and you complete the session initiation by sending a SIP ACK message. Normally the INVITE request will contain an SDP offer in its body, specifying what kind of media the client is willing/able to receive and on which IP address/port. The INVITE response then contains an SDP answer specifying the same for the other party.
The SIP protocol is described in RFC 3261, SDP in SDP 4566. If you google a bit you can find plenty of examples for SIP communication.
2) You're right in that SIP doesn't provide services to transmit/receive media streams. SIP can be used to let another party know you want to set up a media session and negotiate the specifics. Sending/receiving the media stream has to be done seperately; again you could use a library or do it yourself.
An RTP stream (see RFC 3550) is just an example of such a media stream. Sending an RTP stream means sending a continuous stream of RTP packets (usually as part of UDP packets). Every packet contains RTP data: an RTP header and the RTP payload (the actual audio samples).
Mode of operation: The sending party samples its local audio. Every time it has (e.g.) 20 ms worth of audio samples it creates an RTP packet and sends this as payload in an UDP packet. This means it sends a packet every 20 ms, creating a stream of packets: the RTP stream. The receiving party buffers these packets and uses the audio samples in each packet to recreate the audio.
I hope this helps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install python-sipsimple
You can use python-sipsimple like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page