packet2packet bridging configuration &native_rtp audio issue

Hi,

I am running asterisk version Asterisk 12.3.2

[quote]I want to configure asterisk to do peer2peer calling or calling in packet2packet bridging mode
Here is my configuration file say’s[/quote]

1060] ; This will be WebRTC client
type=friend
username=1060 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=sameer ; The SIP Password for SIP.js
;encryption=yes ; Tell Asterisk to use encryption for this peer
;avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
ignorecryptolifetime=yes
context=sameer ; Tell Asterisk which context to use when this peer is dialing
directmedia=yes ; Asterisk will relay media for this peer
transport=udp,ws ;Asterisk will allow this peer to register on UDP or WebSockets
;disallow=allow
;allow=gsm
canreinvite=yes
directrtpsetup=yes
nat=yes
;dtmfmode=rfc2833

[1061] ; This will be the legacy SIP client
type=friend
username=1061
host=dynamic
secret=sameer
context=sameer
ignorecryptolifetime=yes
nat=yes
;encryption=yes
;avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
;context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=yes ; Asterisk will relay media for this peer
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets
;disallow=allow
;allow=gsm
canreinvite=yes
directrtpsetup=yes
;dtmfmode=rfc2833

case one:
if i enable jitbuffer with this

It gives me following logs

== Spawn extension (sameer, 1061, 1) exited non-zero on ‘SIP/1060-00000033’
== Using SIP RTP CoS mark 5
– Executing [1061@sameer:1] Dial(“SIP/1060-00000037”, “SIP/1061”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/1061
– SIP/1061-00000038 is ringing
> 0x7f68000344e0 – Probation passed - setting RTP source address to 192.168.1.176:8000
> 0x7f68000344e0 – Probation passed - setting RTP source address to 192.168.1.176:8000
– SIP/1061-00000038 answered SIP/1060-00000037
– Channel SIP/1061-00000038 joined ‘simple_bridge’ basic-bridge <8748a330-a66d-4c67-af90-9f46e3e8eada>
– Channel SIP/1060-00000037 joined ‘simple_bridge’ basic-bridge <8748a330-a66d-4c67-af90-9f46e3e8eada>
> 0x7f68000344e0 – Probation passed - setting RTP source address to 192.168.1.176:8000
> 0x7f678004c3d0 – Probation passed - setting RTP source address to 192.168.1.191:8000
> 0x7f68000344e0 – Probation passed - setting RTP source address to 192.168.1.176:8000
> 0x7f678004c3d0 – Probation passed - setting RTP source address to 192.168.1.191:8000
– Channel SIP/1060-00000037 left ‘simple_bridge’ basic-bridge <8748a330-a66d-4c67-af90-9f46e3e8eada>
– Channel SIP/1061-00000038 left ‘simple_bridge’ basic-bridge <8748a330-a66d-4c67-af90-9f46e3e8eada>
== Spawn extension (sameer, 1061, 1) exited non-zero on 'SIP/1060-00000037’
amritCLI>
amrit
CLI>

It shows that the call currently is in simple bridging mode and in this case i am able to receive audio

case two
if i disable the jitbuffer then I did not receive the audio and the log say’s

Packet timed out after 32001ms with no response
== Using SIP RTP CoS mark 5
– Executing [1061@sameer:1] Dial(“SIP/1060-00000043”, “SIP/1061”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/1061
– SIP/1061-00000044 is ringing
> 0x7f675c01f970 – Probation passed - setting RTP source address to 192.168.1.176:8000
> 0x7f675c01f970 – Probation passed - setting RTP source address to 192.168.1.176:8000
– SIP/1061-00000044 answered SIP/1060-00000043
– Channel SIP/1061-00000044 joined ‘simple_bridge’ basic-bridge
– Channel SIP/1060-00000043 joined ‘simple_bridge’ basic-bridge
> Bridge d08b8c7a-95bc-4f67-bf5e-3f4956a9623a: switching from simple_bridge technology to native_rtp
> 0x7f675c01f970 – Probation passed - setting RTP source address to 192.168.1.176:8000
> 0x7f675c01f970 – Probation passed - setting RTP source address to 192.168.1.176:8000
[Jul 1 20:11:45] WARNING[13327]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 2009bc424d378e4563eed9936ebcf903@192.168.1.151:5060 for seqno 103 (Critical Request) – See wiki.asterisk.org/wiki/display/ … nsmissions
Packet timed out after 32001ms with no response
[Jul 1 20:11:45] WARNING[13327]: chan_sip.c:4283 retrans_pkt: Hanging up call 2009bc424d378e4563eed9936ebcf903@192.168.1.151:5060 - no reply to our critical packet (see wiki.asterisk.org/wiki/display/ … nsmissions).
– Channel SIP/1061-00000044 left ‘native_rtp’ basic-bridge
– Channel SIP/1060-00000043 left ‘native_rtp’ basic-bridge
== Spawn extension (sameer, 1061, 1) exited non-zero on ‘SIP/1060-00000043’

In the above it shows the simple bridge is shifted to the native_rtp mode but i am not getting the audio

What I want is to establish and monitor the call for balance deduction but the audio traffic should route directly so that the load of the server is reduces as I will have very heavy traffic for calls.

Please help me with the configuration setting

Fix this problem first:

[Jul 1 20:11:45] WARNING[13327]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 2009bc424d378e4563eed9936ebcf903@192.168.1.151:5060 for seqno 103 (Critical Request) – See wiki.asterisk.org/wiki/display/ … nsmissions

That suggests a bad NAT configuration or a peer with broken re-invite support.

Also note that you have several deprecated, or even no longer supported, options in your configuration.