Hi,
I have an problem. I’m tring to make it possible for my users to be called from outsite to asterisk server, that for I have 1 inbount nummber from my VoIP provider.
Those are my configurations, throuw FreePBX
Extension -> sip device, I have for now just 1 device configurated
Extension: 1020
context = from-trunk
secret = *****
dtmfmode = rfc2833
context = from-internal
host = dynamic
type = friend
nat = yes
port =5060
dial = SIP/1020
Softphone registration without problem. OK
Trunk configuration is:
Trunk SIP/voicetradin
General Settings:
Outbound Caller ID = 037412121212
Outgoing Dial Rules = .
Outgoing Settings:
Trunk name = voicetrading
peer details:
host=sip.voicetrading.com
secret=*****
type=peer
username=voicetradinguser
Incoming Settings:
–all empty–
Registration:
31557110349:******@budgetphone.nl/31557110349
Outbound routes
Dial Pattern = .
Trunk Sequence = Sip/voicetrading
Inbound Routes:
Description = incomming
DID and CID = Empty to match all
Set Destination:
Extensions: 1020
Whan calling out throuw asterisk, it’s OK, totaly no problem it takes the voicetrading context and calls out.
But whan calling to my Registered number 31557110349 It must go to my SIP device 1020, I see in Asterisk CLI that the Asterisk recognized the call but somehow I get ss-noservice.
This is the log:
– Executing [31557110349@from-sip-external:1] NoOp(“SIP/gw02-mci.budgetphone.nl-0846da08”, “Received incoming SIP connection from unknown peer to 31557110349”) in new stack
– Executing [31557110349@from-sip-external:2] Set(“SIP/gw02-mci.budgetphone.nl-0846da08”, “DID=31557110349”) in new stack
– Executing [31557110349@from-sip-external:3] Goto(“SIP/gw02-mci.budgetphone.nl-0846da08”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/gw02-mci.budgetphone.nl-0846da08”, “0?from-trunk|31557110349|1”) in new stack
– Executing [s@from-sip-external:2] Set(“SIP/gw02-mci.budgetphone.nl-0846da08”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2007-12-18 08:59:03 UTC.
– Executing [s@from-sip-external:3] Answer(“SIP/gw02-mci.budgetphone.nl-0846da08”, “”) in new stack
– Executing [s@from-sip-external:4] Wait(“SIP/gw02-mci.budgetphone.nl-0846da08”, “2”) in new stack
– Executing [s@from-sip-external:5] Playback(“SIP/gw02-mci.budgetphone.nl-0846da08”, “ss-noservice”) in new stack
– <SIP/gw02-mci.budgetphone.nl-0846da08> Playing ‘ss-noservice’ (language ‘en’)
== Spawn extension (from-sip-external, s, 5) exited non-zero on ‘SIP/gw02-mci.budgetphone.nl-0846da08’
– Executing [h@from-sip-external:1] NoOp(“SIP/gw02-mci.budgetphone.nl-0846da08”, “Hangup”) in new stack
– Executing [h@from-sip-external:2] Set(“SIP/gw02-mci.budgetphone.nl-0846da08”, “DID=s”) in new stack
– Executing [h@from-sip-external:3] Goto(“SIP/gw02-mci.budgetphone.nl-0846da08”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/gw02-mci.budgetphone.nl-0846da08”, “0?from-trunk|s|1”) in new stack
– Executing [s@from-sip-external:2] Set(“SIP/gw02-mci.budgetphone.nl-0846da08”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2007-12-18 08:59:09 UTC.
– Executing [s@from-sip-external:3] Answer(“SIP/gw02-mci.budgetphone.nl-0846da08”, “”) in new stack
== Spawn extension (from-sip-external, s, 3) exited non-zero on ‘SIP/gw02-mci.budgetphone.nl-0846da08’
I tried the same with coding it in asterisk extensions.conf unther [from-sip-external] and it works OK
[from-sip-external]
exten => _XXXXXXXXXXX,1,Dial(SIP/1020)
;give external sip users congestion and hangup
; Yes. This is really meant to be _. - I know asterisk whinges about it, but
; I do know what I’m doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"=“yes”]?from-trunk,${DID},1)
exten => s,n,Set(TIMEOUT(absolute)=15)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,Playtones(congestion)
exten => s,n,Congestion(5)
exten => h,1,NoOp(Hangup)
exten => i,1,NoOp(Invalid)
exten => t,1,NoOp(Timeout)
But somehow I cant configure it throuw FreePBX for my incomming call, who can see what am I doing wrong>?
Thanks for advance.
Rafael