Problem with DID in a PRI connection using TE 122

We have asterisk 1.4.23.1 with zaptel 1.4.12 and libpri 1.4.9 in an ubuntu server.
Internal extensions and outside numbers work fine. But problem is with the DID numbers. Asterisk is assigning the numbers automatically without any incoming call rule. Also, when we accept the call we hear a ringing sound along with the conversation. Please help us out

CLI message:
– Executing [9244@default:1] Macro(“Zap/9-1”, “stdexten|9244|IAX2/9244”) in new stack
– Executing [s@macro-stdexten:1] Set(“Zap/9-1”, “__DYNAMIC_FEATURES=”) in new stack
– Executing [s@macro-stdexten:2] GotoIf(“Zap/9-1”, “0?5:3”) in new stack
– Goto (macro-stdexten,s,3)
– Executing [s@macro-stdexten:3] Dial(“Zap/9-1”, “IAX2/9244|20|”) in new stack
– Called 9244
– Accepting call from ‘919916417580’ to ‘9244’ on channel 0/9, span 1
– Call accepted by 192.168.3.202 (format ulaw)
– Format for call is ulaw
– IAX2/9244-3956 is ringing
– Channel 0/9, span 1 got hangup request, cause 16
– Hungup ‘IAX2/9244-3956’
== Spawn extension (macro-stdexten, s, 3) exited non-zero on ‘Zap/9-1’ in macro ‘stdexten’
== Spawn extension (default, 9244, 1) exited non-zero on ‘Zap/9-1’
– Hungup ‘Zap/9-1’

Regards
Cibin

Please post your dialplan that goes along with this.

extensions.conf

[DLPN_DialPlan1]
include = CallingRule_Outgoing
include = default
include = parkedcalls
include = conferences
include = ringgroups
include = voicemenus
include = queues
include = voicemailgroups
include = directory
include = pagegroups
include = page_an_extension

[CallingRule_Outgoing]
exten = _XXXXXXX.,1,Macro(trunkdial,${span_1}/${EXTEN:0},${span_1_cid})

[conferences]
exten = 6300,1,MeetMe(${EXTEN},MsI)
exten = 6301,1,MeetMe(${EXTEN},MsI)

[default]
exten = 9222,1,Goto(voicemenu-custom-1,s,1)
exten = 9240,1,Goto(conferences,6300,1)
exten = 9242,1,Goto(conferences,6301,1)
exten = _#9XXX,1,Set(MBOX=${EXTEN:1}@default)
exten = _#9XXX,n,VoiceMail(${MBOX})
exten = a,1,VoicemailMain(${MBOX})
exten = 6050,1,VoiceMailMain(@default)
exten = o,1,

users.conf

[9228]
username = 9228
transfer = yes
mailbox = 9228
call-limit = 100
fullname = Bobjee Srinivas
registersip = no
host = dynamic
callgroup = 1
context = DLPN_DialPlan1
cid_number = 9228
hasvoicemail = yes
vmsecret = 9228
email = bs1@xindiasteels.com
threewaycalling = yes
hasdirectory = yes
callwaiting = yes
hasmanager = yes
managerread = system,call,log,verbose,command,agent,user,config,originate
managerwrite = system,call,log,verbose,command,agent,user,config,originate
hasagent = no
hassip = no
hasiax = yes
secret = 9228
nat = yes
canreinvite = yes
dtmfmode = rfc2833
insecure = no
pickupgroup = 1
autoprov = no
label =
macaddress =
linenumber = 1
LINEKEYS = 1
disallow = all
allow = ulaw

[span_1]
group = 1
hasexten = no
switchtype = national
signalling = pri_cpe
trunkname = Span 1
trunkstyle = digital
hassip = no
hasiax = no
zapchan = 1-15,17-31
context = DID_span_1

The interesting thing I jhave noticed is there is no incoming call rule named DID_span_1. I’ve created it earlier. But I deleted those rules from extension.conf.

Thanks
Cibin

I am wondering how the incoming calls routing to the extensions without any incoming call rules defined. Please help us out.

Regards
Cibin

After you deleted them did you issue a reload or stop and start Asterisk? extensions.conf is only read at startup or if asked to in a reload.

I did an asterisk restart both by restart now command in CLI and /etc/init.d/asterisk restart

Any one plzz help me to resolve this issue

please help me to solve this issue… Any one there??

The extension in question is in the default context. While I have no experience of zaptel/dahdi channels, one should not put anything in the default context if one wants to restrict access to it.

By ringing sound, do you mean ringing current or ring back tone?

Are you using Digium hardware? If not which manufacturer, or failing that, which brand?

I meant ringback tone. The sound we hear when dialing a number(Tring tring sound). I am using a digium card(TE122).