Problem with DID

I need to configure FreePbx (Asterisk@Home) to manage DID.
I configured a DID for the number 01119783352 to the extension 452:

exten => _01119783352,1,Set(__FROM_DID=${EXTEN})
exten => _01119783352,n,Gosub(app-blacklist-check,s,1)
exten => _01119783352,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => _01119783352,n,Set(CALLERID(name)=${CALLERID(num)})
exten => _01119783352,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => _01119783352,n,Goto(from-did-direct,452,1)

But something is wrong, because the asterisk give me a no-service message.
I think the problem can be that the card doesn’t receive the last two numbers of the called number, but only the radix 011197833:

== Starting mISDN/1-u2 at from-pstn,011197833,1 failed so falling back to exten ‘s’
– Executing [s@from-pstn:1] NoOp(“mISDN/1-u2”, “No DID or CID Match”) in new stack
– Executing [s@from-pstn:2] GotoIf(“mISDN/1-u2”, “0?ext-did|ZapN|1”) in new stack
– Executing [s@from-pstn:3] Wait(“mISDN/1-u2”, “2”) in new stack
– Executing [s@from-pstn:4] Playback(“mISDN/1-u2”, “ss-noservice”) in new stack
– <mISDN/1-u2> Playing ‘ss-noservice’ (language ‘it’)
== Spawn extension (from-pstn, s, 4) exited non-zero on ‘mISDN/1-u2’

Thanks for your help.


I tried this configuration on EXT-DID:

exten => s,1,WaitForDigits(6000,2,true,15)
exten => s,1,Set(__FROM_DID=${EXTEN})
exten => s,n,Gosub(app-blacklist-check,s,1)
exten => s,n,GotoIf($[ “${CALLERID(name)}” != “” ] ?cidok)
exten => s,n,Set(CALLERID(name)=${CALLERID(num)})
exten => s,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => s,n,Goto(from-did-direct,452,1)

This is a part of log:

P[ 1] I SEND:SETUP_ACKNOWLEDGE oad:0******** dad:011197111 pid:9
P[ 1] --> bc_state:BCHAN_ACTIVATED
P[ 1] --> channel:1 mode:TE cause:16 ocause:16 rad: cad:
P[ 1] --> info_dad: onumplan:2 dnumplan:2 rnumplan: cpnnumplan:0
P[ 1] --> caps:Speech pi:3 keypad: sending_complete:1
P[ 1] --> screen:0 --> pres:0
P[ 1] --> addr:50010102 l3id:20020 b_stid:10010100 layer_id:50010180
P[ 1] --> facility:Fac_None out_facility:Fac_None
P[ 1] --> urate:0 rate:16 mode:0 user1:0
P[ 1] --> bc:8c675a4 h:0 sh:0
P[ 1] * Starting Ast ctx:from-pstn dad:011197111 oad:0******** with ‘s’ extension
P[ 1] Freeing Msg on prim:30582
P[ 1] Sending msg, prim:30d80 addr:41000104 dinfo:20020
== Starting mISDN/3-u67 at from-pstn,011197111,1 failed so falling back to exten ‘s’
== Spawn extension (from-pstn, s, 1) exited non-zero on 'mISDN/3-u67’
P[ 1] * IND : HANGUP pid:9 ctx:from-pstn dad:s oad:0******** State DIALING

I don’t know how resolve the problem.
Please give me a suggestion.