I need to send SIP message using Python sockets, I've made that client sends something to server but I'm not able to make that client sends a SIP message INVITE to server
#!/usr/bin/python
import socket
R_IP = '192.168.2.1'
R_PORT = 5060
message = 'INVITE sip:[email protected] SIP/2.0 To: \x0d\x0aFrom: sip:[email protected];tag=R400_BAD_REQUEST;taag=4488.1908442942.0\x0d\x0aP-Served-User: sip:[email protected]\x0d\x0aCall-ID: [email protected]\x0d\x0aCSeq: 1 INVITE\x0d\x0aContact: sip:[email protected]\x0d\x0aMax-Forwards: 70\x0d\x0aVia: SIP/2.0/TCP 10.44.40.47;branch=z9hG4bK1908442942.4488.0\x0d\x0aContent-Length: 10\x0d\x0a\x0d\x0aRandomText'
def sendPacket():
proto = socket.getprotobyname('tcp')
<