Hi there,
I’m facing a tricky problem and I was wondering if you could help me out. I get this error when calling the number from outside.
So I checked the dialplan and everything is fine :
*CLI> dialplan show 02072224553@voip-unlimited
[ Context 'voip-unlimited' created by 'pbx_config' ]
'_020722245X.' => 4. Dial(SIP/office-par1/1055,,r) [pbx_config]
So I tried to get more infos by running asterisk in debug mode and setting “sip set debug peer xxx” and this is what I get :
[code]<— SIP read from UDP:91.151.2.130:5060 —>
INVITE sip:02072224553@MYIP SIP/2.0
Record-Route: sip:91.151.2.130;lr=on;ftag=3579264271-1313
Max-Forwards: 66
Session-Expires: 3600;refresher=uac
Min-SE: 600
Supported: timer, 100rel
To: +44XXXXXX sip:02072224553@91.151.2.130;user=phone
From: +33XXXXX sip:+33XXXXX@91.151.11.20;tag=3579264271-1313
Call-ID: 59073416-3579264271-1306@msx1-voip-unlimited-net.mydomain.com
CSeq: 1 INVITE
Allow: INVITE, BYE, OPTIONS, CANCEL, ACK, REGISTER, NOTIFY, INFO, REFER, SUBSCRIBE, PRACK, UPDATE, MESSAGE, PUBLISH
Via: SIP/2.0/UDP 91.151.2.130;branch=z9hG4bK24da.22e2a064.0
Via: SIP/2.0/UDP 91.151.11.20:5060;rport=5060;received=91.151.11.20;branch=z9hG4bK800237c42c445776bb9cb53be67166cf
Contact: sip:+33632232109@91.151.11.20:5060
Content-Type: application/sdp
Content-Length: 448
v=0
o=msx1-voip-unlimited-net 9169971 0 IN IP4 91.151.11.20
s=sip call
c=IN IP4 91.151.11.21
t=0 0
m=audio 32622 RTP/AVP 8 18 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sqn:0
a=cdsc: 1 audio RTP/AVP 8 18 0 101
a=cdsc: 5 image udptl t38
a=cpar: a=T38FaxVersion:0
a=cpar: a=T38FaxRateManagement:transferredTCF
a=cpar: a=T38FaxMaxDatagram:160
a=cpar: a=T38FaxUdpEC:t38UDPRedundancy
a=X-sqn:0
a=X-cap: 1 image udptl t38
<------------->
— (16 headers 17 lines) —
== Using SIP RTP CoS mark 5
Sending to 91.151.2.130 : 5060 (no NAT)
Using INVITE request as basis request - 59073416-3579264271-1306@msx1-voip-unlimited-net.mydomain.com
Found peer ‘voip-unlimited-out’ for ‘+33XXXXXX’ from 91.151.2.130:5060
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 0
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8 (alaw), peer - audio=0x10c (ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 91.151.11.21:32622
Looking for 02072224553 in voip-unlimited (domain MYIP)
<— Reliably Transmitting (no NAT) to 91.151.2.130:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 91.151.2.130;branch=z9hG4bK24da.22e2a064.0;received=91.151.2.130
Via: SIP/2.0/UDP 91.151.11.20:5060;rport=5060;received=91.151.11.20;branch=z9hG4bK800237c42c445776bb9cb53be67166cf
From: +33XXXXX sip:+33XXXXX@91.151.11.20;tag=3579264271-1313
To: +44XXXXXXXX sip:02072224553@91.151.2.130;user=phone;tag=as520f949e
Call-ID: 59073416-3579264271-1306@msx1-voip-unlimited-net.mydomain.com
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
<------------>
[Jun 3 18:04:34] NOTICE[10604]: chan_sip.c:20276 handle_request_invite: Call from ‘02072224553’ to extension ‘02072224553’ rejected because extension not found in context ‘voip-unlimited’.
echeduling destruction of SIP dialog ‘59073416-3579264271-1306@msx1-voip-unlimited-net.mydomain.com’ in 6400 ms (Method: INVITE)
a
<— SIP read from UDP:91.151.2.130:5060 —>
ACK sip:02072224553@MYIP SIP/2.0
Via: SIP/2.0/UDP 91.151.2.130;branch=z9hG4bK24da.22e2a064.0
From: +33XXXXX sip:+33XXXXXX@91.151.11.20;tag=3579264271-1313
Call-ID: 59073416-3579264271-1306@msx1-voip-unlimited-net.mydomain.com
To: +44XXXXXX sip:02072224553@91.151.2.130;user=phone;tag=as520f949e
CSeq: 1 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (1.5.1-notls (i386/linux))
Content-Length: 0[/code]
My sip.conf :
[code][general]
defaultexpirey=120
dtmfmode=rfc2833
nat=no
qualify=yes
registertimeout=20 ; retry registration calls every 20 seconds
registerattempts=0
;,t38pt_udptl=yes
register => 02072224553:secret@sip.voip-unlimited.net/02072224553
session-timers=refuse
[voip-unlimited-out]
type=friend
;type=peer
host=sip.voip-unlimited.net
fromdomain=sip.voip-unlimited.net
secret=
username=02072224553
;defaultuser=02072224553
context=voip-unlimited
canreinvite=yes
disallow=all
;allow=alaw&ulaw&g729&gsm
allow=alaw
nat=no
insecure=port,invite
[office-par1]
type=friend
context=office
host=172.16.1.15
disallow=all
allow=alaw
nat=no
canreinvite=no
qualify=yes [/code]
And my extensions.conf :
[code][general]
static=yes
writeprotect=yes
clearglobalvars=no
[globals]
[office]
exten => _0XXXXX.,1,Set(FROM=${SIP_HEADER(FROM)})
exten => _0XXXXX.,2,Set(FROM=${CUT(FROM,@,1)})
exten => _0XXXXX.,3,Set(FROM=${CUT(FROM,:,2):-4})
;debug
;exten => _0XXXXX.,4,NoOP(${EXTEN:0:1})
exten => _0XXXXX.,4,NoOP(${EXTEN:0:2})
;condition
exten => _0XXXXX.,5,GotoIf($[${FROM:0:3} = 105]?17:6)
exten => _0XXXXX.,6,GotoIf($[${EXTEN:0:3} = 000]?17:30)
;International
exten => _0XXXXX.,17,Set(CALLERID(all)="" <02072224553>)
exten => _0XXXXX.,18,Dial(SIP/voip-unlimited-out/${EXTEN:1},r)
exten => _0XXXXX.,19,HangUp()
exten => #1,1,Set(CHANNEL(language)=fr)
exten => #1,2,Answer()
exten => #1,3,Wait(1)
exten => #1,4,VoiceMailMain(${CALLERID(num)}@ict)
exten => #1,5,Hangup()
; UK PROVIDER
[voip-unlimited]
exten => s,1,noop(ici le contexte ${CONTEXT})
exten => s,2,Set(FROM=${SIP_HEADER(FROM)})
exten => s,3,NoOP(${FROM})
exten => _020722245X.,4,Dial(SIP/office-par1/1055,r)[/code]
I think it must be related to the domain= variable but I can’t figure out where. Have you got any ideas ?
Thanks a lot, I’m stuck here.
Joy