How to make RTPEngine transcode the sampling time from 10 milliseconds to 20 milliseconds

13715209697--- via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <[email protected]>
Hi, Team

How to make RTPEngine transcode the sampling time from 10 milliseconds to 20 milliseconds?

OS:  Debian 12
Kamailio ver: 6.0.4
RTPEngine ver: mr13.5.2.0

UAC (ptime:40) --- Kamalio/RTPEngine ---- UAS(ptime:20)


kamailio.cfg:

route[NATMANAGE] {
...
	if(has_totag()) {
		rtpengine_manage("SIP-source-address replace-origin replace-session-connection");
	} else {
		rtpengine_manage("SIP-source-address replace-origin replace-session-connection codec-mask-all codec-transcode-PCMA;ptime--20 always-transcode");
	}
}

rtpengine.log:

```
[1764059397.148615] INFO: [[email protected]]: [control] Received command 'offer' from 127.0.0.1:49176
[1764059397.148641] DEBUG: [[email protected]]: [control] Dump for 'offer' from 127.0.0.1:49176: { "supports": [ "load limit" ], "sdp": "v=0
o=1001 1764055864 1764059397 IN IP4 192.168.118.35
s=Kapanga [1764055864]
c=IN IP4 192.168.118.35
t=0 0
m=audio 5112 RTP/AVP 8 101
a=rtpmap:8 pcma/8000
a=sendrecv
a=maxptime:40
a=ptime:40
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15,36
", "flags": [ "SIP-source-address", "always-transcode" ], "replace": [ "origin", "session-connection" ], "codec": { "mask": [ "all" ], "transcode": [ "PCMA;ptime--20" ] }, "call-id": "[email protected]", "received-from": [ "IP4", "192.168.118.35" ], "from-tag": "9A4E71D6E3F7B60DB47A7F494D93454F", "command": "offer" }
[1764059397.148677] INFO: [[email protected]]: [core] replace-session-connection flag encountered, but not supported anymore.
[1764059397.148694] NOTICE: [[email protected]]: [core] Creating new call
[1764059397.148801] DEBUG: [[email protected]]: [core] No matching media (index: 1) using subscription, just use an index.
[1764059397.148824] DEBUG: [[email protected]]: [core] Subscribing media with monologue tag '' (index: 1) to media with monologue tag '9A4E71D6E3F7B60DB47A7F494D93454F' (index: 1)
[1764059397.148838] DEBUG: [[email protected]]: [core] Subscribing media with monologue tag '9A4E71D6E3F7B60DB47A7F494D93454F' (index: 1) to media with monologue tag '' (index: 1)
[1764059397.148850] DEBUG: [[email protected]]: [core] setting other slot to 0, setting slot to 0
[1764059397.148857] DEBUG: [[email protected]]: [codec] Updating codecs for offerer 9A4E71D6E3F7B60DB47A7F494D93454F #1
[1764059397.148877] DEBUG: [[email protected]]: [codec] Adding codec pcma/8000/ (8)
[1764059397.148886] DEBUG: [[email protected]]: [codec] Adding codec telephone-event/8000/0-15,36 (101)
[1764059397.148894] DEBUG: [[email protected]]: [codec] Accepting codec pcma/8000/ (8)
[1764059397.148900] DEBUG: [[email protected]]: [codec] Accepting codec telephone-event/8000/0-15,36 (101)
[1764059397.148906] DEBUG: [[email protected]]: [codec] Updating offer codecs for answerer  #1
[1764059397.148912] DEBUG: [[email protected]]: [codec] Adding codec pcma/8000/ (8)
[1764059397.148919] DEBUG: [[email protected]]: [codec] Adding codec telephone-event/8000/0-15,36 (101)
[1764059397.148929] DEBUG: [[email protected]]: [codec] Stripping codec pcma/8000/ (8) due to strip=all or strip=full
[1764059397.148944] DEBUG: [[email protected]]: [codec] Stripping codec telephone-event/8000/0-15,36 (101) due to strip=all or strip=full
[1764059397.148954] DEBUG: [[email protected]]: [codec] Adding codec PCMA;ptime=20 for transcoding
[1764059397.148962] WARNING: [[email protected]]: [core] Usage error: List of codecs empty. Restoring original list of codecs. Results may be unexpected.
[1764059397.148985] DEBUG: [[email protected]]: [codec] Adding codec pcma/8000/ (8)
[1764059397.149001] DEBUG: [[email protected]]: [codec] Adding codec telephone-event/8000/0-15,36 (101)
[1764059397.149005] DEBUG: [[email protected]]: [codec] Updating supplemental codecs for  #1
[1764059397.149017] DEBUG: [[email protected]]: [codec] Setting up codec handlers for  #1 -> 9A4E71D6E3F7B60DB47A7F494D93454F #1
[1764059397.149023] DEBUG: [[email protected]]: [codec] Default sink codec is pcma/8000/ (8)
[1764059397.149026] DEBUG: [[email protected]]: [codec] Checking receiver codec pcma/8000/1/ (8)
[1764059397.149028] DEBUG: [[email protected]]: [codec] Creating codec handler for pcma/8000/ (8)
[1764059397.149036] DEBUG: [[email protected]]: [codec] Sink codec for pcma/8000/ is pcma/8000/1/ (8)
[1764059397.149040] DEBUG: [[email protected]]: [codec] Sink supports codec pcma/8000/ (8) for passthrough (to 8)
[1764059397.149046] DEBUG: [[email protected]]: [codec] Shutting down codec handler for pcma/8000/1
[1764059397.149052] DEBUG: [[email protected]]: [codec] Using passthrough handler for pcma/8000/ (8) with DTMF 101, CN -1
[1764059397.149067] DEBUG: [[email protected]]: [codec] Checking receiver codec telephone-event/8000/1/0-15,36 (101)
[1764059397.149073] DEBUG: [[email protected]]: [codec] Creating codec handler for telephone-event/8000/0-15,36 (101)
[1764059397.149078] DEBUG: [[email protected]]: [codec] Sink codec for telephone-event/8000/0-15,36 is telephone-event/8000/1/0-15,36 (101)
[1764059397.149090] DEBUG: [[email protected]]: [codec] Sink supports codec telephone-event/8000/0-15,36 (101) for passthrough (to 101)
[1764059397.149093] DEBUG: [[email protected]]: [codec] Shutting down codec handler for telephone-event/8000/1
[1764059397.149103] DEBUG: [[email protected]]: [codec] Using passthrough handler for telephone-event/8000/0-15,36 (101) with DTMF 101, CN -1
[1764059397.149115] DEBUG: [[email protected]]: [codec] Updating supplemental codecs for  #1
[1764059397.149130] DEBUG: [[email protected]]: [codec] Setting up codec handlers for  #1 -> 9A4E71D6E3F7B60DB47A7F494D93454F #1
[1764059397.149145] DEBUG: [[email protected]]: [codec] Default sink codec is pcma/8000/ (8)
[1764059397.149156] DEBUG: [[email protected]]: [codec] Checking receiver codec pcma/8000/1/ (8)
[1764059397.149167] DEBUG: [[email protected]]: [codec] Sink codec for pcma/8000/ is pcma/8000/1/ (8)
[1764059397.149176] DEBUG: [[email protected]]: [codec] Sink supports codec pcma/8000/ (8) for passthrough (to 8)
[1764059397.149190] DEBUG: [[email protected]]: [codec] Shutting down codec handler for pcma/8000/1
[1764059397.149207] DEBUG: [[email protected]]: [codec] Using passthrough handler for pcma/8000/ (8) with DTMF 101, CN -1
[1764059397.149228] DEBUG: [[email protected]]: [codec] Checking receiver codec telephone-event/8000/1/0-15,36 (101)
[1764059397.149236] DEBUG: [[email protected]]: [codec] Sink codec for telephone-event/8000/0-15,36 is telephone-event/8000/1/0-15,36 (101)
[1764059397.149246] DEBUG: [[email protected]]: [codec] Sink supports codec telephone-event/8000/0-15,36 (101) for passthrough (to 101)
[1764059397.149252] DEBUG: [[email protected]]: [codec] Shutting down codec handler for telephone-event/8000/1
[1764059397.149256] DEBUG: [[email protected]]: [codec] Using passthrough handler for telephone-event/8000/0-15,36 (101) with DTMF 101, CN -1
[1764059397.149286] DEBUG: [[email protected]]: [core] Trying to find RTP/RTCP ports (allocation attempt = '0')
[1764059397.149302] DEBUG: [[email protected]]: [core] Trying to bind the socket for RTP/RTCP ports (allocation attempt = '1')
[1764059397.149306] DEBUG: [[email protected]]: [core] Trying to bind the socket for port = '10068'
[1764059397.149439] DEBUG: [[email protected]]: [core] Trying to bind the socket for port = '10069'
[1764059397.149464] DEBUG: [[email protected]]: [core] Opened 2 socket(s) from port '10068' (on interface '192.168.118.57') for a media relay
[1764059397.149533] DEBUG: [[email protected]]: [core] Trying to find RTP/RTCP ports (allocation attempt = '0')
[1764059397.149544] DEBUG: [[email protected]]: [core] Trying to bind the socket for RTP/RTCP ports (allocation attempt = '1')
[1764059397.149547] DEBUG: [[email protected]]: [core] Trying to bind the socket for port = '10000'
[1764059397.149561] DEBUG: [[email protected]]: [core] Trying to bind the socket for port = '10001'
[1764059397.149570] DEBUG: [[email protected]]: [core] Opened 2 socket(s) from port '10000' (on interface '192.168.118.57') for a media relay
[1764059397.149594] DEBUG: [[email protected]]: [core] set FILLED flag for stream, local 192.168.118.57:10000 remote 192.168.118.35:5112
[1764059397.149602] DEBUG: [[email protected]]: [core] set FILLED flag for stream, local 192.168.118.57:10001 remote 192.168.118.35:5113
[1764059397.149637] INFO: [[email protected]]: [control] Replying to 'offer' from 127.0.0.1:49176 (elapsed time 0.000980 sec)
[1764059397.149653] DEBUG: [[email protected]]: [control] Response dump for 'offer' to 127.0.0.1:49176: { "sdp": "v=0
o=1001 1764055864 1764059397 IN IP4 192.168.118.57
s=Kapanga [1764055864]
t=0 0
m=audio 10068 RTP/AVP 8 101
c=IN IP4 192.168.118.57
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15,36
a=sendrecv
a=rtcp:10069
a=ptime:40
a=maxptime:40
", "result": "ok" }
```

codec-transcode-PCMA;ptime--20 doesn't seem to work. The response for 'offer' contains `ptime:40`.

What I really want is to be able to pass 'ptime=20' in the flags, but the rtpengine module doesn't seem to support it.

Thanks!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.