Hi problem with incoming calls from trunk!

Hi, new to freepbx so dont mind

i have an account from a VoIP provider, the problem is that incoming calls are not coming to my Asterisk server and then to my local extension…

i am writing all the steps i have done for incoming calls

1- i have purchase a DID from a Voip company let 121212123

they provided me a username let

username=XXXXXXXXX
secret=XXXXXXXXXX
host=XXXXXXXXXX

and when any call to my DID there is a IVR playing from my host server

so know what i am doing i have my own local Asterisk server (trixbox)

frist i have made 2 extensions let

1 = 5555
2= 5556

then know i made Trunk for outgoing and incoming calls

so the trunk information is

outbound

trunk name = abc

username=XXXXXXXXX
secret=XXXXXXXXXX
host=XXXXXXXXXX
type=peer

inbound

user context: what should i have to write here i am writing my username here

username=XXXXXXXXX
secret=XXXXXXXXXX
host=XXXXXXXXXX
type=peer

now then i set the outbound route

thats working fine for outgoing calls

now i set the inbound route

DID number is : i write here the username or i can set it to any DID

then set an extensions against it let 5555

now when i am dailing for any outside number working fine but
when i dail to that DID from other number after 4 or 5 bells voice propmt " check the number and dail again"
and no IVR was played that was set by my provider…
some time it played but after next time it is not

so please help me in this problem
if i missed any thing then you can ask me

bye

Are you behind NAT ? That can be an issue. Also this is not a Free PBX forum. Lots of us here use “raw asterisk”. Have a look the Free PBX forum.