Git Product home page Git Product logo

p2p-sip's Introduction

39 Peers: Opensource peer-to-peer Internet telephony (P2P-SIP) software in Python
by Kundan Singh <mailto:[email protected]>
Visit http://39peers.net or http://code.google.com/p/p2p-sip for the project details.
See LICENSING for copyright and licensing details.

--

For Eclipse and Pydev based development, the .project and .pydevproject files are
also supplied. You can use this to open an existing project in Eclipse with 
Pydev extension installed.

--

p2p-sip's People

Watchers

 avatar  avatar

p2p-sip's Issues

Crashes due to missing branch in Via

First reported by Tom van der Geer [email protected] on Jun 4 2011.

---

Hi Kundan,

I've been been performing some more tests with your SIP-RTMP gateway.
Today I've experienced a crash which I thought i should share with
you.

While in the middle of an active call the siprtmp.py process crashed.
This was the traceback:

User._listener exception (<type 'exceptions.AttributeError'>,
AttributeError("'Header' object has no attribute 'branch'",),
<traceback object at 0x883f8c4>)
Traceback (most recent call last):
 File "/home/tom/p2p-sip-read-only/src/app/voip.py", line 280, in
_listener
   self.stack.received(data, remote)
 File "/home/tom/p2p-sip-read-only/src/std/rfc3261.py", line 425, in
received
   self._receivedRequest(m, uri)
 File "/home/tom/p2p-sip-read-only/src/std/rfc3261.py", line 434, in
_receivedRequest
   branch = r.first('Via').branch
AttributeError: 'Header' object has no attribute 'branch'
Traceback (most recent call last):
 File "siprtmp.py", line 957, in <module>
   try: multitask.run()
 File "/home/tom/rtmplite-read-only/multitask.py", line 1202, in run
   get_default_task_manager().run()
 File "/home/tom/rtmplite-read-only/multitask.py", line 897, in run
   self.run_next()
 File "/home/tom/rtmplite-read-only/multitask.py", line 964, in
run_next
   output = task.send(input)
 File "/home/tom/p2p-sip-read-only/src/app/voip.py", line 280, in
_listener
   self.stack.received(data, remote)
 File "/home/tom/p2p-sip-read-only/src/std/rfc3261.py", line 425, in
received
   self._receivedRequest(m, uri)
 File "/home/tom/p2p-sip-read-only/src/std/rfc3261.py", line 434, in
_receivedRequest
   branch = r.first('Via').branch
AttributeError: 'Header' object has no attribute 'branch'
Exception RuntimeError: 'generator ignored GeneratorExit' in
<generator object rtmp_invite at 0x88587ac> ignored
Exception RuntimeError: 'generator ignored GeneratorExit' in
<generator object rtmp_invite at 0x8872824> ignored
Exception TypeError: 'exceptions must be old-style classes or derived
from BaseException, not NoneType' in <generator object read at
0x8872e64> ignored
Exception RuntimeError: 'generator ignored GeneratorExit' in
<generator object parse at 0x8872c84> ignored


Best regards,

Tom

Original issue reported on code.google.com by kundan10 on 5 Jul 2011 at 7:14

Implement comma separated Allow header

The existing code sends multiple Allow header, one for each value, which wastes 
bandwidth. Implement comma separate headers for Allow and others when sending 
out a message.

Original issue reported on code.google.com by kundan10 on 16 Apr 2011 at 1:51

Patch: Allow "~" in SIP header token

P2P-SIP doesn't allow "~" character for tokens in headers, so it sends quoted 
strings (see To tag):

ACK sip:[email protected] SIP/2.0
Content-Length: 0
Via: SIP/2.0/UDP 
192.168.201.21:52258;rport;branch=z9hG4bKnfnrdQTbSyyhBXysTrZV_w..
From: "aaa" <sip:[email protected]>;tag=131719064258
To: 
<sip:[email protected]>;tag="288046~df801cdf-5d89-4a12-ba30-1403941f42b7-19166
831"
CSeq: 1 ACK
Call-ID: [email protected]

Attached patch fixes this.

Original issue reported on code.google.com by [email protected] on 3 Sep 2013 at 9:48

Attachments:

Parse RTCP SDES packets according to RFC3550

