Asterisk 1.6.1 Direct RTP audio on LAN

I have an Asterisk 1.6.1.12 with Freepbx 2.6 machine running on my LAN.
I want to send direct audio between the hardphones.
So Hardphone --> Hardphone, not Hardphone --> Asterisk -->hardphone

In the same LAN I have Multiple Hardphones:
1x Grandstream GXP2000 172.16.0.102
1x Linksys SPA941 172.16.0.178
1x Cisco SPA501G 172.16.0.211

I’m pretty sure that all these Devices support Reinvites.

I have configured all extensions to use canreinvite = yes and NAT=no, allow = alaw.
If I use the same extensions on X-lite softphone direct audio works both ways.

If I call between the hardphones direct audio just works one way.
So if I call between the grandstream GXP2000 and the Linksys SPA941:

asterisk*CLI> sip show channels Peer User/ANR Call ID Format Hold Last Message Expiry 172.16.0.102 105 4dc203f201346e4 0x8 (alaw) No Rx: ACK 172.16.0.178 108 528940f7495f7f0 0x8 (alaw) No Tx: ACK 2 active SIP dialogs

No direct audio on this channel! Audio IP: 172.16.0.113 (local)

asterisk*CLI> sip show channel 4dc203f201346e4
asterisk*CLI>
  * SIP Call
  Curr. trans. direction:  Incoming
  Call-ID:                4dc203f201346e4c@172.16.0.102
  Owner channel ID:       SIP/105-00000069
  Our Codec Capability:   8
  Non-Codec Capability (DTMF):   1
  Their Codec Capability:   7439
  Joint Codec Capability:   8
  Format:                 0x8 (alaw)
  T.38 support            No
  Video support           No
  MaxCallBR:              384 kbps
  Theoretical Address:    172.16.0.102:5060
  Received Address:       172.16.0.102:5060
  SIP Transfer mode:      open
  NAT Support:            RFC3581
  Audio IP:               172.16.0.113 (local)
  Our Tag:                as67fae79e
  Their Tag:              fc0b9f62844e81df
  SIP User agent:         Grandstream GXP2000 1.2.5.3
  Username:               105
  Peername:               105
  Original uri:           sip:105@172.16.0.102:5060
  Caller-ID:              105
  Need Destroy:           No
  Last Message:           Rx: ACK
  Promiscuous Redir:      No
  Route:                  sip:105@172.16.0.102:5060;transport=udp
  DTMF Mode:              rfc2833
  SIP Options:            path replaces replace timer
  Session-Timer:          Active
  S-Timer Interval:       1800
  S-Timer Refresher:      uas
  S-Timer Expirys:        0
  S-Timer Sched Id:       6606
  S-Timer Peer Sts:       Active
  S-Timer Cached Min-SE:  90
  S-Timer Cached SE:      0
  S-Timer Cached Ref:     uas
  S-Timer Cached Mode:    Accept

There is Direct audio on this channel! Audio IP: 172.16.0.102 (Outside bridge)

asterisk*CLI> sip show channel 52
asterisk*CLI>
  * SIP Call
  Curr. trans. direction:  Outgoing
  Call-ID:                528940f7495f7f0274b7af3f617b669f@172.16.0.113
  Owner channel ID:       SIP/108-0000006a
  Our Codec Capability:   8
  Non-Codec Capability (DTMF):   1
  Their Codec Capability:   8
  Joint Codec Capability:   8
  Format:                 0x8 (alaw)
  T.38 support            No
  Video support           No
  MaxCallBR:              384 kbps
  Theoretical Address:    172.16.0.178:5060
  Received Address:       172.16.0.178:5060
  SIP Transfer mode:      open
  NAT Support:            RFC3581
  Audio IP:               172.16.0.102 (Outside bridge)
  Our Tag:                as60bc189a
  Their Tag:              878aa699179a9472i0
  SIP User agent:
  Username:               108
  Peername:               108
  Original uri:           sip:108@172.16.0.178:5060
  Need Destroy:           No
  Last Message:           Tx: ACK
  Promiscuous Redir:      No
  Route:                  sip:108@172.16.0.178:5060
  DTMF Mode:              rfc2833
  SIP Options:            (none)
  Session-Timer:          Inactive

