Showing posts with label Trunks. Show all posts
Showing posts with label Trunks. Show all posts

12 July 2012

FOP not showing DAHDI trunks

DAHDI trunks are not shown properly in the Flash Operator Panel. They are identified by Zap/XX in the configuration file rather than DAHDI/XX. The following patch for 2.7.0 corrects the problem. 


*** retrieve_op_conf_from_mysql.php.original 2010-04-05 10:28:16.000000000 -0500
--- retrieve_op_conf_from_mysql.php 2010-04-05 10:28:12.000000000 -0500
***************
*** 191,197 ****
--- 191,201 ----
}
}
if (!($inzaplines)) {
+ if ($chan_dahdi) {
+ array_push($zaplines,array( "DAHDI/$i","$newlabel" ));
+ } else {
array_push($zaplines,array( "Zap/$i","$newlabel" ));
+ }
}
} //istrunk
} //for $i

VICIDIAL carrier hunt/trunk hunt

; ViciDial Outbound FailOver Dialing
;exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
;exten => _91NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(sgw)}<80]?10) ;exten => _91NXXNXXXXXX,n,NoOp("Max Trunks Exceeded")
;exten => _91NXXNXXXXXX,n,Congestion
;exten => _91NXXNXXXXXX,10,Set(GROUP()=sgw)
;exten => _91NXXNXXXXXX,n,NoOp("TIU: ${GROUP_COUNT(sgw)}") ; For debug/testing
;exten => _91NXXNXXXXXX,n,Dial(${VICITRUNK1}/${EXTEN:1},,To)
;exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?20)
;exten => _91NXXNXXXXXX,n,Hangup
;exten => _91NXXNXXXXXX,20,Dial(${VICITRUNK2}/${EXTEN:1},,To)
;exten => _91NXXNXXXXXX,n,Hangup

====================================================================================

use this dialplan it works great
this basedon n+101 concept as described in astersik
when there is a busy or trunk failure it will be go to n+101 dialplan

exten => _8X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _8X.,2,Dial(${TRUNK1}/0${EXTEN:1},,tTor)
exten => _8X.,3,Dial(${TRUNK2}/0${EXTEN:1},,tTor)
exten => _8X.,4,Hangup
exten => _8X.,103,Dial(${TRUNK2}/0${EXTEN:1},,tTor)
exten => _8X.,104,Hangup
exten => _8X.,204,Hangup

====================================================================================


I am currently using goautodial 2.0 final. Just downloaded it a day ago and set it up. It works great, a few minor adjustments and all is perfect. Thanks. I have set up 3 carriers (using web interface) and all of them work fine set up is below. Each trunk was set up 9 then 8 then 7 and each trunk would dial fine if I use the appropriate number (9,8, or 7) but then I wanted to set up the trunks to round robin/load balance etc. Below is the config and it works great "except" goautodial doesn't control the callid, the carrier does "ugh" I have tried some of the set up below and they wont dial out at all. Please advise.

"WORKS BUT CALLER ID ISSUE"

"FROM EXTENSIONS-VICIDIAL.CONF"

; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST
TRUNKloop = IAX2/ASTloop:test@127.0.0.1:40569
TRUNKblind = IAX2/ASTblind:test@127.0.0.1:41569
SIPgoautodial = SIP/goautodial
cordiaip = SIP/cordiaip
VITEL-OUTBOUND = SIP/vitel-outbound


; logging of all outbound calls from agent phones
[defaultlog]
exten => s,1,AGI(agi-VDAD_inbound_calltime_check.agi,-----NO-----defaultlog--------------------)
exten => s,n,Background(sip-silence)
exten => s,n,WaitExten(20)


; hangup
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup
exten => i,1,Goto(s,2)
; hangup
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; custom dialplan entries
exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _X.,n,Goto(default,${EXTEN},1)



[vicidial-auto]
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; Local Server: 10.1.10.90
exten => _010*001*010*090*.,1,Goto(default,${EXTEN:16},1)
; VICIDIAL Carrier: GoAutoDial - GoAutoDial SIP Gateway

exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,2,NoOp(LB IS ${lb_trunk})
exten => _9X.,3,GotoIf($[${lb_trunk} != 0]?10)
exten => _9X.,4,Set(GLOBAL(lb_trunk)=1)
exten => _9X.,5,Dial(${SIPgoautodial}/${EXTEN:1},,tTor)

exten => _9X.,10,GotoIf($[${lb_trunk} != 1]?20)
exten => _9X.,11,Set(GLOBAL(lb_trunk)=2)
exten => _9X.,12,Dial(${cordiaip}/${EXTEN:1},,tTor)

exten => _9X.,20,GotoIf($[${lb_trunk} != 2]?30)
exten => _9X.,21,Set(GLOBAL(lb_trunk)=3)
exten => _9X.,22,Dial(${vitel-outbound}/${EXTEN:1},,tTor)

exten => _9X.,30,Set(GLOBAL(lb_trunk)=0)
exten => _9X.,31,Goto(1)

09 February 2012

A2Billing Initial Set-up

This guide takes you through the initial stages of setting up A2Billing for production.

System Settings | Global Settings.

Set the base currency, manager settings timezones, and all the other settings which are appropriate to your installation. Note that if you change the currency, you also have to update the currencies under Billing | Currency List

Trunks

Create the trunks to the service provider in Asterisk, and confirm they work by configuring an extension in Asterisk and dialling out via the new trunk. Then tell A2Billing that the trunks exist and they can be used in the Providers | Trunks section.

Call-plans & Rate Tables

Create a call-plan and rate tables under rates. The relationship is that one customer has one call plan, which may have multiple rate tables (usually one per trunk) which in turn has multiple rates. Edit the call-plan and add the rate tables pertaining to that call-plan.

Rates

Create your rates and upload them into your rate tables, Note that the longest match of dial-code to dialed-digits is chosen first, and that a call cannot be made unless a rate exists for the destination.

Asterisk Dial-Plan

A VoIP dial-plan may look like...
[a2billing]
exten => _X.,1,NoOp(A2Billing Start)
exten => _X.,n,DeadAgi(a2billing.php,1)
exten => _X.,1,Hangup()
...whereas a calling card dial-plan may look like this: -
[a2billing-callingcard]
exten => _X.,1,NoOp(A2Billing Start)
exten => _X.,n,Answer()
exten => _X.,n,Wait(2)
exten => _X.,n,DeadAgi(a2billing.php,1)
exten => _X.,1,Hangup()
Note that with VoIP, the call is not usually answered, whereas with a calling card, it is, so you can play audio to the customer. A2Billing VoIP accounts will use the a2billing context by default, whereas you will have to configure your calling card access number to pass into the a2billing-callingcard context.

Agi-Conf

The “1” after “a2billing.php” in the above dial-plan examples refer to which agi-conf to use. The agi-conf under System Settings controls the call in progress and how the call is to behave, e.g. whether to read out the balance, prompt for the number to call, ask for PIN etc. The agi-conf is well commented, so set its parameters according to the way that you want to handle the call.

Create Customer and Test

Once you have defined your product using call-plans and rates, then you can create a new customer, and at the same time this, by default, creates new VoIP settings. You can now register a VoIP phone or test calling cards once you have added credit to the customer's account.