Git Product home page Git Product logo

Comments (4)

rfuchs avatar rfuchs commented on June 24, 2024

The uuid command is the one from here:
http://www.ossp.org/pkg/lib/uuid/

But is there a reason why you can't just test it in a proper SIP environment, e.g. called from Kamailio?

from rtpengine.

altanai avatar altanai commented on June 24, 2024

Yes I can ofcourse use kamailio and sip softphone to test, I was only looking for the shortest way .
Also since my alteration to the code to make rtpengine ipv4 - ipv4/ipv6 compatible , yields errors , it would be awesome if you could drop me a hint on how to achieve it .

from rtpengine.

rfuchs avatar rfuchs commented on June 24, 2024

You can either try to adapt tests/simulator-ng.pl or hand-roll a test case using utils/ng-client yourself.

As a first step, the latter option might be preferable.

The script utils/ng-client serves as a simple CLI interface to issue commands to rtpengine. Most options and flags present within the control protocol are implemented as CLI options to ng-client -- if any are missing or new, they can easily be added.

In the simplest case, you'd issue one offer and one answer using ng-client and some simple hand-crafted SDP bodies. Afterwards, you can use netcat or any other UDP-capable tool to test packet forwarding.

For example, you could put the following into a text file called "offer":

v=0
o=- 123456 0 IN IP4 192.168.0.1
s=session
t=0 0
m=audio 7654 RTP/AVP 1 2 3 4
c=IN IP4 192.168.0.1

Then copy it to another file "answer" and in there, change the port from 7654 to 5432. You'll have to adapt the IP address to your local address.

Then use ng-client to issue both offer and answer:

./ng-client offer --call-id=abcde --from-tag=xyz --trust-address --sdp-file=offer
./ng-client answer --call-id=abcde --from-tag=xyz --to-tag=foo --trust-address --sdp-file=answer

Note that you'll need additional options to enable whatever bridging functionality you're working on. The output of each command will be the rewritten SDP body: take note of IP address and port. Let's say IP address comes back as 192.168.100.100 both times and the ports are 30000 and 30002.

Then use netcat in UDP mode in two terminals. Note how the ports are swapped between the offer and the answer (first netcat uses local port from offer, but remote port received from answer, and vice versa):

netcat -u -p 7654 192.168.100.100 30002
netcat -u -p 5432 192.168.100.100 30000

Now you should be able to type messages back and forth between the two netcats. Keep an eye on the log produced by rtpengine while you're doing this. You may have to raise the timeout values when starting rtpengine.

The simulator-ng script automates this process with many calls in parallel and supports all kinds of different scenarios. It can be tricky to implement a new test case into simulator-ng, which is why I suggest to try it manually first, to see if anything works at all. Otherwise you wouldn't know whether it's the script that's not working right, or rtpengine.

from rtpengine.

rfuchs avatar rfuchs commented on June 24, 2024

IPv4/IPv4 bridging will be supported soon, see issue #4

from rtpengine.

Related Issues (20)

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.