Can anyone tell me how to get direct audio to work both ways?

Thanks in advance,

Jeroenb

X-Lite V3 Build 56125 does not support re-invites. In fact it ignores them, rather than rejecting them properly.

Generally Asterisk will not initiate a re-invite unless it expects it to work on both sides. I’d therefore suggest that one of the remote parties is actually rejecting the re-invite. A full SIP trace is really needed to see exactly what is going wrong.

There are quite a lot of conditions that will inhibit re-invites, but they would affect both directions.

nat=yes causes Asterisk to believe the IP address of the packet, rather than the address contained therein, and applies to the Asterisk outside NAT, terminal inside case, so I think explicitly setting it to the default of no is a red herring here - it isn’t needed anything like as often as it is actually used.

Incidentally, 1.6.1.x is more than a year past end of life, and, from 1.6.2.x (also past end of life), canreinvite has been renamed directmedia, although I don’t think the deprecated name has been removed, yet.

Thanks for the reply,

re-invites seemed to work on X-lite v4 106.
Both channels showed the extensions IP on “audio IP:”

Sip trace:
or download the txt file: urt.co/download/w0j4trd1xa

[code]No. Time Source Destination Protocol Length Info
537 15.631888 172.16.0.102 172.16.0.113 SIP/SDP 950 Request: INVITE sip:108@172.16.0.113, with session description

Frame 537: 950 bytes on wire (7600 bits), 950 bytes captured (7600 bits)
Ethernet II, Src: Grandstr_0c:27:ec (00:0b:82:0c:27:ec), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.102 (172.16.0.102), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
538 15.632921 172.16.0.113 172.16.0.102 SIP 547 Status: 401 Unauthorized