RFC3550 states (6.5 SDES: Source Description RTCP Packet):

The list of items in each chunk
   MUST be terminated by one or more null octets, the first of which is
   interpreted as an item type of zero to denote the end of the list.
   No length octet follows the null item type octet, but additional null
   octets MUST be included if needed to pad until the next 32-bit
   boundary.

So here is a patch.

Original issue reported on code.google.com by [email protected] on 23 Jul 2014 at 6:16

Attachments:

Exception in siprtmp when remote side removed m=video in answer SDP

First reported by Tom van der Geer <[email protected]> on Jun 24, 2011.

Hi,

I started using rtmplite today and managed to get it working. I'm
particularly interested in using rtmplite together with a VoIP gateway
to call to a regular PSTN line. I've managed to get speex transcoding
working as well.
However... When the call is established a lot of errors are scrolling
in my window:

exception in rtmp_data (<type 'exceptions.TypeError'>,
TypeError("'NoneType' object is unsubscriptable",), <traceback object
at 0x89e7914>)

These seem to be related to audio being sent from the Flash client to
the siprtmp-gw, because when it detects 'silence' from my mic the
scrolling of the error messages stops...

There's no audio from the phone played on the Flash client side at
all.

One more thing to point out. When I press the "H" button on the Flash
client (I suppose that means "Hold") it does play an audio file on my
phone. So that works!

So, it looks like the signalling and transcoding work, but the media
between the siprtmp-gw and the flash client is not working.

Any hints/tips/suggestions?

TIA,

Tom

--

I fixed it in p2p-sip's svn r38.
http://code.google.com/p/p2p-sip/source/detail?r=38

The problem was that your receiving SIP user agent is sending
incorrect SDP in the answer. As per offer/answer model of SIP in RFC
3264, the answer SDP should have all the m= lines that were in offer,
but with port of 0 if the receiver doesn't support that media. In the
response from your SIP user agent, the SDP has missing m= line for
video.

I fixed p2p-sip's voip.py module to work around this case.

Hope this helps!

Original issue reported on code.google.com by kundan10 on 26 Jun 2011 at 8:04

Problem handling SIP-CANCEL on voip.py


The application is no able to deliver de 'close' event when receiving a 
SIP-CANCEL request, the problem is caused by the following line (voip.py:593):

elif self._queue and ua.request.method == 'INVITE': # only INVITE is allowed to 
be cancelled.

self._queue is not being wompared with None

Tha attached patch fixed the issue

Regards

Juan

Original issue reported on code.google.com by [email protected] on 15 Mar 2012 at 10:14

Attachments:

Node and Node connecting error

Network[1] bootstrap server= False neighbors= 0 candidates= 1
bootstrap trying node= <node ip='224.0.1.2' port=5062 type=1 
guid=560648175799974964474476133579132137349520581240L>
Network[1] sending 26 bytes 127.0.1.1:9080=>224.0.1.2:5062: <Message 
name=Discover:Request >
bootstrap did not receive response.
Network[1] bootstrap server= False neighbors= 0 candidates= 0
Network[1] bootstrap server= False neighbors= 0 candidates= 1
bootstrap trying node= <node ip='224.0.1.2' port=5062 type=1 
guid=560648175799974964474476133579132137349520581240L>
Network[1] sending 26 bytes 127.0.1.1:9080=>224.0.1.2:5062: <Message 
name=Discover:Request >
('192.168.1.25', 6857)=>('192.168.1.1', 5062) on type=2
ɠr▒':▒▒▒▒▒▒h@▒▒
Error in received message: No first line found
Traceback (most recent call last):
  File "/p2p-sip.r76/src/std/rfc3261.py", line 484, in received
    print data; m._parse(data)
  File "/p2p-sip.r76/src/std/rfc3261.py", line 253, in _parse
    except: raise ValueError, 'No first line found'
ValueError: No first line found

have any idea?

Original issue reported on code.google.com by [email protected] on 3 Aug 2013 at 8:07

Proxy across transport in SIP

First reported on Jul 2, 2012 by Debasish Chandra <[email protected]> 
--

