Trunk rings extension but not ringroup

Hi there

My first post on this forum :smile:

I have asterisk 1.6.2.13 running on a QNAP TS-119 NAS. I have 2 FXO trunks using Grandstream HT503 and Matrix ATA211 running fine.

I am now trying to add a Cisco 1760 with an FXO card as a trunk to the system and have followed these intructions:
http://www.voip-info.org/wiki/view/Asterisk+cisco+FXO
Outgoing calls work fine :smile:

However, incoming calls work only if they are directed to an extension.
If I direct them to a ring group (#97), I get this log message:

To my understanding, the cisco does not behave like a trunk in the same way the HT503 or ATA211 do. Hence, it is allowed to place (anonymous) calls to my extensions, but not to the ring group… but I don’t know how to confirm or fix that.

The relevant conf data is below. Trunk 3 is the one I’m trying to set up with ringroup-3.
This was mostly set up using the asterisk GUI and tweaked slightly

[code][trunk_3]
context = DID_trunk_3
host = 10.10.10.10
trunkname = cisco ; GUI metadata
hasiax = no
registeriax = no
hassip = yes
registersip = no
trunkstyle = voip
hasexten = no
insecure = no
; work with or without. no need to remove
secret =
username =
fromdomain =
fromuser =
disallow = all
allow = alaw

[trunk_2]
context = DID_trunk_2
host = 10.10.10.186
trunkname = LL086 ; GUI metadata
hasiax = no
registeriax = no
hassip = yes
registersip = no
trunkstyle = voip
hasexten = no
insecure = no
secret =
username =
port = 5062
fromdomain =
fromuser =
disallow = all
allow = alaw

[ringgroups]
exten = 99,1,Goto(ringroups-custom-1,s,1)
exten = 98,1,Goto(ringroups-custom-2,s,1)
exten = 97,1,Goto(ringroups-custom-3,s,1)

[DID_trunk_1]
include = DID_trunk_1_default
[DID_trunk_1_default]
exten = _X.,1,Goto(ringroups-custom-1,s,1)

[DID_trunk_2]
include = DID_trunk_2_default
[DID_trunk_2_default]
exten = _X.,1,Goto(ringroups-custom-2,s,1)

[DID_trunk_3]
include = DID_trunk_3_default
[DID_trunk_3_default]
exten = _X.,1,Goto(ringroups-custom-3,s,1)

[ringroups-custom-1]
exten = s,1,NoOp(RingallM)
exten = s,n,Dial(SIP/10&SIP/11&SIP/12&SIP/13&SIP/14&SIP/20&SIP/50,20,i)
exten = s,n,Hangup

[ringroups-custom-2]
exten = s,1,NoOp(RingallV)
exten = s,n,Dial(SIP/14&SIP/30&SIP/31&SIP/32&SIP/50,20,i)
exten = s,n,Hangup

[ringroups-custom-3]
exten = s,1,NoOp(RingallTest)
exten = s,n,Dial(SIP/14,20,i)
exten = s,n,Hangup

[DLPN_MDialplan]
include = CallingRule_cisco
include = default
include = parkedcalls
include = conferences
include = ringgroups
include = voicemenus
include = queues
include = voicemailgroups
include = directory
include = pagegroups
include = page_an_extension[/code]

The log of the incoming call
10.10.10.10 = cisco
10.10.10.234 = asterisk
97 = ring group
88 and LL800= fxo port name on cisco

[code]<— SIP read from UDP:10.10.10.10:50080 —>
INVITE sip:97@10.10.10.234:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.10:5060;branch=z9hG4bK4C1E38
Remote-Party-ID: “LL800” sip:10.10.10.10;party=calling;screen=no;privacy=off
From: “cisco” sip:88@10.10.10.10;tag=18E7087C-12D4
To: sip:97@10.10.10.234
Date: Wed, 04 May 2011 05:07:18 GMT
Call-ID: 37D8A78E-754311E0-83BCC310-583333EE@10.10.10.10
Supported: 100rel,timer,resource-priority,replaces
Min-SE: 1800
Cisco-Guid: 936665108-1967329760-2209858320-1479750638
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Max-Forwards: 70
Timestamp: 1304485638
Contact: sip:88@10.10.10.10:5060
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 243

v=0
o=CiscoSystemsSIP-GW-UserAgent 666 6766 IN IP4 10.10.10.10
s=SIP Call
c=IN IP4 10.10.10.10
t=0 0
m=audio 18458 RTP/AVP 8 101
c=IN IP4 10.10.10.10
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20

<------------->
— (21 headers 11 lines) —
== Using SIP RTP CoS mark 5
Sending to 10.10.10.10 : 5060 (no NAT)
Using INVITE request as basis request - 37D8A78E-754311E0-83BCC310-583333EE@10.10.10.10
No matching peer for ‘88’ from '10.10.10.10:50080’
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8 (alaw), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 10.10.10.10:18458
Looking for 97 in default (domain 10.10.10.234)

<— Reliably Transmitting (no NAT) to 10.10.10.10:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.10.10.10:5060;branch=z9hG4bK4C1E38;received=10.10.10.10
From: “cisco” sip:88@10.10.10.10;tag=18E7087C-12D4
To: sip:97@10.10.10.234;tag=as58a6db7a
Call-ID: 37D8A78E-754311E0-83BCC310-583333EE@10.10.10.10
CSeq: 101 INVITE
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

<------------>
[May 4 10:36:59] NOTICE[24491]: chan_sip.c:20200 handle_request_invite: Call from ‘’ to extension ‘97’ rejected because extension not found in context ‘default’.
Scheduling destruction of SIP dialog ‘37D8A78E-754311E0-83BCC310-583333EE@10.10.10.10’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:10.10.10.10:50080 —>
ACK sip:97@10.10.10.234:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.10:5060;branch=z9hG4bK4C1E38
From: “cisco” sip:88@10.10.10.10;tag=18E7087C-12D4
To: sip:97@10.10.10.234;tag=as58a6db7a
Date: Wed, 04 May 2011 05:07:18 GMT
Call-ID: 37D8A78E-754311E0-83BCC310-583333EE@10.10.10.10
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: telephone-event
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Really destroying SIP dialog ‘37D8A78E-754311E0-83BCC310-583333EE@10.10.10.10’ Method: ACK

[/code]

Thanks a lot for your help !

The Cisco is stripping the #. Either fix this at the Cisco end, or change your ring group extension number so as not to use # or *.

Sorry - I don’t understand what you’re saying.

I’m not aware I’m using # or * anywhere in my dial plan ?

However, FYI the Cisco does not forward the CallerID as I’m using VIC-2FXO (Version 1) which does not support CallerID (in case that’s what you meant by stripping the number)

Could you rephrase your reply ?
Thanks !

Somehow incoming call from cisco get to “default” context. Try to play with username/fromuser parameters (simply = is not the same, as =’’) in sip.conf for Cisco.

You said there was a #:

Based on an incomplete sip.conf, I would guess that you have allowguest=yes and haven’t specified that the port number for the remote systems is 50080. You haven’t set insecure=port.

did the trick

alternatively, [code]allowguest = no[/code] (without insecure = port) also works

@Samael28 - i had tried various username combinations but that didn't work
@david55
[quote]You said there was a #:

If I direct them to a ring group (#97), I get this log message:[/quote]
My bad ; I meant "number" 97, not #97

[code]port = 50080[/code]
had no influence on the working

Thanks everyone !

did the trick

alternatively, allowguest = no (without insecure = port) also works

@Samael28 - i had tried various username combinations but that didn’t work
@david55

[quote]You said there was a #:

If I direct them to a ring group (#97), I get this log message:[/quote]
My bad ; I meant “number” 97, not #97

had no influence on the working

Thanks everyone !