Frame 538: 547 bytes on wire (4376 bits), 547 bytes captured (4376 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Grandstr_0c:27:ec (00:0b:82:0c:27:ec)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.102 (172.16.0.102)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
542 15.666235 172.16.0.102 172.16.0.113 SIP 536 Request: ACK sip:108@172.16.0.113

Frame 542: 536 bytes on wire (4288 bits), 536 bytes captured (4288 bits)
Ethernet II, Src: Grandstr_0c:27:ec (00:0b:82:0c:27:ec), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.102 (172.16.0.102), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
555 15.691663 172.16.0.102 172.16.0.113 SIP/SDP 1112 Request: INVITE sip:108@172.16.0.113, with session description

Frame 555: 1112 bytes on wire (8896 bits), 1112 bytes captured (8896 bits)
Ethernet II, Src: Grandstr_0c:27:ec (00:0b:82:0c:27:ec), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.102 (172.16.0.102), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
556 15.693492 172.16.0.113 172.16.0.102 SIP 536 Status: 100 Trying

Frame 556: 536 bytes on wire (4288 bits), 536 bytes captured (4288 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Grandstr_0c:27:ec (00:0b:82:0c:27:ec)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.102 (172.16.0.102)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
571 16.232488 172.16.0.113 172.16.0.178 SIP/SDP 853 Request: INVITE sip:108@172.16.0.178:5060, with session description

Frame 571: 853 bytes on wire (6824 bits), 853 bytes captured (6824 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.178 (172.16.0.178)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
572 16.234832 172.16.0.113 172.16.0.102 SIP 552 Status: 180 Ringing

Frame 572: 552 bytes on wire (4416 bits), 552 bytes captured (4416 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Grandstr_0c:27:ec (00:0b:82:0c:27:ec)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.102 (172.16.0.102)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
573 16.254193 172.16.0.178 172.16.0.113 SIP 334 Status: 100 Trying

Frame 573: 334 bytes on wire (2672 bits), 334 bytes captured (2672 bits)
Ethernet II, Src: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.178 (172.16.0.178), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
574 16.287554 172.16.0.178 172.16.0.113 SIP 358 Status: 180 Ringing

Frame 574: 358 bytes on wire (2864 bits), 358 bytes captured (2864 bits)
Ethernet II, Src: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.178 (172.16.0.178), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
575 16.294895 172.16.0.113 172.16.0.102 SIP 552 Status: 180 Ringing

Frame 575: 552 bytes on wire (4416 bits), 552 bytes captured (4416 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Grandstr_0c:27:ec (00:0b:82:0c:27:ec)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.102 (172.16.0.102)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
711 18.883779 172.16.0.178 172.16.0.113 SIP/SDP 720 Status: 200 OK, with session description

Frame 711: 720 bytes on wire (5760 bits), 720 bytes captured (5760 bits)
Ethernet II, Src: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.178 (172.16.0.178), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
712 18.885292 172.16.0.113 172.16.0.178 SIP 435 Request: ACK sip:108@172.16.0.178:5060

Frame 712: 435 bytes on wire (3480 bits), 435 bytes captured (3480 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.178 (172.16.0.178)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
713 18.886996 172.16.0.113 172.16.0.102 SIP/SDP 788 Status: 200 OK, with session description

Frame 713: 788 bytes on wire (6304 bits), 788 bytes captured (6304 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Grandstr_0c:27:ec (00:0b:82:0c:27:ec)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.102 (172.16.0.102)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
715 18.924215 172.16.0.102 172.16.0.113 SIP 698 Request: ACK sip:108@172.16.0.113

Frame 715: 698 bytes on wire (5584 bits), 698 bytes captured (5584 bits)
Ethernet II, Src: Grandstr_0c:27:ec (00:0b:82:0c:27:ec), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.102 (172.16.0.102), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2305 30.754776 172.16.0.178 172.16.0.113 SIP 391 Request: BYE sip:105@172.16.0.113

Frame 2305: 391 bytes on wire (3128 bits), 391 bytes captured (3128 bits)
Ethernet II, Src: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.178 (172.16.0.178), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2307 30.762247 172.16.0.113 172.16.0.178 SIP 476 Status: 200 OK

Frame 2307: 476 bytes on wire (3808 bits), 476 bytes captured (3808 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.178 (172.16.0.178)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2311 30.812840 172.16.0.113 172.16.0.102 SIP 462 Request: BYE sip:105@172.16.0.102:5060;transport=udp

Frame 2311: 462 bytes on wire (3696 bits), 462 bytes captured (3696 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Grandstr_0c:27:ec (00:0b:82:0c:27:ec)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.102 (172.16.0.102)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2317 30.842711 172.16.0.102 172.16.0.113 SIP 574 Status: 200 OK

Frame 2317: 574 bytes on wire (4592 bits), 574 bytes captured (4592 bits)
Ethernet II, Src: Grandstr_0c:27:ec (00:0b:82:0c:27:ec), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.102 (172.16.0.102), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2561 37.956918 172.16.0.113 194.140.246.34 SIP 569 Request: OPTIONS sip:voip1.sig.gntel.nl

Frame 2561: 569 bytes on wire (4552 bits), 569 bytes captured (4552 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: Draytek_ca:32:00 (00:50:7f:ca:32:00)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 194.140.246.34 (194.140.246.34)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2562 37.958871 194.140.246.34 172.16.0.113 SIP 386 Status: 200 OK

Frame 2562: 386 bytes on wire (3088 bits), 386 bytes captured (3088 bits)
Ethernet II, Src: Draytek_ca:32:00 (00:50:7f:ca:32:00), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 194.140.246.34 (194.140.246.34), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2611 38.835462 172.16.0.113 172.16.0.178 SIP 567 Request: OPTIONS sip:108@172.16.0.178:5060

Frame 2611: 567 bytes on wire (4536 bits), 567 bytes captured (4536 bits)
Ethernet II, Src: Microsof_00:66:03 (00:15:5d:00:66:03), Dst: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2)
Internet Protocol Version 4, Src: 172.16.0.113 (172.16.0.113), Dst: 172.16.0.178 (172.16.0.178)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol

No. Time Source Destination Protocol Length Info
2612 38.850241 172.16.0.178 172.16.0.113 SIP 442 Status: 200 OK

Frame 2612: 442 bytes on wire (3536 bits), 442 bytes captured (3536 bits)
Ethernet II, Src: CiscoLin_d5:f0:e2 (00:0e:08:d5:f0:e2), Dst: Microsof_00:66:03 (00:15:5d:00:66:03)
Internet Protocol Version 4, Src: 172.16.0.178 (172.16.0.178), Dst: 172.16.0.113 (172.16.0.113)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
[/code]

The trace needs to include the full SIP headers and full SDP payload, e.g. as produced by Asterisk CLI: sip set debug on. Asterisk module level debugging may help, too.

New trace from CLI:
Txt file: urt.co/download/t073cm5br5

[code]To: sip:108@172.16.0.113;tag=as74ae2d87
Call-ID: cfda757dd3561c56@172.16.0.102
CSeq: 53064 INVITE
Server: Asterisk PBX 1.6.1.12
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: sip:108@172.16.0.113
Content-Length: 0

<------------>

<— SIP read from UDP://172.16.0.178:5060 —>
SIP/2.0 100 Trying
To: sip:108@172.16.0.178:5060
From: “De Held” sip:105@172.16.0.113;tag=as1b333f4f
Call-ID: 1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.0.113:5060;branch=z9hG4bK4b1202e6
Server: Linksys/SPA941-5.1.8
Content-Length: 0

<------------->
— (8 headers 0 lines) —
asterisk*CLI>
<— SIP read from UDP://172.16.0.178:5060 —>
SIP/2.0 180 Ringing
To: sip:108@172.16.0.178:5060;tag=b9b797aaf3dbc482i0
From: “De Held” sip:105@172.16.0.113;tag=as1b333f4f
Call-ID: 1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.0.113:5060;branch=z9hG4bK4b1202e6
Server: Linksys/SPA941-5.1.8
Content-Length: 0

<------------->
— (8 headers 0 lines) —
– SIP/108-00000070 is ringing
asterisk*CLI>
<— Transmitting (no NAT) to 172.16.0.102:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.16.0.102:5060;branch=z9hG4bK9b7510fd5a1ab8c3;received=172.16.0.102
From: “105” sip:105@172.16.0.113;tag=ef4022923021ba11
To: sip:108@172.16.0.113;tag=as74ae2d87
Call-ID: cfda757dd3561c56@172.16.0.102
CSeq: 53064 INVITE
Server: Asterisk PBX 1.6.1.12
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: sip:108@172.16.0.113
Content-Length: 0

<------------>
asterisk*CLI>
<— SIP read from UDP://172.16.0.178:5060 —>
SIP/2.0 200 OK
To: sip:108@172.16.0.178:5060;tag=b9b797aaf3dbc482i0
From: “De Held” sip:105@172.16.0.113;tag=as1b333f4f
Call-ID: 1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113
CSeq: 102 INVITE
Via: SIP/2.0/UDP 172.16.0.113:5060;branch=z9hG4bK4b1202e6
Contact: “108” sip:108@172.16.0.178:5060
Server: Linksys/SPA941-5.1.8
Content-Length: 206
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp

v=0
o=- 939429 939429 IN IP4 172.16.0.178
s=-
c=IN IP4 172.16.0.178
t=0 0
m=audio 16430 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv

<------------->
— (12 headers 11 lines) —
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8 (alaw), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 172.16.0.178:16430
list_route: hop: sip:108@172.16.0.178:5060
set_destination: Parsing sip:108@172.16.0.178:5060 for address/port to send to
set_destination: set destination to 172.16.0.178, port 5060
Transmitting (no NAT) to 172.16.0.178:5060:
ACK sip:108@172.16.0.178:5060 SIP/2.0
Via: SIP/2.0/UDP 172.16.0.113:5060;branch=z9hG4bK20b54566;rport
Max-Forwards: 70
From: “De Held” sip:105@172.16.0.113;tag=as1b333f4f
To: sip:108@172.16.0.178:5060;tag=b9b797aaf3dbc482i0
Contact: sip:105@172.16.0.113
Call-ID: 1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.1.12
Content-Length: 0


-- SIP/108-00000070 answered SIP/105-0000006f

Audio is at 172.16.0.113 port 18782
Adding codec 0x8 (alaw) to SDP

<— Reliably Transmitting (no NAT) to 172.16.0.102:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.0.102:5060;branch=z9hG4bK9b7510fd5a1ab8c3;received=172.16.0.102
From: “105” sip:105@172.16.0.113;tag=ef4022923021ba11
To: sip:108@172.16.0.113;tag=as74ae2d87
Call-ID: cfda757dd3561c56@172.16.0.102
CSeq: 53064 INVITE
Server: Asterisk PBX 1.6.1.12
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: sip:108@172.16.0.113
Content-Type: application/sdp
Content-Length: 206

v=0
o=root 807904895 807904895 IN IP4 172.16.0.113
s=Asterisk PBX 1.6.1.12
c=IN IP4 172.16.0.113
t=0 0
m=audio 18782 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
asterisk*CLI>
<— SIP read from UDP://172.16.0.102:5060 —>
ACK sip:108@172.16.0.113 SIP/2.0
Via: SIP/2.0/UDP 172.16.0.102:5060;branch=z9hG4bK80733dded11040bd
From: “105” sip:105@172.16.0.113;tag=ef4022923021ba11
To: sip:108@172.16.0.113;tag=as74ae2d87
Contact: sip:105@172.16.0.102:5060;transport=udp
Supported: path
Authorization: Digest username=“105”, realm=“asterisk”, algorithm=MD5, uri="sip:108@172.16.0.113", nonce=“7bc23161”, response="3386a8b196331ec19e2a56328f4c4478"
Call-ID: cfda757dd3561c56@172.16.0.102
CSeq: 53064 ACK
User-Agent: Grandstream GXP2000 1.2.5.3
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Length: 0

<------------->
— (13 headers 0 lines) —
asterisk*CLI>
<— SIP read from UDP://172.16.0.178:5060 —>
BYE sip:105@172.16.0.113 SIP/2.0
Via: SIP/2.0/UDP 172.16.0.178:5060;branch=z9hG4bK-ebf4cdbf
From: sip:108@172.16.0.178:5060;tag=b9b797aaf3dbc482i0
To: “De Held” sip:105@172.16.0.113;tag=as1b333f4f
Call-ID: 1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113
CSeq: 101 BYE
Max-Forwards: 70
User-Agent: Linksys/SPA941-5.1.8
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to 172.16.0.178 : 5060 (no NAT)
asterisk*CLI>
<— Transmitting (no NAT) to 172.16.0.178:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.0.178:5060;branch=z9hG4bK-ebf4cdbf;received=172.16.0.178
From: sip:108@172.16.0.178:5060;tag=b9b797aaf3dbc482i0
To: “De Held” sip:105@172.16.0.113;tag=as1b333f4f
Call-ID: 1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113
CSeq: 101 BYE
Server: Asterisk PBX 1.6.1.12
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

<------------>
– Executing [h@macro-dial:1] Macro(“SIP/105-0000006f”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/105-0000006f”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/105-0000006f”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/105-0000006f”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/105-0000006f”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/105-0000006f’ in macro ‘hangupcall’
== Spawn extension (macro-dial, h, 1) exited non-zero on ‘SIP/105-0000006f’
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/105-0000006f’ in macro ‘dial’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘SIP/105-0000006f’ in macro ‘exten-vm’
== Spawn extension (from-internal, 108, 1) exited non-zero on ‘SIP/105-0000006f’
– Executing [h@from-internal:1] Macro(“SIP/105-0000006f”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/105-0000006f”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/105-0000006f”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/105-0000006f”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/105-0000006f”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/105-0000006f’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/105-0000006f’
Scheduling destruction of SIP dialog ‘cfda757dd3561c56@172.16.0.102’ in 6400 ms (Method: ACK)
set_destination: Parsing sip:105@172.16.0.102:5060;transport=udp for address/port to send to
set_destination: set destination to 172.16.0.102, port 5060
Reliably Transmitting (no NAT) to 172.16.0.102:5060:
BYE sip:105@172.16.0.102:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 172.16.0.113:5060;branch=z9hG4bK62d0fbd1;rport
Max-Forwards: 70
From: sip:108@172.16.0.113;tag=as74ae2d87
To: “105” sip:105@172.16.0.113;tag=ef4022923021ba11
Call-ID: cfda757dd3561c56@172.16.0.102
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.6.1.12
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


asterisk*CLI>
<— SIP read from UDP://172.16.0.102:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.0.113:5060;branch=z9hG4bK62d0fbd1;rport
From: sip:108@172.16.0.113;tag=as74ae2d87
To: “105” sip:105@172.16.0.113;tag=ef4022923021ba11
Call-ID: cfda757dd3561c56@172.16.0.102
CSeq: 102 BYE
User-Agent: Grandstream GXP2000 1.2.5.3
Session-Expires: 1800;refresher=uac
Min-SE: 1800
Require: timer
Contact: sip:105@172.16.0.102:5060;transport=udp
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------->
— (14 headers 0 lines) —
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog ‘1a5381146f9b36dd51f0d647146d4d2d@172.16.0.113’ Method: BYE
Really destroying SIP dialog ‘cfda757dd3561c56@172.16.0.102’ Method: ACK
asterisk*CLI>
[/code]

That trace is incomplete (missing the start).

There is no re-invite attempted for either party, rather than attempting for one party only. That would suggest that you are not meeting a pre-condition, e.g. you are recording audio, transcoding, or have features.conf options enabled.

The only thing not commented out in features.conf is call parking.

parkext => 700			; What extension to dial to park	(all parking lots)
parkpos => 701-720		; What extensions to park calls on. (defafult parking lot)
				; These needs to be numeric, as Asterisk starts from the start position
				; and increments with one for the next parked call.
context => parkedcalls		; Which context parked calls are in (default parking lot)

Call recording is disabled in FreePBX for the used extensions.

Transcoding?
Allow: Alaw and both hardphones support that codec.

I also just enabled this:
Extension Recording Override: This will override the recording settings of all extensions/users. If enabled, the system will ignore all Record Always settings of a user and will not turn on recording. This does not effect On Demand recording controlled by the dial options ‘w’ and ‘W’ above. It does not effect other recording settings in modules such as Queues and Conferences. If you don’t use recordings, setting this is beneficial to system performance as it removes the check that is otherwise done on every single call.

This did not fix it.

You are getting into FreePBX, rather than Asterisk issues. You might want to redirect this to a FreePBX forum.

In the mean time, what options are used on the Dial application? It is possible that enabling a feature in the Dial application will be partially honoured, even if features.conf doesn’t support it.

I’m also still confused that you originally suggested that it was re-inviting one side, whereas your trace shows no re-invites.

We had very little difficulty enabling direct media, although we used a hand coded dial plan.

With “re-invites seemed to work on X-lite v4 106.” I meant that wen I inspected the channels it said that the audio IP was bridged on both sides.

Under Asterisk Dialcommand options I have the options “t” and "r"
t: Allow the called user to transfer the call by pressing #
r: Generate a ringtone for the calling party

I removed both the “t” and the “r” option and it seems to work now!
Still testing.

“t” would have inhibited direct media.