Thanks for the info. I now have the phone systems switched.
The DID is working for both phone systems and the CID also.
The only problem I have now is that CDR records from the panasonic to
outside have a destination of "h" instead of the dialed number.
I originally started with an Asterisk@Home setup, then later disabled the
mySQL management because it was too limiting.
I believe that my problem is in the [macro-dialout-trunk] that comes with
the A@H install.
The log shows the dialing and dialed number, then when it bridges the call
to the other PRI, the dialed number is an "h".
refs:
extensions.conf:
[panasonic]
include => ext-local
include => outrt-002-fwd
exten => _.,1,Macro(dialout-trunk,1,${EXTEN},)
exten => _.,2,Macro(outisbusy) ; No available circuits
[macro-dialout-trunk]
exten => s,1,GotoIf($[foo${ARG3} = foo]?3:2)) ; arg3 is pattern password
exten => s,2,Authenticate(${ARG3})
exten => s,3,Macro(record-enable,${CALLERIDNUM},OUT)
exten => s,4,GotoIf($[foo${ECID${CALLERIDNUM}} = foo]?7) ;check for CID
override for exten
exten => s,5,SetCallerID(${ECID${CALLERIDNUM}})
exten => s,6,Goto(9)
exten => s,7,GotoIf($[foo${OUTCID_${ARG1}} = foo]?9) ;check for CID
override for trunk
exten => s,8,SetCallerID(${OUTCID_${ARG1}})
exten => s,9,SetGroup(OUT_${ARG1})
exten => s,10,CheckGroup(${OUTMAXCHANS_${ARG1}})
exten => s,11,SetVar(DIAL_NUMBER=${ARG2})
exten => s,12,SetVar(DIAL_TRUNK=${ARG1})
exten => s,13,AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial
string for this trunk
exten => s,14,SetVar(OUTNUM=${OUTPREFIX_${ARG1}}${DIAL_NUMBER}) ; OUTNUM is
the final dial number
exten => s,15,Cut(custom=OUT_${ARG1},:,1) ; Custom trunks are prefixed with
"AMP:"
exten => s,16,GotoIf($[${custom} = AMP]?19)
exten => s,17,Dial(${OUT_${ARG1}}/${OUTNUM}) ; Regular Trunk Dial
exten => s,18,Goto(s-${DIALSTATUS},1)
exten => s,19,Cut(pre_num=OUT_${ARG1},$,1)
exten => s,20,Cut(the_num=OUT_${ARG1},$,2) ; this is where we expect to
find string OUTNUM
exten => s,21,Cut(post_num=OUT_${ARG1},$,3)
exten => s,22,GotoIf($[${the_num} = OUTNUM]?23:24) ; if we didn't find
"OUTNUM", then skip to Dial
exten => s,23,SetVar(the_num=${OUTNUM}) ; replace "OUTNUM" with the
actual
number to dial
exten => s,24,Dial(${pre_num:4}${the_num}${post_num})
exten => s,25,Goto(s-${DIALSTATUS},1)
exten => s,111,Noop(max channels used up)
exten => s-BUSY,1,NoOp(Trunk is reporting BUSY)
exten => s-BUSY,2,Busy()
exten => s-BUSY,3,Wait(60)
exten => s-BUSY,4,NoOp()
exten => _s-.,1,NoOp(Dial failed due to ${DIALSTATUS})
log pieces:
Sep 18 11:45:11 VERBOSE[2223]: -- Executing Macro("Zap/47-1",
"dialout-trunk|1|181034xXxXx|") in new stack
Sep 18 11:45:11 DEBUG[2223]: Expression is '1'
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?3:2)") in
new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-dialout-trunk,s,3)
Sep 18 11:45:11 VERBOSE[2223]: -- Executing Macro("Zap/47-1",
"record-enable|24883xXxXx|OUT") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1", "0
> 0?2:4")
in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-record-enable,s,4)
Sep 18 11:45:11 DEBUG[2223]: Expression is '1'
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?5:8") in
new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Accepting call from '24883xXxXx' to
'181034xXxXx' on channel 0/23, span 2
Sep 18 11:45:11 DEBUG[2223]: Enabled echo cancellation on channel 47
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-record-enable,s,5)
Sep 18 11:45:11 VERBOSE[2223]: -- Executing DBget("Zap/47-1",
"RecEnable=RECORD-OUT/24883xXxXx") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- DBget: varname=RecEnable,
family=RECORD-OUT, key=24883xXxXx
Sep 18 11:45:11 DEBUG[2223]: Unable to find key '24883xXxXx' in family
'RECORD-OUT'
Sep 18 11:45:11 VERBOSE[2223]: -- DBget: Value not found in database.
Sep 18 11:45:11 VERBOSE[2223]: -- Executing SetVar("Zap/47-1",
"CALLFILENAME=OUT24883xXxXx-20050918-114511-1127058311.261") in new
stack
Sep 18 11:45:11 VERBOSE[2223]: -- Executing Goto("Zap/47-1",
"s|14") in new
stack
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-record-enable,s,14)
Sep 18 11:45:11 DEBUG[2223]: Expression is '0'
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"0?15:99") in
new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-record-enable,s,99)
Sep 18 11:45:11 VERBOSE[2223]: -- Executing NoOp("Zap/47-1", "NO
RECORDING
NEEDED") in new stack
Sep 18 11:45:11 DEBUG[2223]: Expression is '1'
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?7") in new
stack
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-dialout-trunk,s,7)
Sep 18 11:45:11 DEBUG[2223]: Expression is '1'
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?9") in new
stack
Sep 18 11:45:11 VERBOSE[2223]: -- Goto (macro-dialout-trunk,s,9)
Sep 18 11:45:11 VERBOSE[2223]: -- Executing SetGroup("Zap/47-1",
"OUT_1") in
new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Executing CheckGroup("Zap/47-1",
"") in
new stack
Sep 18 11:45:11 WARNING[2223]: CheckGroup requires an argument(max)
Sep 18 11:45:11 VERBOSE[2223]: -- Executing SetVar("Zap/47-1",
"DIAL_NUMBER=181034xXxXx") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Executing SetVar("Zap/47-1",
"DIAL_TRUNK=1") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Executing AGI("Zap/47-1",
"fixlocalprefix") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Launched AGI Script
/var/lib/asterisk/agi-bin/fixlocalprefix
Sep 18 11:45:11 VERBOSE[2223]: fixlocalprefix: Could not parse
/etc/asterisk/localprefixes.conf
Sep 18 11:45:11 VERBOSE[2223]: -- AGI Script fixlocalprefix completed,
returning 0
Sep 18 11:45:11 VERBOSE[2223]: -- Executing SetVar("Zap/47-1",
"OUTNUM=181034xXxXx") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Executing Cut("Zap/47-1",
"custom=OUT_1|:|1") in new stack
Sep 18 11:45:11 DEBUG[2223]: Expression is '0'
Sep 18 11:45:11 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"0?19") in
new stack
Sep 18 11:45:11 DEBUG[2223]: Not taking any branch
Sep 18 11:45:11 VERBOSE[2223]: -- Executing Dial("Zap/47-1",
"ZAP/g0/181034xXxXx") in new stack
Sep 18 11:45:11 VERBOSE[2223]: -- Called g0/181034xXxXx
Sep 18 11:45:13 DEBUG[2223]: Enabled echo cancellation on channel 1
Sep 18 11:45:13 VERBOSE[2223]: -- Zap/1-1 is ringing
Sep 18 11:45:23 DEBUG[2223]: Echo cancellation already on
Sep 18 11:45:23 DEBUG[2223]: Dropping duplicate answer!
Sep 18 11:45:23 VERBOSE[2223]: -- Zap/1-1 answered Zap/47-1
Sep 18 11:45:23 VERBOSE[2223]: -- Attempting native bridge of Zap/47-1 and
Zap/1-1
Sep 18 11:45:23 DEBUG[2223]: master: 47, slave: 1, nothingok: 0
Sep 18 11:45:23 DEBUG[2223]: Stoping tones on 47/0 talking to 1/0
Sep 18 11:45:23 DEBUG[2223]: Stoping tones on 1/0 talking to 47/0
Sep 18 11:45:23 DEBUG[2223]: disabled echo cancellation on channel 47
Sep 18 11:45:23 DEBUG[2223]: disabled echo cancellation on channel 1
Sep 18 11:45:23 DEBUG[2223]: Making 1 slave to master 47 at 0
Sep 18 11:45:23 DEBUG[2223]: Added 15 to conference 9/47
Sep 18 11:45:23 DEBUG[2223]: Added 61 to conference 9/1
Sep 18 11:45:23 DEBUG[2223]: Updated conferencing on 47, with 0 conference
users
Sep 18 11:45:23 DEBUG[2223]: Updated conferencing on 1, with 0 conference
users
Sep 18 11:45:35 VERBOSE[2223]: -- Channel 0/23, span 2 got hangup
Sep 18 11:45:35 DEBUG[2223]: Unlinking slave 1 from 47
Sep 18 11:45:35 DEBUG[2223]: Removed 15 from conference 9/47
Sep 18 11:45:35 DEBUG[2223]: Removed 61 from conference 9/1
Sep 18 11:45:35 DEBUG[2223]: Updated conferencing on 47, with 0 conference
users
Sep 18 11:45:35 DEBUG[2223]: Enabled echo cancellation on channel 47
Sep 18 11:45:35 DEBUG[2223]: Enabled echo cancellation on channel 1
Sep 18 11:45:35 DEBUG[2223]: Returning from native bridge, channels:
Zap/47-1, Zap/1-1
Sep 18 11:45:35 DEBUG[2223]: Set option AUDIO MODE, value: ON(1) on Zap/1-1
Sep 18 11:45:35 DEBUG[2223]: Hangup: channel: 1 index = 0, normal = 15,
callwait = -1, thirdcall = -1
Sep 18 11:45:35 DEBUG[2223]: Not yet hungup... Calling hangup once with
icause, and clearing call
Sep 18 11:45:35 DEBUG[2223]: disabled echo cancellation on channel 1
Sep 18 11:45:35 DEBUG[2223]: Set option TDD MODE, value: OFF(0) on Zap/1-1
Sep 18 11:45:35 DEBUG[2223]: Updated conferencing on 1, with 0 conference
users
Sep 18 11:45:35 DEBUG[2223]: Set option AUDIO MODE, value: OFF(0) on Zap/1-1
Sep 18 11:45:35 DEBUG[2223]: disabled echo cancellation on channel 1
Sep 18 11:45:35 VERBOSE[2223]: -- Hungup 'Zap/1-1'
Sep 18 11:45:35 DEBUG[2223]: Exiting with DIALSTATUS=ANSWER.
Sep 18 11:45:35 VERBOSE[2223]: == Spawn extension (macro-dialout-trunk, s,
17) exited non-zero on 'Zap/47-1' in macro 'dialout-trunk'
Sep 18 11:45:35 VERBOSE[2223]: == Spawn extension (panasonic, 181034xXxXx,
1) exited non-zero on 'Zap/47-1'
Sep 18 11:45:35 VERBOSE[2223]: -- Executing Macro("Zap/47-1",
"dialout-trunk|1|h|") in new stack
Sep 18 11:45:35 DEBUG[2223]: Expression is '1'
Sep 18 11:45:35 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?3:2)") in
new stack
Sep 18 11:45:35 VERBOSE[2223]: -- Goto (macro-dialout-trunk,s,3)
Sep 18 11:45:35 VERBOSE[2223]: -- Executing Macro("Zap/47-1",
"record-enable|24883xXxXx|OUT") in new stack
Sep 18 11:45:35 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1", "0
> 0?2:4")
in new stack
Sep 18 11:45:35 VERBOSE[2223]: -- Goto (macro-record-enable,s,4)
Sep 18 11:45:35 DEBUG[2223]: Extension s, priority 3 returned normally even
though call was hung up
Sep 18 11:45:35 DEBUG[2223]: Expression is '1'
Sep 18 11:45:35 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?7") in new
stack
Sep 18 11:45:35 VERBOSE[2223]: -- Goto (macro-dialout-trunk,s,7)
Sep 18 11:45:35 DEBUG[2223]: Expression is '1'
Sep 18 11:45:35 VERBOSE[2223]: -- Executing GotoIf("Zap/47-1",
"1?9") in new
stack
Sep 18 11:45:35 VERBOSE[2223]: -- Goto (macro-dialout-trunk,s,9)
Sep 18 11:45:35 VERBOSE[2223]: -- Executing SetGroup("Zap/47-1",
"OUT_1") in
new stack
Sep 18 11:45:35 VERBOSE[2223]: -- Executing CheckGroup("Zap/47-1",
"") in
new stack
Sep 18 11:45:35 WARNING[2223]: CheckGroup requires an argument(max)
Sep 18 11:45:35 VERBOSE[2223]: -- Executing SetVar("Zap/47-1",
"DIAL_NUMBER=h") in new stack
Sep 18 11:45:35 VERBOSE[2223]: -- Executing SetVar("Zap/47-1",
"DIAL_TRUNK=1") in new stack
Sep 18 11:45:35 VERBOSE[2223]: -- Executing AGI("Zap/47-1",
"fixlocalprefix") in new stack
Sep 18 11:45:35 WARNING[2223]: If you want to run AGI on hungup channels you
should use DeadAGI!
Sep 18 11:45:35 VERBOSE[2223]: -- Launched AGI Script
/var/lib/asterisk/agi-bin/fixlocalprefix
Sep 18 11:45:35 DEBUG[2223]: Zap/47-1 hungup
Sep 18 11:45:35 VERBOSE[2223]: == Spawn extension (macro-dialout-trunk, s,
13) exited non-zero on 'Zap/47-1' in macro 'dialout-trunk'
Sep 18 11:45:35 VERBOSE[2223]: == Spawn extension (panasonic, h, 1) exited
non-zero on 'Zap/47-1'
Sep 18 11:45:35 DEBUG[2223]: cdr_mysql: inserting a CDR record.
Sep 18 11:45:35 DEBUG[2223]: cdr_mysql: SQL command as follows: INSERT INTO
cdr
(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode)
VALUES ('2005-09-18
11:45:11','24883xXxXx','24883xXxXx','h','panasonic',
'Zap/47-1','Zap/1-1','AGI','fixlocalprefix',24,12,'ANSWERED',3,'I')
Sep 18 11:45:35 DEBUG[2223]: Set option AUDIO MODE, value: ON(1) on Zap/47-1
Sep 18 11:45:35 DEBUG[2223]: Hangup: channel: 47 index = 0, normal = 61,
callwait = -1, thirdcall = -1
Sep 18 11:45:35 DEBUG[2223]: Not yet hungup... Calling hangup once with
icause, and clearing call
Sep 18 11:45:35 DEBUG[2223]: disabled echo cancellation on channel 47
Sep 18 11:45:35 DEBUG[2223]: Set option TDD MODE, value: OFF(0) on Zap/47-1
Sep 18 11:45:35 DEBUG[2223]: Updated conferencing on 47, with 0 conference
users
Sep 18 11:45:35 DEBUG[2223]: Set option AUDIO MODE, value: OFF(0) on
Zap/47-1
Sep 18 11:45:35 DEBUG[2223]: disabled echo cancellation on channel 47
Sep 18 11:45:35 VERBOSE[2223]: -- Hungup 'Zap/47-1'
--
--
Steven
May you have the peace and freedom that come from abandoning all hope of
having a better past.
--- - --- - - - - - - - -- - - - --- - ------ -
- --- - - -- - - - -- - - -
"C F" <shmaltz@gmail.com> wrote in message
news:81000b5a050914150538a0c718@mail.gmail.com...
I'm not sure what you are trying to accomplish, but the following will
work if all you trying to do is have asterisk bridge the call between
the Telco and the Panasonic, and as far as the Panasonic is concerned
it should look as if coming from the Telco.
Plug the PRI from the telco into the first Digum T1 card.
Plug a crossover T1 from the Panasonic to the second Digium T1 card.
/etc/zaptel.conf
span=1,1,0,esf,b8zs
bchan=1-23
dchan=24
loadzone = us
span=2,0,0,esf,b8zs
bchan=25-47
dchan=48
loadzone=us
defaultzone=us
/etc/asterisk/zapata.conf
[trunkgroups]
[channels]
context=default
switchtype=national
priindication = outofband
signalling=pri_cpe
rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
callwaiting=no
usecallingpres=yes
callwaitingcallerid=no
threewaycalling=no
transfer=no
canpark=no
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
accountcode=I
musiconhold=default
channel => 1-23
context=panasonic
swichtype=national
priindication = outofband
signalling=pri_net
group=2
channel => 25-47
/etc/asterisk/extensiosn.conf
[default]
exten => _X.,1,Dial(Zap/g2/${EXTEN})
exten => s,1,Dial(Zap/g2)
[panasonic]
exten => _X.,1,Dial(Zap/g1/${EXTEN})
The above will allow you to just have asterisk sitting in between
doing nothing, besides for passing the calls from Telco to Panasonic.
If you are trying to test Asterisk this is a great way of doing it,
just remember to read the following:
http://www.voip-info.org/wiki-asterisk+config+extensions.conf+sorting
http://www.voip-info.org/tiki-index.php?page=crossover+T1+cable
On 9/14/05, Steven <asterisk@tescogroup.com>
wrote:> I currently have: Telco-PRI ---- Panasonic DBS576 PBX ---- E&M wink
> T1 ---- Asterisk.
> I have configured the Panasonic to forward my Asterisk DIDs to the
> Asterisk
> extensions over the T1.
> I do not get DID nor CID on the Asterisk, so I want to use PRI between the
> PBXs.
> I do not want to pay for another PRI card for the Panasonic. (T1 and PRI
> are
> different cards)
>
> I see this as my least expensive solution: Telco-PRI ---- Asterisk ----
> PRI ---- Panasonic DBS576 PBX.
> I have a second Digium T1/PRI card available.
>
> I am going to make the change after hours and know that I may have things
> to
> fiddle with after it is in use, but my biggest concern is getting my
> current
> Panasonic DIDs to come over from the Asterisk.
>
> I know that I can make a DID list pointing to the Panasonic extensions and
> assume that the dialplan will send the to the Panasonic. But I think this
> will be a dialed extension and not a DID call.
>
> But, I am assuming that there is another feature that can see the DID from
> the Telco and forward the call to the Panasonic as a DID call.
>
> I guess I am saying that I am not sure what the best option is.
>
> Please advise.
>
> PS. The Asterisk is still in testing phase and the people with Asterisk
> extensions know that they may not always have service, but when I make
> this
> change, the Panasonic MUST still be fully functional.
>
>
>
> --
> --
> Steven
>
> May you have the peace and freedom that come from abandoning all hope of
> having a better past.
> --- - --- - - - - - - - -- - - - --- - ------
> -
> - --- - - -- - - - -- - - -
>
>
>
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users