However I noticed that sipd, only allowing call between phone register 
webscoket or between phones which are not using websocket. It doesn't 
interconnect between normal phone register using UDP with phone using 
websocket. Even though its getting proper port and IP, but using the same media 
as originating phone. For example if any ph connected with websocket, and when 
try to call another phone registered using UDP, SIPD trying to connect with 
that phone using websocket only. In case if it is originated from a phone using 
UDP transport, it sending Invite over UDP only, not on websocket.

--

The way sipd.py (and sipapi.py) evolved it was not trivial to change the 
transport on proxy. Need to re-think the design of the voip.py's Proxy class so 
that it allows multiple transports.

Original issue reported on code.google.com by [email protected] on 9 Jul 2012 at 8:50

siprtmp.py doesnt get any responses on REGISTER

Steps to reproduce:
1. connect to siprtmp with videoPhone client
2. check "Remember me?" check box
3. reload videoPhone page random times when just connected or when a call was 
accepted
4. client will not reconnect after one of the next reloads

Expected results: videoPhone successfully reconnects to siprtmp (and siprtmp as 
well successfully reconnects to sip-proxy)

Got: videoPhone rases "connecting" popup, siprtmp sending REGISTER to 
sip-proxy, sip-proxy responses as usual (401 Unauthorised), but siprtmp doent 
get that response at all.

Using: rtmplite from trunk (rev 89), p2p-sip from trunk (rev 39), FreeBSD 8.2 
i386, python 2.6.7, Asterisk 1.8.4.4 as sip-proxy

Additional: when siprtmp cannot get response, _listener method on User class 
(p2p-sip/src/app/voip.py) gets nothing on yield multitask.recvfrom()

Do you need sip logs to prove the bug?

I will also duplicate this issue on p2p-sip project bugtracer, as it is related.

Original issue reported on code.google.com by [email protected] on 20 Jul 2011 at 10:34

Sample code for external media session

First asked by [email protected] on Mar 7, 2011.

--
Hello!

I have read this post http://code.google.com/p/p2p-sip/wiki/ExternalMediaSession
I am still not clearly about how to build a ExternalMediaSession.

Can you give me some examples?(I have checked voip.py + siprtmp.py
too)

Thanks & Regards,
--
Hi

First wanted to emphasize when external media session is useful. The
p2p-sip's voip.py has built-in media session using built-in RTP/RTCP
stack which can do basic media transport for audio and video.
Sometime, you already have external tools which handle RTP/RTCP and
handle media streams, e.g., RAT and vic are such tools. If you would
like to use those tools, then p2p-sip's voip.py should not enable
built-in RTP/RTCP stack, but just invoke those external tools as
needed.

You can do that by following the convention of class MediaSession of voip.py.
http://code.google.com/p/p2p-sip/source/browse/trunk/src/app/voip.py
Essentially, the constructor can start the external media tool and
setRemote can inform the tool about the remote party's RTP transport
address. For incoming call, it should also set mysdp to appropriate
sub-set of offered SDP.

I will try to write up an example sipua which uses external media tool
using p2p-sip library, hopefully soon.

Finally, you do not need ExternalMediaSession stuff for siprtmp related stuff.

Regards,
--

Original issue reported on code.google.com by kundan10 on 10 Mar 2011 at 9:59

Incorrect branch in ACK to 200 OK

First reported by Dmitry dima [email protected] on Jun 19, 2012.

---

SIP-RTMP gateway dosn't work corecctly with Smile CTI Server.
Developers of this server says that problem is that siprtmp violates rfc3261:
branch-id in ACK Via field for 200 OK response must not be identical to 
branch-id of original INVITE
How to fix this?

---
One option is to modify UserAgent's createRequest method in
http://code.google.com/p/p2p-sip/source/browse/trunk/src/std/rfc3261.py r64 
after line 1052
as follows
if method == 'ACK': Via.branch += 'ack'


Original issue reported on code.google.com by [email protected] on 29 Jun 2012 at 9:17

SIP over TCP support

First requested by Tom van der Geer [email protected]  on Jun 4 2011.

---

Hi Kundan,

Do you have any plans to support SIP over TCP in the SIP-RTMP gateway
Best regards,

Tom

Original issue reported on code.google.com by kundan10 on 5 Jul 2011 at 7:17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.