Hi all<br><br>my asterisk server, 2 sip client softphones are the same LAN<br><br>asterisk ip address : 192.168.1.5<br>sip client 1 : 192.168.1.4<br>sip client 2 : 192.168.1.2<br><br>asterisk starts ok with sip<br><br>setup the sip.conf<br>
[test]<br>type=friend<br>username=test<br>secret=1000<br>host=dynamic<br>context=cucku<br>directmedia=yes<br>directrtpsetup=yes<br><br>[1000]<br>type=friend<br>username=1000<br>secret=1000<br>host=dynamic<br>context=cucku<br>
directmedia=yes<br>directrtpsetup=yes<br><br>when make call between 2 sip clients and see the debug in asterisk console<br>the problem is asterisk setup the inital call for media = asterisk IP address, when all things done, asterisk does re-invite to setup the rtp directly between 2 sip clients<br>
<br>is there any way to setup rtp directly between 2 sip clients, no need to go through asterisk server<br><br>here is my debug log:<br>&lt;--- SIP read from UDP://<a href="http://192.168.1.4:18341">192.168.1.4:18341</a> ---&gt;<br>
INVITE <a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a> SIP/2.0<br>Via: SIP/2.0/UDP 192.168.1.4:18341;branch=z9hG4bK-d8754z-da695e1f167deb68-1---d8754z-;rport<br>Max-Forwards: 70<br>Contact: &lt;<a href="http://sip:test@192.168.1.4:18341">sip:test@192.168.1.4:18341</a>&gt;<br>
To: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>
CSeq: 2 INVITE<br>Content-Type: application/sdp<br>User-Agent: X-Lite release 1104o stamp 56125<br>Content-Length: 261<br>v=0<br>o=- 8 2 IN IP4 192.168.1.4<br>s=CounterPath X-Lite 3.0<br>c=IN IP4 192.168.1.4<br>t=0 0<br>m=audio 50420 RTP/AVP 107 0 8 101<br>
<br>&lt;--- Transmitting (no NAT) to <a href="http://192.168.1.4:18341">192.168.1.4:18341</a> ---&gt;<br>SIP/2.0 100 Trying<br>Via: SIP/2.0/UDP 192.168.1.4:18341;branch=z9hG4bK-d8754z-da695e1f167deb68-1---d8754z-;received=192.168.1.4;rport=18341<br>
From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>To: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>
CSeq: 2 INVITE<br>User-Agent: Asterisk PBX 1.6.0.26<br>Supported: replaces, timer<br>Contact: &lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>Content-Length: 0<br><br>Reliably Transmitting (no NAT) to <a href="http://192.168.1.2:34312">192.168.1.2:34312</a>:<br>
INVITE sip:1000@192.168.1.2:34312;rinstance=862211afcf483176 SIP/2.0<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK2dfa6cce;rport<br>Max-Forwards: 70<br>From: &quot;Do Nguyen Ha&quot; &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>
To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;<br>Contact: &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;<br>Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>
CSeq: 102 INVITE<br>User-Agent: Asterisk PBX 1.6.0.26<br>Date: Thu, 25 Mar 2010 12:15:05 GMT<br>Supported: replaces, timer<br>Content-Type: application/sdp<br>Content-Length: 309<br>v=0<br>o=root 1983608375 1983608375 IN IP4 192.168.1.5<br>
s=Asterisk PBX 1.6.0.26<br>c=IN IP4 192.168.1.5<br>t=0 0<br>m=audio 17580 RTP/AVP 0 3 8 101<br><br>&lt;--- SIP read from UDP://<a href="http://192.168.1.2:34312">192.168.1.2:34312</a> ---&gt;<br>SIP/2.0 180 Ringing<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK2dfa6cce;rport=5060<br>
Contact: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;<br>To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;;tag=403c255c<br>From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>
Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>CSeq: 102 INVITE<br>User-Agent: X-Lite release 1104o stamp 56125<br>Content-Length: 0<br><br><br>&lt;--- Transmitting (no NAT) to <a href="http://192.168.1.4:18341">192.168.1.4:18341</a> ---&gt;<br>
SIP/2.0 180 Ringing<br>Via: SIP/2.0/UDP 192.168.1.4:18341;branch=z9hG4bK-d8754z-da695e1f167deb68-1---d8754z-;received=192.168.1.4;rport=18341<br>From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>
To: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;;tag=as0307d0b3<br>Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>CSeq: 2 INVITE<br>User-Agent: Asterisk PBX 1.6.0.26<br>
Supported: replaces, timer<br>ontact: &lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>Content-Length: 0<br><br><br>&lt;--- SIP read from UDP://<a href="http://192.168.1.2:34312">192.168.1.2:34312</a> ---&gt;<br>
SIP/2.0 200 OK<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK2dfa6cce;rport=5060<br>Contact: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;<br>To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;;tag=403c255c<br>
From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>
CSeq: 102 INVITE<br>Content-Type: application/sdp<br>User-Agent: X-Lite release 1104o stamp 56125<br>Content-Length: 183<br>v=0<br>o=- 8 2 IN IP4 192.168.1.2<br>s=CounterPath X-Lite 3.0<br>c=IN IP4 192.168.1.2<br>t=0 0<br>
m=audio 53062 RTP/AVP 0 8 101<br><br>&lt;-------------&gt;<br>ACK sip:1000@192.168.1.2:34312;rinstance=862211afcf483176 SIP/2.0<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK2852e1cc;rport<br>Max-Forwards: 70<br>From: &quot;Do Nguyen Ha&quot; &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>
To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;;tag=403c255c<br>Contact: &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;<br>Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>
CSeq: 102 ACK<br>User-Agent: Asterisk PBX 1.6.0.26<br>Content-Length: 0<br><br>&lt;--- Reliably Transmitting (no NAT) to <a href="http://192.168.1.4:18341">192.168.1.4:18341</a> ---&gt;<br>SIP/2.0 200 OK<br>Via: SIP/2.0/UDP 192.168.1.4:18341;branch=z9hG4bK-d8754z-da695e1f167deb68-1---d8754z-;received=192.168.1.4;rport=18341<br>
From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>To: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;;tag=as0307d0b3<br>
Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>CSeq: 2 INVITE<br>User-Agent: Asterisk PBX 1.6.0.26<br>Supported: replaces, timer<br>Contact: &lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>
Content-Type: application/sdp<br>Content-Length: 286<br>v=0<br>o=root 1290114102 1290114102 IN IP4 192.168.1.5<br>s=Asterisk PBX 1.6.0.26<br>c=IN IP4 192.168.1.5<br>t=0 0<br>m=audio 18366 RTP/AVP 0 8 101<br><br><br>Reliably Transmitting (no NAT) to <a href="http://192.168.1.2:34312">192.168.1.2:34312</a>:<br>
INVITE sip:1000@192.168.1.2:34312;rinstance=862211afcf483176 SIP/2.0<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK39e834a9;rport<br>Max-Forwards: 70<br>From: &quot;Do Nguyen Ha&quot; &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>
To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;;tag=403c255c<br>Contact: &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;<br>Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>
CSeq: 103 INVITE<br>User-Agent: Asterisk PBX 1.6.0.26<br>Supported: replaces, timer<br>X-asterisk-Info: SIP re-invite (External RTP bridge)<br>Content-Type: application/sdp<br>Content-Length: 286<br>v=0<br>o=root 1983608375 1983608376 IN IP4 192.168.1.4<br>
s=Asterisk PBX 1.6.0.26<br>c=IN IP4 192.168.1.4<br>t=0 0<br>m=audio 50420 RTP/AVP 0 8 101<br><br>&lt;--- SIP read from UDP://<a href="http://192.168.1.2:34312">192.168.1.2:34312</a> ---&gt;<br>SIP/2.0 100 Trying<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK39e834a9;rport=5060<br>
To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;;tag=403c255c<br>From: &quot;Do Nguyen Ha&quot; &lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>
CSeq: 103 INVITE<br>Content-Length: 0<br><br><br>&lt;--- SIP read from UDP://<a href="http://192.168.1.4:18341">192.168.1.4:18341</a> ---&gt;<br>ACK <a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a> SIP/2.0<br>
Via: SIP/2.0/UDP 192.168.1.4:18341;branch=z9hG4bK-d8754z-e104ab75c9163459-1---d8754z-;rport<br>Max-Forwards: 70<br>Contact: &lt;<a href="http://sip:test@192.168.1.4:18341">sip:test@192.168.1.4:18341</a>&gt;<br>To: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;;tag=as0307d0b3<br>
From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>CSeq: 2 ACK<br>User-Agent: X-Lite release 1104o stamp 56125<br>
Authorization: Digest username=&quot;test&quot;,realm=&quot;asterisk&quot;,nonce=&quot;44b4dd5e&quot;,uri=&quot;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&quot;,response=&quot;540173a06f742b7f11cde8010f90ec26&quot;,algorithm=MD5<br>
Content-Length: 0<br><br><br>&lt;-------------&gt;<br>Reliably Transmitting (no NAT) to <a href="http://192.168.1.4:18341">192.168.1.4:18341</a>:<br>INVITE <a href="http://sip:test@192.168.1.4:18341">sip:test@192.168.1.4:18341</a> SIP/2.0<br>
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK584d3aaf;rport<br>Max-Forwards: 70<br>From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;;tag=as0307d0b3<br>To: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>
Contact: &lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>CSeq: 102 INVITE<br>User-Agent: Asterisk PBX 1.6.0.26<br>Supported: replaces, timer<br>
X-asterisk-Info: SIP re-invite (External RTP bridge)<br>Content-Type: application/sdp<br>Content-Length: 286<br>v=0<br>o=root 1290114102 1290114103 IN IP4 192.168.1.2<br>s=Asterisk PBX 1.6.0.26<br>c=IN IP4 192.168.1.2<br>
t=0 0<br>m=audio 53062 RTP/AVP 0 8 101<br><br>&lt;--- SIP read from UDP://<a href="http://192.168.1.4:18341">192.168.1.4:18341</a> ---&gt;<br>SIP/2.0 200 OK<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK584d3aaf;rport=5060<br>
Contact: &lt;<a href="http://sip:test@192.168.1.4:18341">sip:test@192.168.1.4:18341</a>&gt;<br>To: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;;tag=as0307d0b3<br>
Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>CSeq: 102 INVITE<br>Content-Type: application/sdp<br>User-Agent: X-Lite release 1104o stamp 56125<br>Content-Length: 183<br>v=0<br>o=- 8 3 IN IP4 192.168.1.4<br>s=CounterPath X-Lite 3.0<br>
c=IN IP4 192.168.1.4<br>t=0 0<br>m=audio 50420 RTP/AVP 0 8 101<br><br>&lt;-------------&gt;<br>Transmitting (no NAT) to <a href="http://192.168.1.4:18341">192.168.1.4:18341</a>:<br>ACK <a href="http://sip:test@192.168.1.4:18341">sip:test@192.168.1.4:18341</a> SIP/2.0<br>
Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK5dde1d6e;rport<br>Max-Forwards: 70<br>From: &quot;1000&quot;&lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;;tag=as0307d0b3<br>To: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=f543a140<br>
Contact: &lt;<a href="mailto:sip%3A1000@192.168.1.5">sip:1000@192.168.1.5</a>&gt;<br>Call-ID: MjFlODY2MmE0OTBmMzE2ZDJhMWEzN2ZmYzUwM2ZkODg.<br>CSeq: 102 ACK<br>User-Agent: Asterisk PBX 1.6.0.26<br>Content-Length: 0<br><br>
&lt;--- SIP read from UDP://<a href="http://192.168.1.2:34312">192.168.1.2:34312</a> ---&gt;<br>SIP/2.0 200 OK<br>Via: SIP/2.0/UDP 192.168.1.5:5060;branch=z9hG4bK39e834a9;rport=5060<br>Contact: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;<br>
To: &lt;sip:1000@192.168.1.2:34312;rinstance=862211afcf483176&gt;;tag=403c255c<br>From: &quot;Do Nguyen Ha&quot;&lt;<a href="mailto:sip%3Atest@192.168.1.5">sip:test@192.168.1.5</a>&gt;;tag=as2886cf30<br>Call-ID: <a href="mailto:5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5">5fcaa0dc5dd8cac86f01164b2ea6d03a@192.168.1.5</a><br>
CSeq: 103 INVITE<br>Content-Type: application/sdp<br>User-Agent: X-Lite release 1104o stamp 56125<br>Content-Length: 183<br>v=0<br>o=- 8 2 IN IP4 192.168.1.2<br>s=CounterPath X-Lite 3.0<br>c=IN IP4 192.168.1.2<br>t=0 0<br>
m=audio 53062 RTP/AVP 0 8 101<br><br>Thank you<br><br>