Asterisk 11.2.1 and sipml5

Good afternoon !

I’m try testing support call from webbrouser(used Chrome v.25) to the testing asterisk server (used asterisk v.11.2.1)and have problem with rtp streams from local network to the asterisk, calling worked but RTP stream from asterisk going to the external ip of my router (i have NAT). Using option “nat=no” not change situation.

All working normaly only if i’m connected to asterisk from internet (external network).

Prompt please why asterisk using external ip of client for RTP if client placed in same network.

The options that primarily control that sort of NAT are not “nat” but localnet, externhost, externip and stunaddr.

You need to provide details of the network topology, and the general and relevant section of sip.conf. Also copies of the incoming and outgoing packets carrying the SDP are likely to be useful.

Actually, on the symptoms described, it would be most likely that the problem lies with the phone, as I can think of no reason for Asterisk to send RTP to an address that didn’t appear in the incoming request, regardless of its NAT settings.

To david55

i’m has to specify that problem showen on connection with browser … on side connection with SIP telephone all worked without problems …

i’m know that for detection network configuration used ICE but don’t known how influences behavior of asterisk then it send RTP to browser back.

i’m try set options icesupport=no im sip.conf in section fot web client but it not change anything …
what else features can be ?

my config - sip.conf
[general]
context=default
allowoverlap=no
udpbindaddr=0.0.0.0:5060
tcpenable=yes
tcpbindaddr=0.0.0.0
srvlookup=no
useragent=Sip Phone
localnet=192.168.0.102/24
externip=178.72.70.49
canreinvite=no
directrtpsetup=no
trustrpid=yes
sendrpid=yes
language=ru
realm=mydomain.local
videosupport=no
directmedia=no
avpf=yes
encryption=no
videosupport=no
transport=udp,ws,wss
icesupport=yes
register => 1569:123456789abc@sip.voip72.ru/1569

[authentication]

[110] - for soft-phone
type=friend
host=dynamic
disallow=all
allow=alaw
allow=ulaw
allow=gsm
qualify=yes
dtmfmode=rfc2833
username=110
secret=abc
context=outgoing_group1
t38pt_udptl=no
nat=no
canreinvite=no
mailbox=110@default
callgroup=0
pickupgroup=0
call-limit=3
language=ru

[201] - for sip telephone
type=friend
host=dynamic
disallow=all
allow=alaw
allow=ulaw
qualify=yes
dtmfmode=rfc2833
username=201
secret=abc
context=outgoing_group1
t38pt_udptl=no
nat=no
canreinvite=no
mailbox=201@default
callgroup=0
pickupgroup=0
call-limit=3
language=ru

[301] - for web client
type=friend
host=dynamic
disallow=all
allow=alaw
allow=ulaw
qualify=yes
dtmfmode=rfc2833
username=301
secret=password
context=outgoing_group1
t38pt_udptl=no
nat=no
canreinvite=no
callgroup=0
pickupgroup=0
language=ru
hasiax = no
hassip = yes
encryption=no
avpf=yes
videosupport=no
directmedia=no

[401] - web client
type=friend
host=dynamic
disallow=all
allow=alaw
allow=ulaw
qualify=yes
dtmfmode=rfc2833
username=401
secret=password
context=outgoing_group1
t38pt_udptl=no
nat=no
canreinvite=no
callgroup=0
pickupgroup=0
language=ru
hasiax = no
hassip = yes
encryption=no
avpf=yes
videosupport=no
directmedia=no

this from log file

[Mar 10 17:29:10] VERBOSE[3758][C-00000000] pbx.c: – Executing [s@macro-dialin-one:11] Dial(“SIP/401-00000000”, “SIP/201,20,”) in new stack
[Mar 10 17:29:10] VERBOSE[3759][C-00000000] app_mixmonitor.c: == Begin MixMonitor Recording SIP/401-00000000
[Mar 10 17:29:11] VERBOSE[3758][C-00000000] netsock2.c: == Using SIP RTP CoS mark 5
[Mar 10 17:29:11] VERBOSE[3758][C-00000000] app_dial.c: – Called SIP/201
[Mar 10 17:29:11] VERBOSE[3758][C-00000000] app_dial.c: – SIP/201-00000001 is ringing
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] app_dial.c: – SIP/201-00000001 answered SIP/401-00000000
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Got RTP packet from 192.168.0.101:11784 (type 08, seq 000474, ts 075680, len 000160)
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Sent RTP packet to 178.72.81.174:59529 (type 08, seq 054088, ts 075680, len 000164)
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Got RTP packet from 192.168.0.101:11784 (type 08, seq 000475, ts 075840, len 000160)
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Sent RTP packet to 178.72.81.174:59529 (type 08, seq 054089, ts 075840, len 000164)
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Got RTP packet from 192.168.0.101:11784 (type 08, seq 000476, ts 076000, len 000160)
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Sent RTP packet to 178.72.81.174:59529 (type 08, seq 054090, ts 076000, len 000164)
[Mar 10 17:29:14] VERBOSE[3758][C-00000000] res_rtp_asterisk.c: Got RTP packet from 192.168.0.101:11784 (type 08, seq 000477, ts 076160, len 000160)

