asterisk at phreaknet.org
2022-Jul-27 16:54 UTC
[asterisk-users] DUNDi peers disconnect after being connected for months or years, cannot reconnect again
On 7/27/2022 11:34 AM, Court Campbell wrote:> > I realize that the heyday of DUNDi was about 2008, and that there’s > less and less information online about it and lots of people don’t use > it anymore and use static IAX trunks instead. But we have 53 asterisk > phone systems connecting our locations, and so creating static IAX > trunks (even with a regional hub and spoke model) is a significant > undertaking. > > We’ve had issues with DUNDi peers disconnecting in the past and with > Elastix used to have to do an amportal restart on the PBX to have it > reconnect again. But the new issue that we’re seeing is that the peer > refuses to reconnect again, even after changing the long secret key in > dundi_general, the MAC address of the VM the PBX is running on, the IP > of the PBX and recreating the public/private keypair. >Do you have any logs/debug demonstrating this?> > The PBX that disconnected will not reconnect to any DUNDi peers at > all, even to a completely new VM that we stand up at the same site on > the same virtual switch on the same host. We are only trying to do > inter-site extension dialing, not routing external calling between > sites using DUNDi. > > I’m also okay with giving up on DUNDi if anybody else has a less > labour intensive way of routing extension dialing between that many > PBXes than a web of static IAX trunks. > >Why not run a centralized lookup scheme for routing, using ENUM or an HTTPS API? That's what I generally see these days for large networks using IAX2 trunking; I've only encountered one setup recently using DUNDi. Assuming that central server is always routing, you then have a single source of truth for call routing.> Here are the config files. I removed all the ; commented lines in > dundi.conf to save space. > > Iax_custom.conf > > [dundi] > > type=user > > dbsecret=dundi/secret > > context=ext-local > > disallow=all > > allow=ulaw > > allow=g726 > > dundi.conf > > [general] > > #include dundi_general_custom.conf > > ttl=32 > > autokill=yes > > [mappings] > > #include dundi_mappings_custom.conf > > #include dundi_peers_custom.conf > > dundi_mappings.conf > > priv => > dundi-priv-canonical,0,IAX2,dundi:${SECRET}@PBX_IP/${NUMBER},nopartial > > priv => > dundi-priv-customers,100,IAX2,dundi:${SECRET}@PBX_IP/${NUMBER},nopartial > > priv => > dundi-priv-via-pstn,400,IAX2,dundi:${SECRET}@PBX_IP/${NUMBER},nopartial > > dundi_general.conf > > organization> > locality> > stateprov> > country> > email> > phone> > department> > secret=secret key > > entityid=MAC address > > dundi_peers.conf > > [server A MAC] > > model=symmetric > > host> > inkey> > outkey> > his_status=connected > > include=priv > > permit=priv > > qualify=yes > > order=primary > > [server B MAC] > > model=symmetric > > host> > inkey> > outkey> > his_status=connected > > include=priv > > permit=priv > > qualify=yes > > order=primary > > extensions_custom.conf > > [from-internal] > > include => from-internal-noxfer > > include => from-internal-xfer > > include => dundi-priv-lookup > > include => bad-number ; auto-generated > > exten => h,1,Macro(hangupcall) > > ; ******************************************** > > ; CONFIGURACION PARA DUNDi > > [dundi-priv-canonical] > > ; Here we include the context that contains the extensions. > > exten => _9999X,1,Macro(stdexten,${EXTEN}) > > ;include => ext-local > > ; Here we include the context that contains the queues. > > ; include => ext-queues > > [dundi-priv-customers] > > ; If you have customers (or resell services) we can list them here > > [dundi-priv-via-pstn] > > ; Here we include the context with our trunk to the PSTN, > > ; if we want the other teams can use our trunks > > ;include => outbound-allroutes > > [dundi-priv-local] > > ; In this context we unify the three contexts, we can use this as > > ; context of the trunks of dundi iax > > include => dundi-priv-canonical > > include => dundi-priv-customers > > include => dundi-priv-via-pstn > > [dundi-priv-lookup] > > ; This context is responsible for making the search for a number of dundi > > ; Before you do the search properly define our caller id. > > ; because if not we have a caller id as 'device<0000>'. > > exten => _X.,1,Macro(user-callerid) > > exten => _X.,n,Macro(dundi-priv,${EXTEN}) > > exten => _X.,n,GotoIf($['${DIALSTATUS}' = 'BUSY']?100) > > exten => _X.,n,Goto(bad-number,${EXTEN},1) > > exten => _X.,100,Playtones(congestion) > > exten => _X.,101,Congestion(10) > > [macro-dundi-priv] > > ; This is the macro is called from the context [dundi-priv-lookup] > > ; It also avoids having loops in the consultations dundi. > > exten => s,1,Goto(${ARG1},1) > > switch => DUNDi/priv > > ; ******************************************** >
Court Campbell
2022-Jul-27 19:58 UTC
[asterisk-users] DUNDi peers disconnect after being connected for months or years, cannot reconnect again
This is what I get when I run "dundi set debug on". I've changed the IPs to DUNDi Server 1 and 2. DUNDi peers always show UNREACHABLE Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 26713 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 11263 DTrans: 00000 [DUNDi Server 2:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 26713 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 11263 DTrans: 00000 [DUNDi Server 2:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 26713 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 11263 DTrans: 00000 [DUNDi Server 2:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 26713 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 11263 DTrans: 00000 [DUNDi Server 2:4520] (Final) Rx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 29321 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 001 Type: ACK (Response) Flags: 00 STrans: 22000 DTrans: 29321 [DUNDi Server 1:4520] (Final) Rx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 04905 DTrans: 00000 [DUNDi Server 2:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 001 Type: ACK (Response) Flags: 00 STrans: 20346 DTrans: 04905 [DUNDi Server 2:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 26713 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 11263 DTrans: 00000 [DUNDi Server 2:4520] (Final) Rx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 29321 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 001 Type: ACK (Response) Flags: 00 STrans: 12424 DTrans: 29321 [DUNDi Server 1:4520] (Final) Rx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 04905 DTrans: 00000 [DUNDi Server 2:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 001 Type: ACK (Response) Flags: 00 STrans: 02609 DTrans: 04905 [DUNDi Server 2:4520] (Final) Rx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Flags: 00 STrans: 29321 DTrans: 00000 [DUNDi Server 1:4520] (Final) Tx-Frame -- OSeqno: 000 ISeqno: 001 Type: ACK (Response) Flags: 00 STrans: 03011 DTrans: 29321 [DUNDi Server 1:4520] (Final) Rx-Frame -- OSeqno: 000 ISeqno: 000 Type: NULL (Command) Thank you, Court Campbell -----Original Message----- From: asterisk at phreaknet.org <asterisk at phreaknet.org> Sent: Wednesday, July 27, 2022 12:55 PM To: Court Campbell <CCampbell at flexngate.com> Cc: Asterisk Users <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] DUNDi peers disconnect after being connected for months or years, cannot reconnect again WARNING: This email originated from outside of Flex-N-Gate, and it may contain dangerous attachments or links that may steal your credentials or infect your computer. Please be cautious when opening attachments, clicking links or responding to this email. On 7/27/2022 11:34 AM, Court Campbell wrote:> > I realize that the heyday of DUNDi was about 2008, and that there's > less and less information online about it and lots of people don't use > it anymore and use static IAX trunks instead. But we have 53 asterisk > phone systems connecting our locations, and so creating static IAX > trunks (even with a regional hub and spoke model) is a significant > undertaking. > > We've had issues with DUNDi peers disconnecting in the past and with > Elastix used to have to do an amportal restart on the PBX to have it > reconnect again. But the new issue that we're seeing is that the peer > refuses to reconnect again, even after changing the long secret key in > dundi_general, the MAC address of the VM the PBX is running on, the IP > of the PBX and recreating the public/private keypair. >Do you have any logs/debug demonstrating this?> > The PBX that disconnected will not reconnect to any DUNDi peers at > all, even to a completely new VM that we stand up at the same site on > the same virtual switch on the same host. We are only trying to do > inter-site extension dialing, not routing external calling between > sites using DUNDi. > > I'm also okay with giving up on DUNDi if anybody else has a less > labour intensive way of routing extension dialing between that many > PBXes than a web of static IAX trunks. > >Why not run a centralized lookup scheme for routing, using ENUM or an HTTPS API? That's what I generally see these days for large networks using IAX2 trunking; I've only encountered one setup recently using DUNDi. Assuming that central server is always routing, you then have a single source of truth for call routing.> Here are the config files. I removed all the ; commented lines in > dundi.conf to save space. > > Iax_custom.conf > > [dundi] > > type=user > > dbsecret=dundi/secret > > context=ext-local > > disallow=all > > allow=ulaw > > allow=g726 > > dundi.conf > > [general] > > #include dundi_general_custom.conf > > ttl=32 > > autokill=yes > > [mappings] > > #include dundi_mappings_custom.conf > > #include dundi_peers_custom.conf > > dundi_mappings.conf > > priv => > dundi-priv-canonical,0,IAX2,dundi:${SECRET}@PBX_IP/${NUMBER},nopartial > > priv => > dundi-priv-customers,100,IAX2,dundi:${SECRET}@PBX_IP/${NUMBER},noparti > al > > priv => > dundi-priv-via-pstn,400,IAX2,dundi:${SECRET}@PBX_IP/${NUMBER},nopartia > l > > dundi_general.conf > > organization> > locality> > stateprov> > country> > email> > phone> > department> > secret=secret key > > entityid=MAC address > > dundi_peers.conf > > [server A MAC] > > model=symmetric > > host> > inkey> > outkey> > his_status=connected > > include=priv > > permit=priv > > qualify=yes > > order=primary > > [server B MAC] > > model=symmetric > > host> > inkey> > outkey> > his_status=connected > > include=priv > > permit=priv > > qualify=yes > > order=primary > > extensions_custom.conf > > [from-internal] > > include => from-internal-noxfer > > include => from-internal-xfer > > include => dundi-priv-lookup > > include => bad-number ; auto-generated > > exten => h,1,Macro(hangupcall) > > ; ******************************************** > > ; CONFIGURACION PARA DUNDi > > [dundi-priv-canonical] > > ; Here we include the context that contains the extensions. > > exten => _9999X,1,Macro(stdexten,${EXTEN}) > > ;include => ext-local > > ; Here we include the context that contains the queues. > > ; include => ext-queues > > [dundi-priv-customers] > > ; If you have customers (or resell services) we can list them here > > [dundi-priv-via-pstn] > > ; Here we include the context with our trunk to the PSTN, > > ; if we want the other teams can use our trunks > > ;include => outbound-allroutes > > [dundi-priv-local] > > ; In this context we unify the three contexts, we can use this as > > ; context of the trunks of dundi iax > > include => dundi-priv-canonical > > include => dundi-priv-customers > > include => dundi-priv-via-pstn > > [dundi-priv-lookup] > > ; This context is responsible for making the search for a number of > dundi > > ; Before you do the search properly define our caller id. > > ; because if not we have a caller id as 'device<0000>'. > > exten => _X.,1,Macro(user-callerid) > > exten => _X.,n,Macro(dundi-priv,${EXTEN}) > > exten => _X.,n,GotoIf($['${DIALSTATUS}' = 'BUSY']?100) > > exten => _X.,n,Goto(bad-number,${EXTEN},1) > > exten => _X.,100,Playtones(congestion) > > exten => _X.,101,Congestion(10) > > [macro-dundi-priv] > > ; This is the macro is called from the context [dundi-priv-lookup] > > ; It also avoids having loops in the consultations dundi. > > exten => s,1,Goto(${ARG1},1) > > switch => DUNDi/priv > > ; ******************************************** >