Incoming call context

Hi…
Incoming call routes to extensions_vdp.conf which has…

[vdp_inbound]
exten => s,1,Answer()
exten => s,n,Playback(hello)
exten => s,n,Hangup()

and then I hear HELLO and hangup.

I want to route incoming call to one of my extension which I will be using for reception. how should I proceed?

Thanks,
Deepak

I assume you want to hook for FreePBX? You should do a goto to the from-pstn context after your custom code.

In extensions_custom.conf check out the default stubbed out [from-pstn-custom] context. Drop your code in there like:

[from-pstn-custom] exten => _+1.,1,Set(DID=${EXTEN:2}) ; Remove +1 from DID exten => _+1.,n,Set(CALLERID(num)=${CALLERID(num):2}) ; Remove +1 from CID exten => _+1.,n,Set(CDR(accountcode)=${DID}) exten => _+1.,n,Goto(from-trunk,${DID},1) ; Go to from-trunk ; pick up caller id info off PRIs exten => _X.,1,Wait(1) exten => _X.,n,Set(CALLERID(all)=${CALLERID(all)}) ; insert your magic here! ; ... ; then pass the call back to the FreePBX dialplan exten => _X.,n,Goto(ext-did,${EXTEN},1)