I can dial out through two SIP-proxys (fwd and digisip). I can place PSTN-calls through digisip, but i can not receive any calls from PSTN.
My asterisk and all phones are behind the same NAT. Port forwarding to asterisk is setup 5060 + 10000-20000.
When i dial my PSTN-number the following messages (sip debug) appear in asterisk:
Sip read:
INVITE sip:1001@82.182.239.39 SIP/2.0
Record-Route: sip:0906991236@82.209.165.194;ftag=4AF505AC-20B;lr=on
Via: SIP/2.0/UDP 82.209.165.194;branch=z9hG4bKbcb8.71cc50d6.0
Via: SIP/2.0/UDP 83.233.28.2:5060;branch=z9hG4bK18FDB2014
From: sip:90125167@83.233.28.2;tag=4AF505AC-20B
To: sip:0906991236@82.209.165.194
Date: Tue, 12 Apr 2005 21:31:59 GMT
Call-ID: 233771BC-AAD111D9-9223D8D5-CC749B48@83.233.28.2
Supported: 100rel,timer
Min-SE: 1800
Cisco-Guid: 590796028-2865828313-2230059022-944155880
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER,
SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
CSeq: 101 INVITE
Max-Forwards: 69
Remote-Party-ID: sip:90125167@83.233.28.2;party=calling;screen=yes;privacy=off
Timestamp: 1113341519
Contact: sip:90125167@83.233.28.2:5060
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Length: 323
P-hint: USRLOC
v=0
o=CiscoSystemsSIP-GW-UserAgent 5033 7810 IN IP4 83.233.28.2
s=SIP Call
c=IN IP4 83.233.28.2
t=0 0
m=audio 17264 RTP/AVP 0 4 18 101
c=IN IP4 83.233.28.2
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
23 headers, 14 lines
Using latest request as basis request
Sending to 82.209.165.194 : 5060 (NAT)
Found peer 'digisip’
Reliably Transmitting (no NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 82.209.165.194;branch=z9hG4bKbcb8.71cc50d6.0
Via: SIP/2.0/UDP 83.233.28.2:5060;branch=z9hG4bK18FDB2014
From: sip:90125167@83.233.28.2;tag=4AF505AC-20B
To: sip:0906991236@82.209.165.194;tag=as3ff7cdb8
Call-ID: 233771BC-AAD111D9-9223D8D5-CC749B48@83.233.28.2
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:1001@82.182.239.39
Proxy-Authenticate: Digest realm=“asterisk”, nonce="6a428e2f"
Content-Length: 0
to 82.209.165.194:5060
Scheduling destruction of call
’233771BC-AAD111D9-9223D8D5-CC749B48@83.233.28.2’ in 15000 ms
bamse*CLI> reload
Sip read:
ACK sip:1001@82.182.239.39 SIP/2.0
Via: SIP/2.0/UDP 82.209.165.194;branch=z9hG4bKbcb8.71cc50d6.0
From: sip:90125167@83.233.28.2;tag=4AF505AC-20B
Call-ID: 233771BC-AAD111D9-9223D8D5-CC749B48@83.233.28.2
To: sip:0906991236@82.209.165.194;tag=as3ff7cdb8
CSeq: 101 ACK
User-Agent: Sip EXpress router(0.8.12 (i386/linux))
Content-Length: 0
extensions.conf:
[general]
static=yes
writeprotect=yes
[globals]
FWDUSERID=******
FWDUSERNAME=Jan Eriksson
PHONE1=SIP/2000
PHONE1VM=2100
FWDEXTEN=1000
DIGISIPEXTEN=1001
[genral] Just saw this typo, does it matter?
include => from-sip
include => intern
[intern]
exten => _7.,1,SetCIDNum(${FWDUSERID})
exten => _7.,2,SetCIDName(${FWDUSERNAME})
exten => _7.,3,Dial(SIP/${EXTEN:1}@fwd)
exten => _7.,4,Playback(invalid)
exten => _7.,5,Hangup
exten => _0.,1,SetCallerID(**********)
exten => _0.,2,SetCIDName(Jan Eriksson)
exten => _0.,3,Dial(SIP/${EXTEN}@digisip,120,W)
exten => _0.,4,Congestion
exten => _0.,5,Hangup
exten => _0.,102,Busy
exten => t,105,Hangup
[from-sip]
exten => ${FWDEXTEN},1,Dial(${PHONE1},30)
exten => ${FWDEXTEN},2,Voicemail(u${PHONE1VM})
exten => ${FWDEXTEN},3,Hangup
;exten => ${FWDEXTEN},102,Voicemail(b${PHONE1VM})
;exten => ${FWDEXTEN},103,Hangup
exten => ${DIGISIPEXTEN},1,Dial(${PHONE1},30,tr)
exten => ${DIGISIPEXTEN},2,Voicemail(u${PHONE1VM})
exten => ${DIGISIPEXTEN},3,Hangup
exten => ${DIGISIPEXTEN},102,Voicemail(b${PHONE1VM})
exten => ${DIGISIPEXTEN},103,Hangup
parts of sip.conf----
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=alaw
;allow=G726
;allow=gsm
;allow=ilbc ; Note: codec order is respected only in [general]
;musicclass=default ; Sets the default music on hold class for all SIP calls
; This may also be set for individual users/peers
language=se ; Default language setting for all users/peers
; This may also be set for individual users/peers
;relaxdtmf=yes ; Relax dtmf handling
;rtptimeout=60 ; Terminate call if 60 seconds of no RTP activity
; when we’re not on hold
;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP activity
; when we’re on hold (must be > rtptimeout)
;trustrpid = no ; If Remote-Party-ID should be trusted
;progressinband=no ; If we should generate in-band ringing always
useragent=Asterisk PBX ; Allows you to change the user agent string
nat=yes ; NAT settings
; yes = Always ignore info and assume NAT
; no = Use NAT mode only according to RFC3581
; never = Never attempt NAT mode or RFC3581 support
; route = Assume NAT, don’t send rport (work around more UNIDEN bugs)
canreinvite=no
insecure=very
;promiscredir = no
register => :secret@fwd.pulver.com/1000
register => 09012**@proxy.digisip.net/1001
search => e164.org
search => e164.arpa
externip = 82.182.***.*** ; Address that we’re going to put in outbound SIP messages
localnet=192.168.0.0/255.255.255.0; All RFC 1918 addresses are local networks
context=from-sip
nat=yes
insecure=very
canreinvite=no
dtmfmode=rfc2833
;language=se
[fwd]
type=friend
secret=*****
username=******
host=fwd.pulver.com
[digisip]
type=friend
secret=*******
username=*****
fromuser=090******
fromdomain=proxy.digisip.net
host=proxy.digisip.net
[2000]
type=friend
username=janne
secret=*****
host=dynamic
context=intern
dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info
defaultip=192.168.0.11
mailbox=2100 ; Mailbox for message waiting indicator
Any help would be appreciated!
/janne