in log is visible that RTP packets retransmiting to ip = 178.72.81.174 it is external IP of my router

ip = 192.168.0.101 it is IP of SIP-telephone

local network is 192.168.0.0/24

my question why asterisk used my external ip for sending RTP back to browser if computer which started brouser is in local network?

localnet=192.168.0.102/24 is invalid, although, if Asterisk is on the same 24 bit sub-net as 192.168.0.102, that might not matter.

Please supply the actual SDP interchanged. The most obvious answer is still that the “browser” told it to do so. The second most obvious answer is that the router told it to do so.

this is from log of asterisk … INVITE recieved from browser ip=192.168.0.100

<— SIP read from WS:192.168.0.100:55959 —>
INVITE sip:201@mydomain.local SIP/2.0
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKnC8a0SthTsSdiQfmZt2TzUzhcvxKTqWz;rport
From: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
To: sip:201@mydomain.local
Contact: "401"sip:401@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=ws;impi=401;ha1=c392953a1cd07609c8f1edf03e704252;+g.oma.sip-im;+sip.ice;language="en,fr"
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 51340 INVITE
Content-Type: application/sdp
Content-Length: 1611
Max-Forwards: 70
Authorization: Digest username=“401”,realm=“mydomain.local”,nonce=“0a55a6b7”,uri=“sip:201@mydomain.local”,response=“cde16e162de89a74df108da5ce4009e3”,algorithm=MD5
User-Agent: IM-client/OMA1.0 sipML5-v1.2013.03.07
Organization: Doubango Telecom

v=0
o=- 2082111429 2 IN IP4 127.0.0.1
s=Doubango Telecom - chrome
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS CK5Ac7yMjcpni7e5ZrDCMYT7vi5Fy8SAgHJ8
m=audio 56762 RTP/SAVPF 103 104 111 0 8 107 106 105 13 126
c=IN IP4 178.72.81.174
a=rtcp:56762 IN IP4 178.72.81.174
a=candidate:2131708102 1 udp 2113937151 192.168.0.100 56762 typ host generation 0
a=candidate:2131708102 2 udp 2113937151 192.168.0.100 56762 typ host generation 0
a=candidate:4266086002 1 udp 1845501695 178.72.81.174 56762 typ srflx raddr 192.168.0.100 rport 56762 generation 0
a=candidate:4266086002 2 udp 1845501695 178.72.81.174 56762 typ srflx raddr 192.168.0.100 rport 56762 generation 0
a=candidate:831304758 1 tcp 1509957375 192.168.0.100 55960 typ host generation 0
a=candidate:831304758 2 tcp 1509957375 192.168.0.100 55960 typ host generation 0
a=ice-ufrag:hvuWUEY3Ci9KfvPi
a=ice-pwd:nMFXRXfMwPJKpxOLSbjumpJw
a=ice-options:google-ice
a=sendrecv
a=mid:audio
a=rtcp-mux
a=crypto:0 AES_CM_128_HMAC_SHA1_32 inline:D+Z1INC1CexhIhhpu3EGl8RgxDRADM+5RUr8PEEg
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:c6AT+WhHPoNizXs1NLSnS9xl5PsJqFmnIG7Xua80
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:111 opus/48000/2
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:107 CN/48000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=ssrc:577744218 cname:M3wKRRNvB+DXHFKp
a=ssrc:577744218 msid:CK5Ac7yMjcpni7e5ZrDCMYT7vi5Fy8SAgHJ8 a0
a=ssrc:577744218 mslabel:CK5Ac7yMjcpni7e5ZrDCMYT7vi5Fy8SAgHJ8
a=ssrc:577744218 label:CK5Ac7yMjcpni7e5ZrDCMYT7vi5Fy8SAgHJ8a0
<------------->
[Mar 10 17:45:47] VERBOSE[3887] chan_sip.c: — (13 headers 37 lines) —
[Mar 10 17:45:47] VERBOSE[3887][C-00000000] chan_sip.c: Using INVITE request as basis request - 2b8fb808-8a2e-0916-2e55-4067876aaf29
[Mar 10 17:45:47] VERBOSE[3887][C-00000000] chan_sip.c: Found peer ‘401’ for ‘401’ from 192.168.0.100:55959
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] netsock2.c: == Using SIP RTP CoS mark 5
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 103
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 104
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 111
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 0
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 8
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 107
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 106
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 105
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 13
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found RTP audio format 126
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found unknown media description format ISAC for ID 103
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found unknown media description format ISAC for ID 104
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found unknown media description format opus for ID 111
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found audio description format PCMU for ID 0
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found audio description format PCMA for ID 8
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found unknown media description format CN for ID 107
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found unknown media description format CN for ID 106
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found unknown media description format CN for ID 105
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found audio description format CN for ID 13
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Found audio description format telephone-event for ID 126
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Capabilities: us - (ulaw|alaw), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x3 (telephone-event|CN|), combined - 0x1 (telephone-event|)
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Peer audio RTP is at port 178.72.81.174:56762
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: Looking for 201 in outgoing_group1 (domain mydomain.local)
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c: list_route: hop: sip:401@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=ws
[Mar 10 17:45:48] VERBOSE[3887][C-00000000] chan_sip.c:
<— Transmitting (no NAT) to 192.168.0.100:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKnC8a0SthTsSdiQfmZt2TzUzhcvxKTqWz;rport;received=192.168.0.100
From: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
To: sip:201@mydomain.local
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 51340 INVITE
Server: Sip Phone
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:201@192.168.0.102:5060;transport=WS
Content-Length: 0

<------------>
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [201@outgoing_group1:1] Macro(“SIP/401-00000000”, “dialin-one,SIP/201,201@default,20,”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:1] Set(“SIP/401-00000000”, “DIAL_DEVICE=SIP/201”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:2] Set(“SIP/401-00000000”, “DIAL_MAILBOX=201@default”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:3] Set(“SIP/401-00000000”, “DIAL_TIMEOUT=20”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:4] Set(“SIP/401-00000000”, “DIAL_OPTIONS=”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:5] NoOp(“SIP/401-00000000”, “Dial-in-local macro Device=SIP/201 MailBox=201@default Timeout=20 Options=”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:6] Set(“SIP/401-00000000”, “CFEXT=”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:7] Set(“SIP/401-00000000”, “CFUEXT=”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:8] Set(“SIP/401-00000000”, “CFBEXT=”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:9] GotoIf(“SIP/401-00000000”, “0?docf,1”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:10] Macro(“SIP/401-00000000”, “record-enable,SIP/201,IN”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:1] Set(“SIP/401-00000000”, “DEVICE=SIP/201”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:2] Set(“SIP/401-00000000”, “DIRECTION=IN”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:3] NoOp(“SIP/401-00000000”, “Record-enable Device=SIP/201 Direction=IN”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:4] ResetCDR(“SIP/401-00000000”, “”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:5] Set(“SIP/401-00000000”, “LOOPCNT=1”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:6] Set(“SIP/401-00000000”, “ITER=1”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:7] Set(“SIP/401-00000000”, “ONEDEV=SIP/201”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:8] GotoIf(“SIP/401-00000000”, “1?in:out”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Goto (macro-record-enable,s,9)
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:9] GotoIf(“SIP/401-00000000”, “1?start”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Goto (macro-record-enable,s,16)
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:16] Set(“SIP/401-00000000”, “RECFORMAT=wav”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:17] NoOp(“SIP/401-00000000”, “Recording enable for SIP/201 filename 1362915948.0.wav”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:18] MixMonitor(“SIP/401-00000000”, “1362915948.0.wav,”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-record-enable:19] MacroExit(“SIP/401-00000000”, “”) in new stack
[Mar 10 17:45:48] VERBOSE[3888][C-00000000] pbx.c: – Executing [s@macro-dialin-one:11] Dial(“SIP/401-00000000”, “SIP/201,20,”) in new stack
[Mar 10 17:45:48] VERBOSE[3889][C-00000000] app_mixmonitor.c: == Begin MixMonitor Recording SIP/401-00000000
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] netsock2.c: == Using SIP RTP CoS mark 5
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] chan_sip.c: Audio is at 25194
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] chan_sip.c: Adding codec 100004 (alaw) to SDP
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] chan_sip.c: Adding codec 100003 (ulaw) to SDP
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.0.101:5062:
INVITE sip:201@192.168.0.101:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK3fa97819
Max-Forwards: 70
From: sip:401@192.168.0.102;tag=as16b630df
To: sip:201@192.168.0.101:5062
Contact: sip:401@192.168.0.102:5060
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 102 INVITE
User-Agent: Sip Phone
Date: Sun, 10 Mar 2013 11:45:49 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Remote-Party-ID: “401” sip:401@192.168.0.102;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 627

v=0
o=root 854732525 854732525 IN IP4 192.168.0.102
s=Asterisk PBX 11.2.1
c=IN IP4 192.168.0.102
t=0 0
m=audio 25194 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:27be03a16a31144c144f611b27ff621f
a=ice-pwd:6c2a672e23c747d40b6631c9245f0fcb
a=candidate:Hc0a80066 1 UDP 2130706431 192.168.0.102 25194 typ host
a=candidate:Sb24851ae 1 UDP 1694498815 178.72.81.174 25194 typ srflx
a=candidate:Hc0a80066 2 UDP 2130706430 192.168.0.102 25195 typ host
a=candidate:Sb24851ae 2 UDP 1694498814 178.72.81.174 25194 typ srflx
a=sendrecv


[Mar 10 17:45:49] VERBOSE[3888][C-00000000] app_dial.c: – Called SIP/201
[Mar 10 17:45:49] VERBOSE[3857] chan_sip.c:
<— SIP read from UDP:192.168.0.101:5062 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK3fa97819
From: sip:401@192.168.0.102;tag=as16b630df
To: sip:201@192.168.0.101:5062
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 102 INVITE
User-Agent: Yealink SIP-T20P 9.60.14.16
Content-Length: 0

<------------->
[Mar 10 17:45:49] VERBOSE[3857] chan_sip.c: — (8 headers 0 lines) —
[Mar 10 17:45:49] VERBOSE[3857] chan_sip.c:
<— SIP read from UDP:192.168.0.101:5062 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK3fa97819
From: sip:401@192.168.0.102;tag=as16b630df
To: sip:201@192.168.0.101:5062;tag=1031870024
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 102 INVITE
Contact: sip:201@192.168.0.101:5062
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
User-Agent: Yealink SIP-T20P 9.60.14.16
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

<------------->
[Mar 10 17:45:49] VERBOSE[3857] chan_sip.c: — (11 headers 0 lines) —
[Mar 10 17:45:49] VERBOSE[3857][C-00000000] chan_sip.c: list_route: hop: sip:201@192.168.0.101:5062
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] app_dial.c: – SIP/201-00000001 is ringing
[Mar 10 17:45:49] VERBOSE[3888][C-00000000] chan_sip.c:
<— Transmitting (no NAT) to 192.168.0.100:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKnC8a0SthTsSdiQfmZt2TzUzhcvxKTqWz;rport;received=192.168.0.100
From: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
To: sip:201@mydomain.local;tag=as10b6c7f2
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 51340 INVITE
Server: Sip Phone
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:201@192.168.0.102:5060;transport=WS
Content-Length: 0

<------------>
[Mar 10 17:45:52] VERBOSE[3857] chan_sip.c: Really destroying SIP dialog ‘24bc438d09960c8552140b0b498cd70e@89.208.157.175’ Method: OPTIONS
[Mar 10 17:45:52] VERBOSE[3857] chan_sip.c:
<— SIP read from UDP:192.168.0.101:5062 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK3fa97819
From: sip:401@192.168.0.102;tag=as16b630df
To: sip:201@192.168.0.101:5062;tag=1031870024
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 102 INVITE
Contact: sip:201@192.168.0.101:5062
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
User-Agent: Yealink SIP-T20P 9.60.14.16
Content-Length: 201

v=0
o=- 20003 20003 IN IP4 192.168.0.101
s=SDP data
c=IN IP4 192.168.0.101
t=0 0
m=audio 11786 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=sendrecv
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
<------------->
[Mar 10 17:45:52] VERBOSE[3857] chan_sip.c: — (11 headers 10 lines) —
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Found RTP audio format 8
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Found RTP audio format 101
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Found audio description format PCMA for ID 8
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Found audio description format telephone-event for ID 101
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Capabilities: us - (ulaw|alaw), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Peer audio RTP is at port 192.168.0.101:11786
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: list_route: hop: sip:201@192.168.0.101:5062
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: set_destination: Parsing sip:201@192.168.0.101:5062 for address/port to send to
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: set_destination: set destination to 192.168.0.101:5062
[Mar 10 17:45:52] VERBOSE[3857][C-00000000] chan_sip.c: Transmitting (no NAT) to 192.168.0.101:5062:
ACK sip:201@192.168.0.101:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK7d73ceab
Max-Forwards: 70
From: sip:401@192.168.0.102;tag=as16b630df
To: sip:201@192.168.0.101:5062;tag=1031870024
Contact: sip:401@192.168.0.102:5060
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 102 ACK
User-Agent: Sip Phone
Content-Length: 0


[Mar 10 17:45:52] VERBOSE[3888][C-00000000] app_dial.c: – SIP/201-00000001 answered SIP/401-00000000
[Mar 10 17:45:52] VERBOSE[3888][C-00000000] chan_sip.c: Audio is at 31364
[Mar 10 17:45:52] VERBOSE[3888][C-00000000] chan_sip.c: Adding codec 100004 (alaw) to SDP
[Mar 10 17:45:52] VERBOSE[3888][C-00000000] chan_sip.c: Adding codec 100003 (ulaw) to SDP
[Mar 10 17:45:52] VERBOSE[3888][C-00000000] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[Mar 10 17:45:52] VERBOSE[3888][C-00000000] chan_sip.c:
<— Reliably Transmitting (no NAT) to 192.168.0.100:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKnC8a0SthTsSdiQfmZt2TzUzhcvxKTqWz;rport;received=192.168.0.100
From: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
To: sip:201@mydomain.local;tag=as10b6c7f2
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 51340 INVITE
Server: Sip Phone
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:201@192.168.0.102:5060;transport=WS
Content-Type: application/sdp
Content-Length: 713

v=0
o=root 331804694 331804694 IN IP4 192.168.0.102
s=Asterisk PBX 11.2.1
c=IN IP4 192.168.0.102
t=0 0
m=audio 31364 RTP/SAVPF 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:521c7e6a7b22d1864409afec305e6d17
a=ice-pwd:6357a5b441bd12ba7bf642842e4f2b17
a=candidate:Hc0a80066 1 UDP 2130706431 192.168.0.102 31364 typ host
a=candidate:Sb24851ae 1 UDP 1694498815 178.72.81.174 31364 typ srflx
a=candidate:Hc0a80066 2 UDP 2130706430 192.168.0.102 31365 typ host
a=candidate:Sb24851ae 2 UDP 1694498814 178.72.81.174 31364 typ srflx
a=sendrecv
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:wRZxxHgpHRC6mZsp/wSNrQiVHqxP7yD61qZpd6Z1

<------------>
[Mar 10 17:45:53] VERBOSE[3887] chan_sip.c:
<— SIP read from WS:192.168.0.100:55959 —>
ACK sip:201@192.168.0.102:5060;transport=WS SIP/2.0
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKkTOdB3a33V8MB7B15J2x;rport
From: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
To: sip:201@mydomain.local;tag=as10b6c7f2
Contact: "401"sip:401@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=ws;+g.oma.sip-im;+sip.ice;language="en,fr"
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 51340 ACK
Content-Length: 0
Max-Forwards: 70
Authorization: Digest username=“401”,realm=“mydomain.local”,nonce=“0a55a6b7”,uri=“sip:201@192.168.0.102:5060;transport=WS”,response=“8418385e56c2a22cf3dbb12dc783be72”,algorithm=MD5
User-Agent: IM-client/OMA1.0 sipML5-v1.2013.03.07
Organization: Doubango Telecom

<------------->
[Mar 10 17:45:53] VERBOSE[3887] chan_sip.c: — (12 headers 0 lines) —
[Mar 10 17:45:59] VERBOSE[3857] chan_sip.c:
<— SIP read from UDP:192.168.0.101:5062 —>
BYE sip:401@192.168.0.102:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:5062;branch=z9hG4bK1211471578
From: sip:201@192.168.0.101:5062;tag=1031870024
To: sip:401@192.168.0.102;tag=as16b630df
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 103 BYE
Contact: sip:201@192.168.0.101:5062
Max-Forwards: 70
User-Agent: Yealink SIP-T20P 9.60.14.16
Content-Length: 0

<------------->
[Mar 10 17:45:59] VERBOSE[3857] chan_sip.c: — (10 headers 0 lines) —
[Mar 10 17:45:59] VERBOSE[3857][C-00000000] chan_sip.c: Sending to 192.168.0.101:5062 (no NAT)
[Mar 10 17:45:59] VERBOSE[3857][C-00000000] chan_sip.c: Scheduling destruction of SIP dialog ‘7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060’ in 6400 ms (Method: BYE)
[Mar 10 17:45:59] VERBOSE[3857][C-00000000] chan_sip.c:
<— Transmitting (no NAT) to 192.168.0.101:5062 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.101:5062;branch=z9hG4bK1211471578;received=192.168.0.101
From: sip:201@192.168.0.101:5062;tag=1031870024
To: sip:401@192.168.0.102;tag=as16b630df
Call-ID: 7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060
CSeq: 103 BYE
Server: Sip Phone
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
[Mar 10 17:45:59] VERBOSE[3888][C-00000000] app_macro.c: == Spawn extension (macro-dialin-one, s, 11) exited non-zero on ‘SIP/401-00000000’ in macro ‘dialin-one’
[Mar 10 17:45:59] VERBOSE[3888][C-00000000] pbx.c: == Spawn extension (outgoing_group1, 201, 1) exited non-zero on ‘SIP/401-00000000’
[Mar 10 17:45:59] VERBOSE[3888][C-00000000] chan_sip.c: Scheduling destruction of SIP dialog ‘2b8fb808-8a2e-0916-2e55-4067876aaf29’ in 12672 ms (Method: INVITE)
[Mar 10 17:45:59] VERBOSE[3888][C-00000000] chan_sip.c: set_destination: Parsing sip:401@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=ws for address/port to send to
[Mar 10 17:45:59] VERBOSE[3888][C-00000000] chan_sip.c: set_destination: URI is for WebSocket, we can’t set destination
[Mar 10 17:45:59] VERBOSE[3888][C-00000000] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.0.100:5060:
BYE sip:401@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=ws SIP/2.0
Via: SIP/2.0/WS 192.168.0.102:5060;branch=z9hG4bK3ea1eb69
Max-Forwards: 70
From: sip:201@mydomain.local;tag=as10b6c7f2
To: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 102 BYE
User-Agent: Sip Phone
Proxy-Authorization: Digest username=“401”, realm=“mydomain.local”, algorithm=MD5, uri=“sip:mydomain.local”, nonce=“0a55a6b7”, response="3d8ba19bb609200966ca7ea5420a647f"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


[Mar 10 17:45:59] VERBOSE[3889][C-00000000] app_mixmonitor.c: == MixMonitor close filestream (mixed)
[Mar 10 17:45:59] VERBOSE[3889][C-00000000] app_mixmonitor.c: == End MixMonitor Recording SIP/401-00000000
[Mar 10 17:45:59] VERBOSE[3887] chan_sip.c:
<— SIP read from WS:192.168.0.100:55959 —>
SIP/2.0 200 OK
Via: SIP/2.0/WS 192.168.0.102:5060;branch=z9hG4bK3ea1eb69
From: sip:201@mydomain.local;tag=as10b6c7f2
To: sip:401@mydomain.local;tag=yncToKTZ45Xs2IRqUTzC
Contact: sip:401@df7jal23ls0d.invalid;transport=ws
Call-ID: 2b8fb808-8a2e-0916-2e55-4067876aaf29
CSeq: 102 BYE
Content-Length: 0

<------------->
[Mar 10 17:45:59] VERBOSE[3887] chan_sip.c: — (8 headers 0 lines) —
[Mar 10 17:45:59] VERBOSE[3887][C-00000000] chan_sip.c: SIP Response message for INCOMING dialog BYE arrived
[Mar 10 17:46:00] VERBOSE[3857] chan_sip.c: Really destroying SIP dialog ‘2b8fb808-8a2e-0916-2e55-4067876aaf29’ Method: INVITE
[Mar 10 17:46:05] VERBOSE[3857] chan_sip.c: Really destroying SIP dialog ‘7c5f20e1573645cd264777660af7c1ca@192.168.0.102:5060’ Method: BYE
[Mar 10 17:46:09] VERBOSE[3857] chan_sip.c:
<— SIP read from UDP:192.168.0.101:5062 —>

