Newbie question re: outbound calls


#1

I’ve been lurking here for a while searching to find the answer to my problem with no avail so first i’m going to ask for some troubleshooting tips to find the answer myself and if that doesn’t work i’m going to go draw a hot bath and sharpen the razor…

[ul]To cover some basic points:
We have a voicepulse connect account configured to use an IAX2 trunk.
All incoming calls are working.
Internal calls between extensions can be made, we can hear the weather recording, check voicemail, etc.
Outgoing calls always get the “All circuits are busy now” message.
There is no firewall in front of the asterisk server.[/ul]

I have tried the following dialplans:

[ul]9|1800NXXXXXX
9|1866NXXXXXX
9|1877NXXXXXX
9|1888NXXXXXX
[/ul]

[ul]9|NXXNXXXXXX
9|1NXXNXXXXXX
[/ul]

[ul]9|.[/ul]

[ul]120221345**[/ul]

With no avail (note, the first one was just to try and call 8xx numbers to get something and the last was entering my cellphone number directly to avoid any problems with stripping the initial “9”). My asterisk info page shows the following regarding IAX2:

IAX2 Sip Registry

Host Username Perceived Refresh State 66.234.228.170:4569 EKD88hPo89 69.64.191.63:4569 60 Registered -- Remote UNIX connection

IAX2 Peers

Name/Username Host Mask Port Status voicepulse-out- 66.234.228.160 (S) 255.255.255.255 4569 Unmonitored -- Remote UNIX connection

So my next question. How can i trace debugging information directly on outbound call attempts and is there anything specificially that i should be looking for?


#2

I believe i have narrowed the problem down a bit. From the asterisk CLI directly with IAX2 debugging on i get the following info:

[code] – Executing Macro(“SIP/801-3c5e”, “dialout-trunk|2|12022134588|”) in new stack
– Executing GotoIf(“SIP/801-3c5e”, “1?3:2)”) in new stack
– Goto (macro-dialout-trunk,s,3)
– Executing Macro(“SIP/801-3c5e”, “record-enable|801|OUT”) in new stack
– Executing GotoIf(“SIP/801-3c5e”, “0 > 0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing GotoIf(“SIP/801-3c5e”, “1?5:8”) in new stack
– Goto (macro-record-enable,s,5)
– Executing DBget(“SIP/801-3c5e”, “RecEnable=RECORD-OUT/801”) in new stack
– DBget: varname=RecEnable, family=RECORD-OUT, key=801
– DBget: Value not found in database.
– Executing SetVar(“SIP/801-3c5e”, “CALLFILENAME=OUT801-20051019-155851-1129751931.44”) in new stack
– Executing Goto(“SIP/801-3c5e”, “s|14”) in new stack
– Goto (macro-record-enable,s,14)
– Executing GotoIf(“SIP/801-3c5e”, “0?15:99”) in new stack
– Goto (macro-record-enable,s,99)
– Executing NoOp(“SIP/801-3c5e”, “NO RECORDING NEEDED”) in new stack
– Executing GotoIf(“SIP/801-3c5e”, “1?7”) in new stack
– Goto (macro-dialout-trunk,s,7)
– Executing GotoIf(“SIP/801-3c5e”, ““Alticon Inc”?9”) in new stack
– Executing SetCallerID(“SIP/801-3c5e”, ““Alticon Inc” <301-576-3068>”) in new stack
– Executing SetGroup(“SIP/801-3c5e”, “OUT_2”) in new stack
– Executing CheckGroup(“SIP/801-3c5e”, “”) in new stack
– Executing SetVar(“SIP/801-3c5e”, “DIAL_NUMBER=12022134588”) in new stack
– Executing SetVar(“SIP/801-3c5e”, “DIAL_TRUNK=2”) in new stack
– Executing AGI(“SIP/801-3c5e”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing SetVar(“SIP/801-3c5e”, “OUTNUM=912022134588”) in new stack
– Executing Cut(“SIP/801-3c5e”, “custom=OUT_2|:|1”) in new stack
– Executing GotoIf(“SIP/801-3c5e”, “0?19”) in new stack
– Executing Dial(“SIP/801-3c5e”, “IAX2/voicepulse-out-01/912022134588”) in new stack
Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW
Timestamp: 00012ms SCall: 00004 DCall: 00000 [66.234.228.160:4569]
VERSION : 2
CALLED NUMBER : 912022134588
CALLING NUMBER : 3015763068
CALLING NAME : Alticon Inc
LANGUAGE : en
USERNAME : EKD88hPo89
FORMAT : 4
CAPABILITY : 63502
ADSICPE : 2
DATE TIME : 190021465

-- Called voicepulse-out-01/912022134588

Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: AUTHREQ
Timestamp: 00013ms SCall: 00045 DCall: 00004 [66.234.228.160:4569]
AUTHMETHODS : 2
CHALLENGE : 116973551
USERNAME : EKD88hPo89

Tx-Frame Retry[000] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: AUTHREP
Timestamp: 00022ms SCall: 00004 DCall: 00045 [66.234.228.160:4569]
MD5 RESULT : b9cee7b7a2034c382c9812626bc4f032

Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 002 Type: IAX Subclass: REJECT
Timestamp: 00022ms SCall: 00045 DCall: 00004 [66.234.228.160:4569]
CAUSE : No such context/extension
[/code]

It appears as if the problem lies in this area with the “9” that has already been stripped getting added again after running through the fixlocalprefix script. But, after that I’m at a loss.

-- Executing SetVar("SIP/801-3c5e", "DIAL_NUMBER=12022134588") in new stack -- Executing SetVar("SIP/801-3c5e", "DIAL_TRUNK=2") in new stack -- Executing AGI("SIP/801-3c5e", "fixlocalprefix") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix -- AGI Script fixlocalprefix completed, returning 0 -- Executing SetVar("SIP/801-3c5e", "OUTNUM=912022134588") in new stack


#3

well, i’ve gotten it working for outbound calls. this is a bit odd though as i wouldn’t have expected this from a default install of aah:
i replaced the following line:

exten => s,14,SetVar(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER}) ; OUTNUM is the final dial number

with

;exten => s,14,SetVar(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER}) ; OUTNUM is the final dial number exten => s,14,SetVar(OUTNUM=${DIAL_NUMBER}) ; OUTNUM is the final dial number

why it would add “OUTPREFIX” to the number i have no clue as that seems kindof whack.

If i see any further problems with this i will post them for the benefit of anyone else who has similar problems.