Asterisk 1.6 Dial Tone on Trunk but IT didn't Dial


#1

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


#2

The trace shows a successful call, on a configuration created by a GUI.

You didn’t mention the GUI.

Why do you think this is wrong? Native bridging looks like a very successful outcome, to me.

On the other hand, your GUI doesn’t seem to have forwarded any digits to the trunk.


#3

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 ?


#4

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.


#5

I changed the following

CallingRule_Local

exten=_NXXXXXX,1,Dial(DAHDI/2/${EXTEN:1})

in the extension.conf

now it is dialing on the trunk but it is cutting off 1 number. IE 7754321 it is dialing 754321 on the trunk. I can listen with a but set.


#6

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.