Hi
I’m using Asterisk 19.1.0 pjSip.
I have 2 phones using the asterisk PBX.
Phone 1 need to call phone 2.
Phone 1 send INVITE to asterisk, with the following RTP setting:
v=0
o=12345451 1755437845 1755437845 IN IP4 192.168.10.230
s=-
c=IN IP4 192.168.10.230
t=0 0
m=audio 16398 RTP/AVP 0 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:40
a=maxptime:80
a=sendrecv
a=rtcp:16399
But asterisk sends the following to phone 2:
v=0
o=- 332319616 332319616 IN IP4 192.168.10.234
s=Asterisk
c=IN IP4 192.168.10.234
t=0 0
m=audio 17754 RTP/AVP 0 9 18 4 111 8 107 101
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
where the ptime is set to 20ms
asterisk accepts phone 1 packet size of 40ms. So between phone 1 and asterisk the packetsize is 40ms, but between asterisk and phone2 the packet size is 20ms.
I would like that the packetsize between asterisk and phone 2 is also 40ms (following the initial request from phone1)
I call from extension 12345451 (phone1) to 12345452 (phone2) and use the following config file:
[general]
tlsenable=yes
tlsdontverifyserver=yes ;no
;tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscertfile=/etc/asterisk/keys/default.pem
transport=udp
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
endpoint-basic
type=endpoint
context=from-internal
disallow=all
allow=g729
allow=g723
allow=ulaw
allow=g722
allow=g726
allow=alaw
allow=opus
direct_media=no
26596000
auth=26596000
aors=26596000
[26596000]
type=auth
auth_type=userpass
password=26596000
username=26596000
[26596000]
type=aor
max_contacts=10
;Extensions start here 12345451
[12345451]
type=endpoint
context=from-internal
disallow=all
allow=g729
allow=g723
allow=ulaw
allow=g722
allow=g726
allow=alaw
allow=opus
direct_media=no
use_ptime=yes
auth=12345451
aors=12345451
[12345451]
type=auth
auth_type=userpass
password=pswd12345451
username=12345451
[12345451]
type=aor
max_contacts=1
remove_existing=true
;Extensions start here 12345452
[12345452]
type=endpoint
context=from-internal
disallow=all
allow=g729
allow=g723
allow=ulaw
allow=g722
allow=g726
allow=alaw
allow=opus
direct_media=no
use_ptime=yes
auth=12345452
aors=12345452
[12345452]
type=auth
auth_type=userpass
password=pswd12345452
username=12345452
[12345452]
type=aor
max_contacts=1
remove_existing=true
;Extensions start here 12345453
[12345453]
type=endpoint
context=from-internal
disallow=all
allow=g729
allow=g723
allow=ulaw
allow=g722
allow=g726
allow=alaw
allow=opus
direct_media=no
use_ptime=yes
auth=12345453
aors=12345453
extensions.conf it setup as below:
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
exten=>_12345XXX,1,Dial(PJSIP/${EXTEN},50)