Re: Needing Help with Python SWIG and RTP transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With the help of all examples around, I came to a solution.

First of all: showing the problem

Network: one network interface, eth0 with two IPs: 192.168.80.218 and 192.168.80.251.
SIP port range 5080 - 5085, RTP port range: 10000 - 12000
PBX at 192.168.105.1, account 34.
All traffic to the PBX shall go over IP 192.168.80.251

Account.setTransport(transportRTPid) doesn't seem to have any effect at all with the settings:

  rtpTpConfig.port    = 10000
  rtpTpConfig.portRange = 2000
  rtpTpConfig.boundAddress    = '192.168.80.251'
  rtpTpConfig.publicAddress = '192.168.80.251'
  transportRTPid = ep.transportCreate(pj.PJSIP_TRANSPORT_UDP, rtpTpConfig);

The registration and the invite are using the right ports: Contact: <sip:34@192.168.80.251:5080;ob>
But the SDP shows a=rtcp:4001 IN IP4 192.168.80.218

If the intention of setTransport was to configure the SIP side, then the registration should have used port >= 10000. If it was meant for RTP, then the SDP should use the right IP and port >= 10000.
Thus my conclusion that setTransport has no effect.


The solution is to set acfg.mediaConfig.transportConfig = rtpTpConfig

SDP now contains a=rtcp:10003 IN IP4 192.168.80.251

The documentation at https://www.pjsip.org/pjsip/docs/html/structpj_1_1AccountMediaConfig.htm contains the transportConfig data field. I've been mislead by the description of localRtpName and of course the examples around using older libraries or APIs.

Maybe this helps someone else.



Am 17.12.2019 um 11:45 schrieb Martin Schmid via pjsip:
Am 17.12.2019 um 01:44 schrieb Martin Schmid via pjsip:
Hello everybody

I'm having trouble binding the RDP to a specific IP.

The question is: how can I possibly predefine the RTP transports?
I see that there are callbacks in the call object. But do I really have to define the RTP settings there and keeping track of all ports that are in use? That should be done by the library.

I would expect a per-account setting but I'm unable to find it. There is only a info in the documentation that localRtpName and localRtcpName do not need to be the same as boundAddress and publicAddress.
But how to configure those RTP settings?




--
Martin Schmid
APS systems AG, Neumatt 4, CH-4626 Niederbuchsiten
Tel direkt: +41 62 389 8891, Tel: +41 62 517 8833
www.aps-systems.ch


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux