Problem with dial out using PRI from existing traditiona PBX
Posted: Sat Feb 01, 2014 5:13 am
Hi,
This is more of a Asterisk related problem than vicidial/goautodial but posting here due to installation source and integration allready existing.
Setup: Goautodial 2.1
VERSION: 2.4-309a
BUILD: 110430-1642
Asterisk version: Asterisk 1.4.39.1-vici
Two port E1 sangoma card.
Port 1 of the sangoma card is connected to the telco - Outgoing and incoming calls are working fine and have been for some time
Port 2 of sangoma card has been recently got into use and connected to the existing PBX of Matrix make.
Calls coming into Port 1 land up with the vicidial agents and if needed can be transferred to extensions (phones) connected to existing PBX via PRI Line on port 2. No issues here, all working ok.
Problem is when I am trying to dial out from my phones connected to existing PBX to outside world. Call has to land on Asterisk (Vicidial) PRI Port 2 and be routed to the outside world via the other PRI Line on Port 1. In other words the Asterisk- vicidial has to act as a bridge and route the calls coming in from PRI port 2 to PRI port 1.
PRI port 2 is configured as "from-internal" context in and the following is the entries in extensions.conf for the same:
This code is expected to play a dialtone and collect digits till # or timeout and then call those digits using TRUNK which is Dahdi port 1
[from-internal]
exten => s,1,Playtones(dial)
exten => s,2,Set(collect=9)
;exten => s,2,Set(erase=0)
exten => s,3,Set(TIMEOUT(digit)=5)
exten => s,4,Set(TIMEOUT(response)=600)
exten => s,5,GotoIf($["${collect}" = "9"]?6:7)
exten => s,6,Playtones(dial)
exten => s,7,Waitexten(3)
exten => _X,1,StopPlaytones()
exten => _X,2,Set(collect=${collect}${EXTEN})
exten => _X,3,Goto(s,7)
exten => #,1,GotoIF($["${collect:1:2}" = "00"]?2:4)
exten => #,2,Dial(TRUNK/${collect:1})
exten => #,3,Hangup()
exten => #,4,Playback(you-dialed-wrong-number)
exten => #,5,Playback(please-try-again)
exten => #,6,Goto(s,1)
exten => t,1,Goto(#,1)
When a call is made the following is seen on the Asterisk CLI
Accepting call from '4600' to 's' on channel 0/6, span 2
-- Executing [s@from-internal:1] PlayTones("DAHDI/37-1", "dial") in new stack
-- Executing [s@from-internal:2] Set("DAHDI/37-1", "collect=9") in new stack
-- Executing [s@from-internal:3] Set("DAHDI/37-1", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5
-- Executing [s@from-internal:4] Set("DAHDI/37-1", "TIMEOUT(response)=600") in new stack
-- Response timeout set to 600
-- Executing [s@from-internal:5] GotoIf("DAHDI/37-1", "1?6:7") in new stack
-- Goto (from-internal,s,6)
-- Executing [s@from-internal:6] PlayTones("DAHDI/37-1", "dial") in new stack
-- Executing [s@from-internal:7] Wait("DAHDI/37-1", "3") in new stack
-- Channel 0/6, span 2 got hangup request, cause 16
== Spawn extension (from-internal, s, 7) exited non-zero on 'DAHDI/37-1'
-- Hungup 'DAHDI/37-1'
Call gets hangup immediately. Am not even able to hear the dialtone on that is playtones not working. What could be the problem in the settings. Guess I need to set some flags somewhere correctly to do this right.
All help is appreciated.
thanks and regards
This is more of a Asterisk related problem than vicidial/goautodial but posting here due to installation source and integration allready existing.
Setup: Goautodial 2.1
VERSION: 2.4-309a
BUILD: 110430-1642
Asterisk version: Asterisk 1.4.39.1-vici
Two port E1 sangoma card.
Port 1 of the sangoma card is connected to the telco - Outgoing and incoming calls are working fine and have been for some time
Port 2 of sangoma card has been recently got into use and connected to the existing PBX of Matrix make.
Calls coming into Port 1 land up with the vicidial agents and if needed can be transferred to extensions (phones) connected to existing PBX via PRI Line on port 2. No issues here, all working ok.
Problem is when I am trying to dial out from my phones connected to existing PBX to outside world. Call has to land on Asterisk (Vicidial) PRI Port 2 and be routed to the outside world via the other PRI Line on Port 1. In other words the Asterisk- vicidial has to act as a bridge and route the calls coming in from PRI port 2 to PRI port 1.
PRI port 2 is configured as "from-internal" context in and the following is the entries in extensions.conf for the same:
This code is expected to play a dialtone and collect digits till # or timeout and then call those digits using TRUNK which is Dahdi port 1
[from-internal]
exten => s,1,Playtones(dial)
exten => s,2,Set(collect=9)
;exten => s,2,Set(erase=0)
exten => s,3,Set(TIMEOUT(digit)=5)
exten => s,4,Set(TIMEOUT(response)=600)
exten => s,5,GotoIf($["${collect}" = "9"]?6:7)
exten => s,6,Playtones(dial)
exten => s,7,Waitexten(3)
exten => _X,1,StopPlaytones()
exten => _X,2,Set(collect=${collect}${EXTEN})
exten => _X,3,Goto(s,7)
exten => #,1,GotoIF($["${collect:1:2}" = "00"]?2:4)
exten => #,2,Dial(TRUNK/${collect:1})
exten => #,3,Hangup()
exten => #,4,Playback(you-dialed-wrong-number)
exten => #,5,Playback(please-try-again)
exten => #,6,Goto(s,1)
exten => t,1,Goto(#,1)
When a call is made the following is seen on the Asterisk CLI
Accepting call from '4600' to 's' on channel 0/6, span 2
-- Executing [s@from-internal:1] PlayTones("DAHDI/37-1", "dial") in new stack
-- Executing [s@from-internal:2] Set("DAHDI/37-1", "collect=9") in new stack
-- Executing [s@from-internal:3] Set("DAHDI/37-1", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5
-- Executing [s@from-internal:4] Set("DAHDI/37-1", "TIMEOUT(response)=600") in new stack
-- Response timeout set to 600
-- Executing [s@from-internal:5] GotoIf("DAHDI/37-1", "1?6:7") in new stack
-- Goto (from-internal,s,6)
-- Executing [s@from-internal:6] PlayTones("DAHDI/37-1", "dial") in new stack
-- Executing [s@from-internal:7] Wait("DAHDI/37-1", "3") in new stack
-- Channel 0/6, span 2 got hangup request, cause 16
== Spawn extension (from-internal, s, 7) exited non-zero on 'DAHDI/37-1'
-- Hungup 'DAHDI/37-1'
Call gets hangup immediately. Am not even able to hear the dialtone on that is playtones not working. What could be the problem in the settings. Guess I need to set some flags somewhere correctly to do this right.
All help is appreciated.
thanks and regards