Skip to content
This repository has been archived by the owner on Dec 17, 2019. It is now read-only.
/ Python-SIP Public archive

primative SIP library built in pure python

License

Notifications You must be signed in to change notification settings

SythilTech/Python-SIP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-SIP

Primative library to facilitate automated calls and messaging.

How to use the library.

First you need to start a session by supplying basic SIP account details
sip_session = sip.SIPSession(local_ip, username, domain, password)

Then you define some event handlers
sip_session.call_accepted += self.call_accepted
sip_session.call_rejected += self.call_rejected
sip_session.call_ended += self.call_ended
sip_session.call_error += self.call_error
sip_session.message_sent += self.message_sent

The event handler will return information about the session as well as the SIP message for you to exact data from
def call_accepted(self, session, data):

make a call, you will need to supply your own SDP data
call_id = sip_session.send_sip_invite(to_address, call_sdp)

You can also send messages
call_id = sip_session.send_sip_message(to_address, message_body)

Please note that after the call is accepted you will need to write your own code to handle the RTP stream

About

primative SIP library built in pure python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages