there is exactly what I did in try2:
exten => przychodzace,n,Dial(SIP/extravoip.pl/${fwdnumber})
full log of call with SIP headers:
log replacements:
400500600 is caller number
700800900 is number forwarded to.
and ip as my_very_normal_ip
<--- SIP read from UDP:80.72.37.28:5060 --->
INVITE sip:przychodzace2@my_very_normal_ip:5060 SIP/2.0
Record-Route: <sip:80.72.37.28:5060;lr;ftag=e96876b50aae3795126f69319e2879c1>
Via: SIP/2.0/UDP 80.72.37.28:5060;branch=z9hG4bK5383.1eb672d5.0
Via: SIP/2.0/UDP 80.72.35.106:5061;received=80.72.35.106;branch=z9hG4bKe6351dbf98fcc16d504cffed124c627c;rport=5061
Max-Forwards: 69
From: 400500600 <sip:400500600@80.72.35.106>;tag=e96876b50aae3795126f69319e2879c1
To: <sip:extravoip_717528_2@80.72.37.28>
Call-ID: Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
CSeq: 200 INVITE
Contact: Anonymous <sip:400500600@80.72.35.106:5061>
Expires: 300
User-Agent: NetCentrica B2BUA (S2)
X-dialed-number: 222478023
Content-Type: application/sdp
Content-Length: 318
v=0
o=- 1407375013465 1407375013465 IN IP4 80.72.35.106
s=Z
c=IN IP4 80.72.35.106
t=0 0
m=audio 55724 RTP/AVP 3 98 8 0 101
a=rtpmap:3 GSM/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=30
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=nortpproxy:yes
<------------->
--- (15 headers 15 lines) ---
Sending to 80.72.37.28:5060 (NAT)
Using INVITE request as basis request - Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
Found peer 'extravoip1' for '400500600' from 80.72.37.28:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 3
Found RTP audio format 98
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format GSM for ID 3
Found audio description format iLBC for ID 98
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10010c (ulaw|alaw|g729|h263p), peer - audio=0x40e (gsm|ulaw|alaw|ilbc)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 80.72.35.106:55724
Looking for przychodzace2 in extravoip1 (domain my_very_normal_ip)
list_route: hop: <sip:80.72.37.28:5060;lr;ftag=e96876b50aae3795126f69319e2879c1>
<--- Transmitting (no NAT) to 80.72.37.28:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 80.72.37.28:5060;branch=z9hG4bK5383.1eb672d5.0;received=80.72.37.28
Via: SIP/2.0/UDP 80.72.35.106:5061;received=80.72.35.106;branch=z9hG4bKe6351dbf98fcc16d504cffed124c627c;rport=5061
Record-Route: <sip:80.72.37.28:5060;lr;ftag=e96876b50aae3795126f69319e2879c1>
From: 400500600 <sip:400500600@80.72.35.106>;tag=e96876b50aae3795126f69319e2879c1
To: <sip:extravoip_717528_2@80.72.37.28>
Call-ID: Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
CSeq: 200 INVITE
Server: Asterisk PBX SVN-branch-1.8-r418504
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:przychodzace2@my_very_normal_ip:5060>
Content-Length: 0
<------------>
-- Executing [przychodzace2@extravoip1:1] Ringing("SIP/extravoip1-00000000", "") in new stack
<--- Transmitting (no NAT) to 80.72.37.28:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 80.72.37.28:5060;branch=z9hG4bK5383.1eb672d5.0;received=80.72.37.28
Via: SIP/2.0/UDP 80.72.35.106:5061;received=80.72.35.106;branch=z9hG4bKe6351dbf98fcc16d504cffed124c627c;rport=5061
Record-Route: <sip:80.72.37.28:5060;lr;ftag=e96876b50aae3795126f69319e2879c1>
From: 400500600 <sip:400500600@80.72.35.106>;tag=e96876b50aae3795126f69319e2879c1
To: <sip:extravoip_717528_2@80.72.37.28>;tag=as758822aa
Call-ID: Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
CSeq: 200 INVITE
Server: Asterisk PBX SVN-branch-1.8-r418504
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:przychodzace2@my_very_normal_ip:5060>
Content-Length: 0
<------------>
-- Executing [przychodzace2@extravoip1:2] Wait("SIP/extravoip1-00000000", "1") in new stack
-- Executing [przychodzace2@extravoip1:3] Answer("SIP/extravoip1-00000000", "") in new stack
Audio is at 19726
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (no NAT) to 80.72.37.28:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 80.72.37.28:5060;branch=z9hG4bK5383.1eb672d5.0;received=80.72.37.28
Via: SIP/2.0/UDP 80.72.35.106:5061;received=80.72.35.106;branch=z9hG4bKe6351dbf98fcc16d504cffed124c627c;rport=5061
Record-Route: <sip:80.72.37.28:5060;lr;ftag=e96876b50aae3795126f69319e2879c1>
From: 400500600 <sip:400500600@80.72.35.106>;tag=e96876b50aae3795126f69319e2879c1
To: <sip:extravoip_717528_2@80.72.37.28>;tag=as758822aa
Call-ID: Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
CSeq: 200 INVITE
Server: Asterisk PBX SVN-branch-1.8-r418504
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:przychodzace2@my_very_normal_ip:5060>
Content-Type: application/sdp
Content-Length: 277
v=0
o=root 1417658442 1417658442 IN IP4 my_very_normal_ip
s=Asterisk PBX SVN-branch-1.8-r418504
c=IN IP4 my_very_normal_ip
t=0 0
m=audio 19726 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=sendrecv
<------------>
<--- SIP read from UDP:80.72.37.28:5060 --->
ACK sip:przychodzace2@my_very_normal_ip:5060 SIP/2.0
Via: SIP/2.0/UDP 80.72.37.28:5060;branch=z9hG4bK5383.1eb672d5.2
Via: SIP/2.0/UDP 80.72.35.106:5061;received=80.72.35.106;rport=5061;branch=z9hG4bKa6895dd71eaf0f2f2f05950c6bd1c11c
Max-Forwards: 69
From: 400500600 <sip:400500600@80.72.35.106>;tag=e96876b50aae3795126f69319e2879c1
To: <sip:extravoip_717528_2@80.72.37.28>;tag=as758822aa
Call-ID: Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
CSeq: 200 ACK
User-Agent: NetCentrica B2BUA (S2)
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
-- Executing [przychodzace2@extravoip1:4] Set("SIP/extravoip1-00000000", "fwdnumber=700800900") in new stack
-- Executing [przychodzace2@extravoip1:5] Dial("SIP/extravoip1-00000000", "SIP/sip.extravoip.pl/700800900") in new stack
== Using SIP RTP CoS mark 5
Audio is at 11906
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x800000000000 (testlaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 80.72.37.28:5060:
INVITE sip:700800900@sip.extravoip.pl SIP/2.0
Via: SIP/2.0/UDP my_very_normal_ip:5060;branch=z9hG4bK5d71140c;rport
Max-Forwards: 70
From: "400500600" <sip:400500600@my_very_normal_ip>;tag=as1fb9d0ee
To: <sip:700800900@sip.extravoip.pl>
Contact: <sip:400500600@my_very_normal_ip:5060>
Call-ID: 6400b7c2597849b361bfda5023d28e64@my_very_normal_ip:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r418504
Date: Thu, 07 Aug 2014 04:44:56 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 298
v=0
o=root 256154652 256154652 IN IP4 my_very_normal_ip
s=Asterisk PBX SVN-branch-1.8-r418504
c=IN IP4 my_very_normal_ip
t=0 0
m=audio 11906 RTP/AVP 8 3 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
---
-- Called SIP/sip.extravoip.pl/700800900
<--- SIP read from UDP:80.72.37.28:5060 --->
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP my_very_normal_ip:5060;received=my_very_normal_ip;branch=z9hG4bK5d71140c;rport=5060
From: "400500600" <sip:400500600@my_very_normal_ip>;tag=as1fb9d0ee
To: <sip:700800900@sip.extravoip.pl>
Call-ID: 6400b7c2597849b361bfda5023d28e64@my_very_normal_ip:5060
CSeq: 102 INVITE
Server: NetCentrica SIP LB
Content-Length: 0
Warning: 392 80.72.37.28:5060 "Noisy feedback tells: pid=20978 req_src_ip=my_very_normal_ip req_src_port=5060 in_uri=sip:700800900@sip.extravoip.pl out_uri=sip:700800900@sip.extravoip.pl via_cnt==1"
<------------->
--- (9 headers 0 lines) ---
<--- SIP read from UDP:80.72.37.28:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP my_very_normal_ip:5060;received=my_very_normal_ip;branch=z9hG4bK5d71140c;rport=5060
From: "400500600" <sip:400500600@my_very_normal_ip>;tag=as1fb9d0ee
To: <sip:700800900@sip.extravoip.pl>;tag=d0b580866bbefc48e8393552524e82ac.91b4
Call-ID: 6400b7c2597849b361bfda5023d28e64@my_very_normal_ip:5060
CSeq: 102 INVITE
Proxy-Authenticate: Digest realm="my_very_normal_ip", nonce="53e30567000020404d1db1a89a4e7b8bf62abddf68cf3cb0"
Server: NetCentrica SIP Proxy (S.1)
Content-Length: 0
------------->
--- (9 headers 0 lines) ---
Transmitting (NAT) to 80.72.37.28:5060:
ACK sip:700800900@sip.extravoip.pl SIP/2.0
Via: SIP/2.0/UDP my_very_normal_ip:5060;branch=z9hG4bK5d71140c;rport
Max-Forwards: 70
From: "400500600" <sip:400500600@my_very_normal_ip>;tag=as1fb9d0ee
To: <sip:700800900@sip.extravoip.pl>;tag=d0b580866bbefc48e8393552524e82ac.91b4
Contact: <sip:400500600@my_very_normal_ip:5060>
Call-ID: 6400b7c2597849b361bfda5023d28e64@my_very_normal_ip:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX SVN-branch-1.8-r418504
Content-Length: 0
---
[Aug 7 00:44:56] NOTICE[18712]: chan_sip.c:21196 handle_response_invite: Failed to authenticate on INVITE to '"400500600" <sip:400500600@my_very_normal_ip>;tag=as1fb9d0ee'
-- SIP/sip.extravoip.pl-00000001 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [przychodzace2@extravoip1:6] While("SIP/extravoip1-00000000", "1") in new stack
....
–
my asterisk use public ip, all works fine except this forward.
what does it mean?
SIP operator do not authenticate caller number
or asterisk configuration do not allow this - do sth wrong (should I change authentication settings in sip.conf)?
for my:
I received from SIP trunk:
this is just warning, but asterisk then say:
[Aug 7 00:44:56] NOTICE[18712]: chan_sip.c:21196 handle_response_invite: Failed to authenticate on INVITE to '"177110440" <sip:177110440@my_very_normal_ip>;tag=as1fb9d0ee'
-- SIP/sip.extravoip.pl-00000001 is circuit-busy
Everyone is busy/congested at this time (1:0/1/0)
my effort3:
when I set
insecure=very
permit=80.72.37.28/32
my asterisk will send at first request:
401 Unauthorized
more open mask do the same.
why Dial() send SIP header with different CALL-ID - is it ok while forwarding ?
callid until dial forward (set by SIP trunk operator):
Call-ID: Y2JjMGQzMTkxYTEzMjg4NjI3NjM3ZTBlMGJkNmY4MWQ.-b2b_1
callid set by my asterisk when hit Dial command:
Call-ID: 6400b7c2597849b361bfda5023d28e64@my_very_normal_ip:5060
I want forward call, not new call.