<------------->
[Mar 10 17:46:15] VERBOSE[3857] chan_sip.c: Really destroying SIP dialog ‘43d5524d-00c1-86c7-c4db-3a0ffe56558a’ Method: REGISTER
[Mar 10 17:46:19] VERBOSE[3857] chan_sip.c: Reliably Transmitting (no NAT) to 192.168.0.101:5062:
OPTIONS sip:201@192.168.0.101:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK3be1eea0
Max-Forwards: 70
From: “asterisk” sip:asterisk@192.168.0.102;tag=as11639241
To: sip:201@192.168.0.101:5062
Contact: sip:asterisk@192.168.0.102:5060
Call-ID: 6c693990025958d162ba68812a7f073b@192.168.0.102:5060
CSeq: 102 OPTIONS
User-Agent: Sip Phone
Date: Sun, 10 Mar 2013 11:46:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


[Mar 10 17:46:19] VERBOSE[3857] chan_sip.c:
<— SIP read from UDP:192.168.0.101:5062 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.102:5060;branch=z9hG4bK3be1eea0
From: “asterisk” sip:asterisk@192.168.0.102;tag=as11639241
To: sip:201@192.168.0.101:5062;tag=435042797
Call-ID: 6c693990025958d162ba68812a7f073b@192.168.0.102:5060
CSeq: 102 OPTIONS
User-Agent: Yealink SIP-T20P 9.60.14.16
Content-Length: 0

It is sending to the 178.72.81.174 address because this line, from the IM-client/OMA1.0 sipML5-v1.2013.03.07, is telling it to do so:

c=IN IP4 178.72.81.174

as I understand it is specific of sipml5 realisation , I am right?

but in this lines

a=candidate:2131708102 1 udp 2113937151 192.168.0.100 56762 typ host generation 0
a=candidate:2131708102 2 udp 2113937151 192.168.0.100 56762 typ host generation 0
a=candidate:4266086002 1 udp 1845501695 178.72.81.174 56762 typ srflx raddr 192.168.0.100 rport 56762 generation 0
a=candidate:4266086002 2 udp 1845501695 178.72.81.174 56762 typ srflx raddr 192.168.0.100 rport 56762 generation 0
a=candidate:831304758 1 tcp 1509957375 192.168.0.100 55960 typ host generation 0
a=candidate:831304758 2 tcp 1509957375 192.168.0.100 55960 typ host generation 0

exist candidats with ip 192.168.0.100 it is local ip of client … why asterisk not used local ip ?
in sip.conf option nat=no …

ICE is new and therefore optional, so it would be valid to ignore those lines. However it does seem that that version of Asterisk does have some support for it. As I normally use versions of Asterisk that don’t support it, I don’t have the depth of knowledge on this topic to take it further.

On the other hand, it does look like the “generation 0” extension attribute may have confused the parser, as it looks like it is detecting relays by the length of the request and discarding the raddr and rport fields, so it thinks generation is “raddr”, 0 is the address, and the port information is missing.

I’d agree that is an RFC violation, but I’m not sure if it would be accepted a as a bug report, or treated as feature request. That depends on whether they intended to comply.

To david55 …
please tell whom I can redirect this question?

You either need to submit a bug report, on the assumption that full RFC compliance was required (issues.asterisk.org/jira), or you need to test the waters on the developer mailing list or IRC channel.

If submitting a bug report, make sure you include all the trace information and the information from my analysis. Also link to this thread, but do not rely on the link as a substitute for a self contained bug report.

Please don’t expect anything to get fixed for several months.

Also, please understand that this is a peer support forum, so everyone responding is a volunteer. Although I think it unlikely in this case, someone else reading this thread may have more information.

Thanks for the help, as explained to me in forum Google, this is the Problem sipml5 implementation and there is a patch to address the problem on the side of Asterisk. The problem is that, on the side sipml5, implementation does not fully correspond to the RFC.

In the near future I will try to use this patch, and then I’ll write about the results.

Sorry for my english :smile: