Ringing A Single Phone from An Analog Line

Okay, help the old guy out here if you will. I want a single incoming analog line to ring a single Digium D40 phone. It is the line associated with group 2. When I call the number, it always goes to the very last context in extensions.conf. I will be up front in that I am not an expert here but have a couple of systems under my belt. Very simple systems, however.

Here is what I have in chan_dahdi.conf:
[channels]
; channel-group for Digium Card Ports 1-8
; channels 1-4 for 4-line hunt group
; channel 8 for direct line 831-8015
group=1
context=outside
signalling=fxs_ks
callerid=asreceived
cidstart=ring
cidsignalling=bell
callwaiting=no
channel => 1-7

group=2
context=direct_line
signalling=fxs_ks
callerid=asreceived
cidstart=ring
cidsignalling=bell
callwaiting=no
channel => 8

Here is what I deem pertinent that I have in extensions.conf:
[outside]
exten => _X.,1,Goto(are-we-open,s,1)
include => are-we-open
include => users
;
;
[unknown]
exten => _X.,1,Goto(are-we-open,s,1)
include => are-we-open
include => users
;
;
[direct_line]
exten => _X.,1,Goto(inside,19315,1)
include => users
include => inside
include => special-features
;
;

[inside]
;
exten => 19310,hint,SIP/000FD30110B6
exten => 19310,1,Dial(SIP/000FD30110B6,20)
exten => 19310,n,GotoIF($[${DIALSTATUS} = BUSY]?busy:not_busy)
exten => 19310,n(busy),VoiceMail(${EXTEN}@default,b)
exten => 19310,n(not_busy),Voicemail(${EXTEN}@default,u)
exten => 19310,n,Hangup()
;
exten => 19311,hint,SIP/000FD3010F3E
exten => 19311,1,Dial(SIP/000FD3010F3E,20)
exten => 19311,n,GotoIF($[${DIALSTATUS} = BUSY]?busy:not_busy)
exten => 19311,n(busy),VoiceMail(${EXTEN}@default,b)
exten => 19311,n(not_busy),Voicemail(${EXTEN}@default,u)
exten => 19311,n,Hangup()
;
exten => 19312,hint,SIP/000FD30114C7
exten => 19312,1,Dial(SIP/000FD30114C7,20)
exten => 19312,n,GotoIF($[${DIALSTATUS} = BUSY]?busy:not_busy)
exten => 19312,n(busy),VoiceMail(${EXTEN}@default,b)
exten => 19312,n(not_busy),Voicemail(${EXTEN}@default,u)
exten => 19312,n,Hangup()
;
exten => 19313,hint,SIP/000FD3010F91
exten => 19313,1,Dial(SIP/000FD3010F91,20)
exten => 19313,n,GotoIF($[${DIALSTATUS} = BUSY]?busy:not_busy)
exten => 19313,n(busy),VoiceMail(${EXTEN}@default,b)
exten => 19313,n(not_busy),Voicemail(${EXTEN}@default,u)
exten => 19313,n,Hangup()
;
exten => 19314,hint,SIP/000FD301108D
exten => 19314,1,Dial(SIP/000FD301108D,20)
exten => 19314,n,GotoIF($[${DIALSTATUS} = BUSY]?busy:not_busy)
exten => 19314,n(busy),VoiceMail(${EXTEN}@default,b)
exten => 19314,n(not_busy),Voicemail(${EXTEN}@default,u)
exten => 19314,n,Hangup()
;
exten => 19315,hint,SIP/000FD301109D
exten => 19315,1,Dial(SIP/000FD301109D,20)
exten => 19315,n,GotoIF($[${DIALSTATUS} = BUSY]?busy:not_busy)
exten => 19315,n(busy),VoiceMail(${EXTEN}@default,b)
exten => 19315,n(not_busy),Voicemail(${EXTEN}@default,u)
exten => 19315,n,Hangup()
;
There are more extensions after this. What piece of the puzzle am I missing here. The other lines in group 1 ring the receptionist phone just fine after checking day of week, hours, holidays, etc. I just want port/line 8 to ring 19315 regardless.

Have worked on troubleshooting this for hours and know I am probably missing something simple here. Thanks for being patient.

I don’t understand the reason for any of the include => lines.

However, I sort of assumed that a direct _X. will match better than a more specfic match in an included context, although it won’t match single character extensions.

david55,
Thanks for the reply. Took out the includes and changed the context to the following. The phone now rings but I only have one way audio. I can hear them when they answer that phone but they cannot hear me. If it they don’t answer, it goes to voicemail properly and I can hear the voicemail recording. Are the ports on a Digium card polarity sensitive as far as Tip and Ring?

[direct-line]
exten => s,1,Goto(inside,19315,1)
;
;

Thanks for the reply. I’ll start hammering at it and see if I can figure out why we have just the one way audio.

Further update.

This is Asterisk 1.8.11-cert1 built by root @ asterisknltb.swiftnews.com on a x86_64 running Linux on 2012-04-27 20:57:17 UTC

Analog card is 8-port Digium card.
Phones are Digium D40 phones.

Installed Bria softphone on computer at that location and called from my cell phone. Had audio both ways.

When they try to call phone-to-phone internally, they have no audio in either direction.

I am in Colorado. The system is in Nevada. I can call person at that location on their Bria softphone from my cell phone or my Bria softphone and we have audio both ways.

This seems somehow related to the Digium D40 phones and – perhaps – the auto registration process via res_digium_phone.conf. If I set the direct dial target previously described to be my Polycom phone or my Bria softphone or the Bria softphone of the person at the Asterisk server location, we also have audio both directions.

Any thoughts, anyone…

Howdy,

Please ring our Support department and let them look into it. We don’t want it to be a mis-configuration of the phones for any reason that could be causing it. +1 256 428 6000

Thanks, Malcom. This one is a stumper. We have done multiple reconfigurations of res_digium_phone.conf and sip.conf. Reloaded sip. Reloaded the res_digium module. Restarted the server. Etc. Etc. Etc. What we are seeing when we do a sip show channels is that the phones appear to be continually trying to register multiple times. Even when we make a call between phones and place one end on hold – even though they still have no audio between them – we still see strange behavior in sip show channels. We’ll keep banging on it. May be related to the new firmware on the phones and/or the recently released version of Asterisk with the auto registration capabilities of the Digium phones.
asterisknltb*CLI> sip show channels
Peer User/ANR Call ID Format Hold Last Message Expiry Peer
10.32.0.114 000FD3010F3E 3ebb766767abf65 0x4 (ulaw) No Tx: ACK 000FD3010F
10.32.0.112 000FD301108D nHJ4RFp9srGNRg6 0x4 (ulaw) Yes Tx: ACK 000FD30110
10.32.0.111 (None) OrNMWYl0sZq68OZ 0x0 (nothing) No Rx: REGISTER
10.32.0.150 (None) kmXPpLnLZ9NfKnD 0x0 (nothing) No Rx: REGISTER
10.32.0.111 (None) ztBtJqa1ioPSzkh 0x0 (nothing) No Rx: REGISTER
10.32.0.112 (None) V7McNmgBZPLBcob 0x0 (nothing) No Rx: REGISTER
10.32.0.147 (None) CBt8ukMPydDnAdo 0x0 (nothing) No Rx: REGISTER
10.32.0.111 (None) gOhcC6YmZluvNm7 0x0 (nothing) No Rx: REGISTER
10.32.0.111 (None) xWgkJXdsEgn-xCc 0x0 (nothing) No Rx: REGISTER
9 active SIP dialogs

Okay, here’s more info. Please see the following:
asterisknltb*CLI> digium_phones show sessions
---- Digium Phone Module Active Sessions ----
SessionID:1687768830623530936 SecondsAlive:6458 SecondsLastActivity:34 Contact:sip:127.0.0.1:5060;ob Auth:Yes Inactive:No MAC:000FD30125FF
SessionID:594346990404632984 SecondsAlive:6455 SecondsLastActivity:34 Contact:sip:10.32.0.114:5060;ob Auth:Yes Inactive:No MAC:000FD3010F3E
SessionID:18177136301961392558 SecondsAlive:6267 SecondsLastActivity:35 Contact:sip:127.0.0.1:5060;ob Auth:Yes Inactive:No MAC:000FD301109D
SessionID:17379386431563072701 SecondsAlive:1695 SecondsLastActivity:35 Contact:sip:127.0.0.1:5060;ob Auth:Yes Inactive:No MAC:000FD301108D
SessionID:16864086711776166252 SecondsAlive:6378 SecondsLastActivity:35 Contact:sip:127.0.0.1:5060;ob Auth:Yes Inactive:No MAC:000FD30110B6
SessionID:414629821862721386 SecondsAlive:6276 SecondsLastActivity:34 Contact:sip:10.32.0.150:5060;ob Auth:Yes Inactive:No MAC:000FD3010F91
SessionID:202897812016811193 SecondsAlive:6405 SecondsLastActivity:35 Contact:sip:127.0.0.1:5060;ob Auth:Yes Inactive:No MAC:000FD30114C7
SessionID:2028638151151297038 SecondsAlive:6427 SecondsLastActivity:34 Contact:sip:127.0.0.1:5060;ob Auth:Yes Inactive:No MAC:000FD3052E35
— Total active sessions:8 —

If we make a call between the two (2) phones that show a “valid” contact IP address – in other words their own IP address – then we have audio. So our question that we are working on but still haven’t been able to answer is what is causing the other phones to show 127.0.0.1:5060 instead of their own IP address. All configurations in res_digium_phone.conf and sip.conf are mirror images – that is they all contain the same elements just different info for MAC address, line identifiers, etc.

I had some problems with no audio on a D40 when I first installed it. My first thought when there is a problem with audio is firewall issues with the RTP traffic - I have a limited port range for RTP set in RTP.conf of 10000 to 20000 and I double-checked the firewall settings for UDP ports to ensure that this range was open - in fact I widened the firewall port range slightly. At the some time I also moved the phone to a different location and network port (same IP address) and when it powered up again I had audio.

I have had a few other problems - contacts app not loading, and more recently, it was unable to connect to the server to download the config on a restart, but I have found that some of these things are cured power-cycling the phone - a simple restart does not do it. Since I moved the phone to a new location, unplugging the phone may have solved the audio problems too - since it is currently working I don’t want to mess around with it again to test.

I am on Certified Asterisk 1.8.11 and the latest phone firmware_1_0_3_45441.