Hi. I am trying to connect to a SIP provider as a client but
cannot get asterisk to work the same way as the UA.
My Configs:
-------------------------
sip.conf
----------------
[70501956]
type=friend
host=taraba.net
username=70501956
password=<password>
insecure=very
fromuser=70501956
fromdomain=taraba.net
realm=taraba.net
extention.conf
----------------------
[macro-japan]
;exten => s,1,SetCallerID(<${ARG1}@taraba.net>)
exten => s,1,Dial(SIP/${ARG1}@70501956,${ARG2})
exten => s,2,Hangup
[taraba]
exten => _0.,1,Macro(japan,${EXTEN},70)
-----------------------------
If I use the sip server "taraba.net" and outbound proxy
"taraba.net"
in X-lite, then I can call out via Taraba with no problems. However,
when redirecting via Asterisk I get :
Debug info
------------------------------------------
<-- SIP read from 210.143.128.118:61868:
INVITE sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP
192.168.0.61:5060;rport;branch=z9hG4bK81B07E8EF77546F89270DC87BF166AC5
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>
Contact: <sip:2201@192.168.0.61:5060>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16993 INVITE
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: M2 X-Lite release 1103n
Content-Length: 298
v=0
o=2201 177486796 177486875 IN IP4 192.168.0.61
s=M2 X-Lite
c=IN IP4 192.168.0.61
t=0 0
m=audio 8000 RTP/AVP 0 8 3 98 97 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
--- (11 headers 13 lines)---
Using INVITE request as basis request -
424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
Sending to 192.168.0.61 : 5060 (non-NAT)
Reliably Transmitting (NAT) to 210.143.128.118:61868:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP
192.168.0.61:5060;branch=z9hG4bK81B07E8EF77546F89270DC87BF166AC5;received=210.143.1
28.118;rport=61868
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>;tag=as6fc6c330
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16993 INVITE
User-Agent: M2 X-Lite release 1103n
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: <sip:09099648988@203.83.240.5>
Proxy-Authenticate: Digest realm="asterisk",
nonce="4c7c0d77"
Content-Length: 0
---
Scheduling destruction of call
'424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61' in 15000 ms
Found user '2201'
localhost*CLI>
<-- SIP read from 210.143.128.118:61868:
ACK sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP
192.168.0.61:5060;rport;branch=z9hG4bK81B07E8EF77546F89270DC87BF166AC5
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>;tag=as6fc6c330
Contact: <sip:2201@192.168.0.61:5060>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16993 ACK
Max-Forwards: 70
Content-Length: 0
--- (9 headers 0 lines)---
localhost*CLI>
<-- SIP read from 210.143.128.118:61868:
INVITE sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP
192.168.0.61:5060;rport;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>
Contact: <sip:2201@192.168.0.61:5060>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 INVITE
Proxy-Authorization: Digest
username="2201",realm="asterisk",nonce="4c7c0d77",response="1d81a829e9f4
1e0f836e1280e8bd050a",uri="sip:09099648988@taraba.net"
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: M2 X-Lite release 1103n
Content-Length: 298
v=0
o=2201 177486796 177486875 IN IP4 192.168.0.61
s=M2 X-Lite
c=IN IP4 192.168.0.61
t=0 0
m=audio 8000 RTP/AVP 0 8 3 98 97 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
--- (12 headers 13 lines)---
Using INVITE request as basis request -
424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
Sending to 192.168.0.61 : 5060 (NAT)
Found user '2201'
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 98
Found RTP audio format 97
Found RTP audio format 101
Peer audio RTP is at port 192.168.0.61:8000
Found description format pcmu
Found description format pcma
Found description format gsm
Found description format iLBC
Found description format speex
Found description format telephone-event
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x60e
(gsm|ulaw|alaw|speex|ilbc)/video
=0x0 (nothing), combined - 0xe (gsm|ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (te
lephone-event)
Looking for 09099648988 in sip
list_route: hop: <sip:2201@192.168.0.61:5060>
Transmitting (NAT) to 210.143.128.118:61868:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
192.168.0.61:5060;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3;received=210.143.1
28.118;rport=61868
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 INVITE
User-Agent: M2 X-Lite release 1103n
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: <sip:09099648988@203.83.240.5>
Content-Length: 0
---
-- Executing Macro("SIP/2201-0287",
"japan|09099648988|70") in new stack
-- Executing Dial("SIP/2201-0287",
"SIP/09099648988@70501956|70") in
new stack
We're at 203.83.240.5 port 17190
Answering/Requesting with root capability 0x4 (ulaw)
Answering with capability 0x2 (gsm)
Answering with capability 0x8 (alaw)
Answering with non-codec capability 0x1 (telephone-event)
12 headers, 12 lines
Reliably Transmitting (no NAT) to 61.193.205.37:5060:
INVITE sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK0aaa61c3
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 102 INVITE
User-Agent: M2 X-Lite release 1103n
Date: Thu, 07 Jul 2005 03:17:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 263
v=0
o=root 11887 11887 IN IP4 203.83.240.5
s=session
c=IN IP4 203.83.240.5
t=0 0
m=audio 17190 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
---
-- Called 09099648988@70501956
localhost*CLI>
<-- SIP read from 61.193.205.37:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK0aaa61c3
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.ebd4
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 102 INVITE
WWW-Authenticate: Digest realm="taraba.net",
nonce="42cca01dd246dbe2396b8fa7d7044f76a9bac7b0"
Content-Length: 0
--- (8 headers 0 lines)---
Transmitting (no NAT) to 61.193.205.37:5060:
ACK sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK0aaa61c3
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.ebd4
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 102 ACK
User-Agent: M2 X-Lite release 1103n
Content-Length: 0
---
We're at 203.83.240.5 port 17190
Answering/Requesting with root capability 0x4 (ulaw)
Answering with capability 0x2 (gsm)
Answering with capability 0x8 (alaw)
Answering with non-codec capability 0x1 (telephone-event)
Reliably Transmitting (no NAT) to 61.193.205.37:5060:
INVITE sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK5ec36a77
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 103 INVITE
User-Agent: M2 X-Lite release 1103n
Authorization: Digest username="70501956",
realm="taraba.net",
algorithm=MD5, uri="sip:09099648988@t
araba.net", nonce="42cca01dd246dbe2396b8fa7d7044f76a9bac7b0",
response="fb2ec96c0c9caaea45c156f497af
a8a9", opaque=""
Date: Thu, 07 Jul 2005 03:17:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 263
v=0
o=root 11887 11888 IN IP4 203.83.240.5
s=session
c=IN IP4 203.83.240.5
t=0 0
m=audio 17190 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
---
localhost*CLI>
<-- SIP read from 61.193.205.37:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK5ec36a77
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.54fa
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 103 INVITE
WWW-Authenticate: Digest realm="taraba.net",
nonce="42cca01dd246dbe2396b8fa7d7044f76a9bac7b0"
Content-Length: 0
--- (8 headers 0 lines)---
Transmitting (no NAT) to 61.193.205.37:5060:
ACK sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK5ec36a77
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.54fa
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 103 ACK
User-Agent: M2 X-Lite release 1103n
Content-Length: 0
---
We're at 203.83.240.5 port 17190
Answering/Requesting with root capability 0x4 (ulaw)
Answering with capability 0x2 (gsm)
Answering with capability 0x8 (alaw)
Answering with non-codec capability 0x1 (telephone-event)
Reliably Transmitting (no NAT) to 61.193.205.37:5060:
INVITE sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK55a426cb
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 104 INVITE
User-Agent: M2 X-Lite release 1103n
Authorization: Digest username="70501956",
realm="taraba.net",
algorithm=MD5, uri="sip:09099648988@t
araba.net", nonce="42cca01dd246dbe2396b8fa7d7044f76a9bac7b0",
response="fb2ec96c0c9caaea45c156f497af
a8a9", opaque=""
Date: Thu, 07 Jul 2005 03:17:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 263
v=0
o=root 11887 11889 IN IP4 203.83.240.5
s=session
c=IN IP4 203.83.240.5
t=0 0
m=audio 17190 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
---
localhost*CLI>
<-- SIP read from 61.193.205.37:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK55a426cb
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.5b92
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 104 INVITE
WWW-Authenticate: Digest realm="taraba.net",
nonce="42cca01dd246dbe2396b8fa7d7044f76a9bac7b0"
Content-Length: 0
--- (8 headers 0 lines)---
Transmitting (no NAT) to 61.193.205.37:5060:
ACK sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK55a426cb
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.5b92
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 104 ACK
User-Agent: M2 X-Lite release 1103n
Content-Length: 0
---
Jul 7 12:17:38 NOTICE[11887]: chan_sip.c:8518 handle_response: Failed
to authenticate on INVITE to
'"Jason" <sip:70501956@taraba.net>;tag=as59f1f611'
localhost*CLI>
<-- SIP read from 210.143.128.118:61868:
CANCEL sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP
192.168.0.61:5060;rport;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>
Contact: <sip:2201@192.168.0.61:5060>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 CANCEL
Proxy-Authorization: Digest
username="2201",realm="asterisk",nonce="4c7c0d77",response="5caf1f6f1d5e
c8ad6041376c516d8aa1",uri="sip:09099648988@taraba.net"
Max-Forwards: 70
User-Agent: M2 X-Lite release 1103n
Content-Length: 0
--- (11 headers 0 lines)---
Sending to 192.168.0.61 : 5060 (NAT)
Reliably Transmitting (NAT) to 210.143.128.118:61868:
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP
192.168.0.61:5060;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3;received=210.143.1
28.118;rport=61868
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>;tag=as7d84ecc5
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 INVITE
User-Agent: M2 X-Lite release 1103n
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: <sip:09099648988@203.83.240.5>
Content-Length: 0
---
Transmitting (NAT) to 210.143.128.118:61868:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.0.61:5060;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3;received=210.143.1
28.118;rport=61868
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>;tag=as7d84ecc5
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 CANCEL
User-Agent: M2 X-Lite release 1103n
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: <sip:09099648988@203.83.240.5>
Content-Length: 0
---
Reliably Transmitting (no NAT) to 61.193.205.37:5060:
CANCEL sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK55a426cb
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>
Contact: <sip:70501956@203.83.240.5>
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 104 CANCEL
User-Agent: M2 X-Lite release 1103n
Proxy-Authorization: Digest username="70501956",
realm="taraba.net",
algorithm=MD5, uri="sip:0909964
8988@taraba.net",
nonce="42cca01dd246dbe2396b8fa7d7044f76a9bac7b0",
response="f6a5b5ab31138636d9d646
3b71dc5486", opaque=""
Content-Length: 0
---
Scheduling destruction of call
'64208adc5f21640c24f387f25373ec53@taraba.net' in 15000 ms
== Spawn extension (macro-japan, s, 1) exited non-zero on
'SIP/2201-0287' in macro 'japan'
== Spawn extension (sip, 09099648988, 1) exited non-zero on
'SIP/2201-0287'
localhost*CLI>
<-- SIP read from 210.143.128.118:61868:
ACK sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP
192.168.0.61:5060;rport;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>;tag=as7d84ecc5
Contact: <sip:2201@192.168.0.61:5060>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 ACK
Max-Forwards: 70
Content-Length: 0
--- (9 headers 0 lines)---
Destroying call '424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61'
localhost*CLI>
<-- SIP read from 210.143.128.118:61868:
ACK sip:09099648988@taraba.net SIP/2.0
Via: SIP/2.0/UDP
192.168.0.61:5060;rport;branch=z9hG4bK5E59581255864160B4A6D7F2020BE1C3
From: Jason <sip:2201@taraba.net>;tag=2199105817
To: <sip:09099648988@taraba.net>;tag=as7d84ecc5
Contact: <sip:2201@192.168.0.61:5060>
Call-ID: 424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61
CSeq: 16994 ACK
Max-Forwards: 70
Content-Length: 0
--- (9 headers 0 lines)---
Destroying call '424C16D8-2EB9-4473-A99B-D9FB0177073E@192.168.0.61'
localhost*CLI>
<-- SIP read from 61.193.205.37:5060:
SIP/2.0 483 Too many hops
Via: SIP/2.0/UDP 203.83.240.5:5060;branch=z9hG4bK55a426cb
From: "Jason" <sip:70501956@taraba.net>;tag=as59f1f611
To: <sip:09099648988@taraba.net>;tag=89280b37b860936dbb8a29112e496281.f4ac
Call-ID: 64208adc5f21640c24f387f25373ec53@taraba.net
CSeq: 104 CANCEL
Content-Length: 0
--- (7 headers 0 lines)---
-- Got SIP response 483 "Too many hops" back from 61.193.205.37
Destroying call '64208adc5f21640c24f387f25373ec53@taraba.net'
---------------------------------------------------------------------------------------------
The only differences I can see between the UA INVITE and the
asterisk INVITE are these two lines.
-----------------
Max-Forwards: 70
Proxy-Authenticate: Digest realm="asterisk",
nonce="4c7c0d77"
------------------
Can the "Proxy-Authenticate" line be added to the asterisk request
somehow?
If anybody has any idea as to what is wrong it would be greatly
appreciated.
Regards,
Jason