On Fri, Dec 23, 2011 at 7:44 PM, Rick van Rein <r...@openfortress.nl> wrote:
> Hello,
>
> I'm getting started with Sipp. I've read most documentation, but
> one question I have isn't answered.
>
> I have built a codec handler, and before it is built into a phone
> where debugging is hard, I would like to test it. So the codec
> can run as an RTP-only desktop application, and needs as arguments
> the local and remote IPv6 addres and port. It needs the remote
> endpoint so it can shoot a hole in the local firewall. I'd like
> to test this against existing implementations. (BTW, the codec is
> Realtime Text, a live text mechanism in use by the deaf.)
>
> I can use SIPP (with -m 1 parameter) to create the call, but then
> I still need a way to fire up a *live* test with my codec test app.
> I am looking for a way to relay the remote IPv6 address and
> UDPport from SIPP to the outside. I've looked for printing,
> logging, dumping options but failed to find any.
>
> Do you guys/girls see a way to retrieve this RTP data from SIPP?
>
If you mean you want to get the RTP ip and media port advertised by the
remote UA, you could use action ereg. Here's how I would get them for a
VoIP call:
<recv request="INVITE" crlf="true">
<action>
<ereg regexp="c=IN IP6 ([^\r\n]+)" search_in="body" check_it="true"
assign_to="whole,remote_media_ip"/>
<ereg regexp="m=audio ([0-9]+)" search_in="body" check_it="true"
assign_to="whole,remote_media_port"/>
<log message="remote_media_ip=[$remote_media_ip]
remote_media_port=[$remote_media_port]"/>
</action>
</recv>
Then, maybe you could start your codec app using action exec passing the
collected data to it:
<exec command="codec_app [$remote_media_ip] [$remote_media_port]"/>
Also, you could send the collected data to it using a UDP packet:
<exec command="echo 'remote_media_ip=[$remote_media_ip]
remote_media_port=[$remote_media_port]' | nc -u -w 1 192.168.1.1 44444" />
</action>
Here's what I got with python:
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>> s.bind(('192.168.1.1',44444))
>>> s.recvfrom(1000)
('remote_media_ip=FF1E:03AD::7F2E:172A:1E24 remote_media_port=12345\n',
('192.168.1.1.', 43158))
But if you need to test controlling thousands of calls, probably it would
be better to make your codec app to be able to talk with sipp using 3pcc:
http://sipp.sourceforge.net/doc/reference.html#3PCC
This way, you could send a command to your codec app to initiate a session
and release resources when the call ends.
regards,
takeshi
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users