I have asterisk 1.6 DAHDI configured right I believe.
DAHDI/1-1 is extension 6001
DAHDI/2-1 is the trunk
outgoing calling plan
_9NXXXXXX to Trunk 2 strip 1 number
if I dial 97754321 from extension 6001 I get a dialtone after I dial almost instantanious after I hit the last digit in the number.
I can redial 7754321 and get the number I am calling but If I dial from any extension thats what I get.
== Spawn extension (DLPN_DialPlan1, 97754321, 1) exited non-zero on ‘DAHDI/1-1’
– Hangup ‘DAHDI/1-1’
– starting simple switch on ‘DAHDI/1-1’
– executing [7754321@DLPN_DialPlan1:1] Macro(“DAHDI/1-1”, “trunkdial-failover-0.3”, DAHDI/2/,trunk1,") new in stack
– executing [s@micro-trunkdial-failover-0.3:1] gotoif ('DAHDI/1-1", “0?1-fmsetcid,1”) new in stack
– executing [s@micro-trunkdial-failover-0.3:2] gotoif ('DAHDI/1-1", “0?1-setglobalname,1”) new in stack
– executing [s@micro-trunkdial-failover-0.3:3] set ('DAHDI/1-1", “0?1-fCALLERID(num)=Phone”) new in stack
– executing [s@micro-trunkdial-failover-0.3:4] gotoif ('DAHDI/1-1", “1?1-dial,1”) new in stack
– Goto (macro-trunkdial-failover-0.3,1-dial,1)
– executing [1-dial@micro-trunkdial-failover-0.3:1] Dial(“DAHDI/1-1”, “DAHDI/2/”) new in stack
– called 2/
– DAHDI/2-1 answered DAHDI/1-1
– native bridging DAHDI/1-1 and DAHDI/2-1
Yeah. I am not sure why, I have a polycom 331 configred as sip and try to dial out after the last digit it hit no matter if it is an FXS port on a sip gateway or my polycom phone, I dial the number and always get a dial tone after I hit the last digit and have to redial the number again to make the call instead of the number dialed being forwarded to the trunk port 2 FXO hooked to my pots line.
Is there anything I can look at to see why the number I am dialing is not forwarding to the trunk 2 before it bridges the call ?
Looking at the output of the Dial statement, it looks like instead of removing a single digit, the 9, you are in fact removing all the digits. When the Dial calls DAHDI/2, there are no digits to send so the trunk is seized, giving you dial tone, and then you have to enter the digits again causing the PSTN to dial the number.
Check the logic for that outbound call to ensure you are only stripping the first digit off.
That is what you told it to do with the ${EXTEN:1}.
If the pattern match of _NXXXXXX matches the 7 digits, the variable ${EXTEN} will contain those digits. If you want to pass all 7 to the DAHDI channel, simply use ${EXTEN}. You use the ${EXTEN:1} when you want to strip digits off, for instance when you want the users to dial a 9 to gain access to the trunk.
for example…
exten => _9NXXXXXX,1,Dial(DAHDI/2/${EXTEN:1})
This would strip off the 9 and send the 7 digit number to the PSTN.