Two telephony servers one carrier
Posted: Wed Oct 03, 2012 5:00 pm
No this is not some kind of bizarre video
This is the situation:
I'm trying to setup a telephony/web server at a remote office
that connects to my main server DB/web/telephony through a openvpn tunnel.
My goal is to have a secure connection between the two servers and use the main server to call the carrier with.
A call on the main site seams to be working, only thing I did there really was changing the ip adress to the tunnel-adress (yes I ran ADMIN_changer_server_ip.pl)
Here is a call to 0046701212121 done on the remote site: (Asterisk CLI)
this is the extension.conf edit:
extensions-vici.conf:
And in the agent ui a box pops up and tells me this when the call has connected:
and this in the CLI on the main site:
extensions-vicidial.conf:
I'ts kind of working, but I would like to hear your opinions,
is this the proper way to do it?
should I use any other method?
can I do something in my dial-plan?
Both servers installed with Vicibox 3.1.15
both revision r1859 (admin build 120831-1523)
This is the situation:
I'm trying to setup a telephony/web server at a remote office
that connects to my main server DB/web/telephony through a openvpn tunnel.
My goal is to have a secure connection between the two servers and use the main server to call the carrier with.
- Code: Select all
agent agent agent
\ l /
agent --\ [DB-data and IAX2-data] \l/
agent ----> asterisk/web ------[openvpn-tunnel]------> DB/asterisk/web------> carrier
agent --/ 10.0.8.2 10.0.8.1
A call on the main site seams to be working, only thing I did there really was changing the ip adress to the tunnel-adress (yes I ran ADMIN_changer_server_ip.pl)
Here is a call to 0046701212121 done on the remote site: (Asterisk CLI)
- Code: Select all
[Oct 3 23:13:10] -- Executing [90046701212121@default:1] Goto("Local/90046701212121@default-87c3,2", "vicidial-auto-external|010*000*008*001*90046701212121|1") in new stack
[Oct 3 23:13:10] -- Goto (vicidial-auto-external,010*000*008*001*90046701212121,1)
[Oct 3 23:13:10] -- Executing [010*000*008*001*90046701212121@vicidial-auto-external:1] Dial("Local/90046701212121@default-87c3,2", "IAX2/vicibox02:XXXXXXXXXX@10.0.8.1:4569/90046701212121|55|oT") in new stack
[Oct 3 23:13:10] -- Called vicibox02:XXXXXXXXXX@10.0.8.1:4569/90046701212121
[Oct 3 23:13:10] -- Call accepted by 10.0.8.1 (format ulaw)
[Oct 3 23:13:10] -- Format for call is ulaw
[Oct 3 23:13:10] -- IAX2/vicibox-3450 is ringing
[Oct 3 23:13:19] -- IAX2/vicibox-3450 stopped sounds
[Oct 3 23:13:19] -- IAX2/vicibox-3450 answered Local/90046701212121@default-87c3,2
[Oct 3 23:13:19] > Channel Local/90046701212121@default-87c3,1 was answered.
[Oct 3 23:13:19] -- Executing [8368@default:1] Playback("Local/90046701212121@default-87c3,1", "sip-silence") in new stack
[Oct 3 23:13:19] -- <Local/90046701212121@default-87c3,1> Playing 'sip-silence' (language 'en')
[Oct 3 23:13:19] WARNING[8855]: file.c:1297 waitstream_core: Unexpected control subclass '-1'
[Oct 3 23:13:19] WARNING[8855]: file.c:1297 waitstream_core: Unexpected control subclass '-1'
[Oct 3 23:13:19] -- Executing [h@vicidial-auto-external:1] DeadAGI("Local/90046701212121@default-87c3,2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----9-----0") in new stack
[Oct 3 23:13:19] -- Executing [8368@default:2] AGI("IAX2/vicibox-3450", "agi://127.0.0.1:4577/call_log") in new stack
[Oct 3 23:13:19] -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 3 23:13:19] -- Executing [8368@default:3] AGI("IAX2/vicibox-3450", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
[Oct 3 23:13:19] -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
[Oct 3 23:13:20] ERROR[8855]: utils.c:967 ast_carefulwrite: write() returned error: Broken pipe
[Oct 3 23:13:20] ERROR[8855]: utils.c:967 ast_carefulwrite: write() returned error: Broken pipe
[Oct 3 23:13:20] -- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
[Oct 3 23:13:20] -- Executing [010*000*008*002*8600052@default:1] Goto("IAX2/vicibox-3450", "default|8600052|1") in new stack
[Oct 3 23:13:20] -- Goto (default,8600052,1)
[Oct 3 23:13:20] -- Executing [8600052@default:1] MeetMe("IAX2/vicibox-3450", "8600052|F") in new stack
[Oct 3 23:13:21] -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----9-----0 completed, returning 0
[Oct 3 23:13:21] == Spawn extension (vicidial-auto-external, 010*000*008*001*90046701212121, 1) exited non-zero on 'Local/90046701212121@default-87c3,2'
[Oct 3 23:13:21] == Manager 'sendcron' logged off from 127.0.0.1
[Oct 3 23:14:02] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:02] Found
[Oct 3 23:14:02] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:02] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:02] Found
[Oct 3 23:14:02] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:02] == Manager 'sendcron' logged off from 127.0.0.1
[Oct 3 23:14:03] == Manager 'sendcron' logged off from 127.0.0.1
[Oct 3 23:14:06] == Spawn extension (default, 8600052, 1) exited non-zero on 'IAX2/vicibox-3450'
[Oct 3 23:14:06] -- Executing [h@default:1] DeadAGI("IAX2/vicibox-3450", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------") in new stack
[Oct 3 23:14:07] -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------- completed, returning 0
[Oct 3 23:14:07] -- Hungup 'IAX2/vicibox-3450'
[Oct 3 23:14:07] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:07] Found
[Oct 3 23:14:07] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:07] == Manager 'sendcron' logged off from 127.0.0.1
[Oct 3 23:14:08] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:08] Found
[Oct 3 23:14:08] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:08] -- Executing [58600052@default:1] MeetMe("Local/58600052@default-49a1,2", "8600052|Fmq") in new stack
[Oct 3 23:14:08] > Channel Local/58600052@default-49a1,1 was answered.
[Oct 3 23:14:08] -- Executing [8309@default:1] Answer("Local/58600052@default-49a1,1", "") in new stack
[Oct 3 23:14:08] -- Executing [8309@default:2] Monitor("Local/58600052@default-49a1,1", "wav|") in new stack
[Oct 3 23:14:08] -- Executing [8309@default:3] Wait("Local/58600052@default-49a1,1", "3600") in new stack
[Oct 3 23:14:10] == Manager 'sendcron' logged off from 127.0.0.1
this is the extension.conf edit:
- Code: Select all
[default]
exten => _90046ZXXXXX.,1,Goto(vicidial-auto-external,010*000*008*001*${EXTEN},1)
exten => _90046ZXXXXX.,2,Hangup
extensions-vici.conf:
- Code: Select all
TRUNKvicibox = IAX2/vicibox02:XXXXXXX@10.0.8.1:4569
[vicidial-auto-external]
; Local Server: 10.0.8.2
exten => _010*000*008*002*.,1,Goto(default,${EXTEN:16},1)
; Remote Server VDAD extens: vicibox 10.0.8.1
exten => _010*000*008*001*.,1,Dial(${TRUNKvicibox}/${EXTEN:16},55,oT)
And in the agent ui a box pops up and tells me this when the call has connected:
Incoming: 701 212 121
Group-
and this in the CLI on the main site:
- Code: Select all
[Oct 3 23:13:10] -- Accepting AUTHENTICATED call from 10.0.8.2:
> requested format = ulaw,
> requested prefs = (ulaw|gsm),
> actual format = ulaw,
> host prefs = (ulaw),
> priority = mine
[Oct 3 23:13:10] -- Executing [90046701212121@default:1] AGI("IAX2/vicibox02-2576", "agi://127.0.0.1:4577/call_log") in new stack
[Oct 3 23:13:10] -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 3 23:13:10] -- Executing [90046701212121@default:2] Dial("IAX2/vicibox02-2576", "SIP/tele2carrier/0046701212121||tTor") in new stack
[Oct 3 23:13:10] -- Called tele2carrier/0046701212121
[Oct 3 23:13:11] -- SIP/tele2carrier-0000000a is making progress passing it to IAX2/vicibox02-2576
[Oct 3 23:13:17] -- SIP/tele2carrier-0000000a is ringing
[Oct 3 23:13:19] -- SIP/tele2carrier-0000000a answered IAX2/vicibox02-2576
[Oct 3 23:14:02] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:02] Found
[Oct 3 23:14:02] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:02] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:02] Found
[Oct 3 23:14:02] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:02] == Manager 'sendcron' logged off from 127.0.0.1
[Oct 3 23:14:03] == Manager 'sendcron' logged off from 127.0.0.1
[Oct 3 23:14:06] -- Executing [h@default:1] DeadAGI("IAX2/vicibox02-2576", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----56-----47") in new stack
[Oct 3 23:14:06] WARNING[24073]: res_agi.c:2212 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
[Oct 3 23:14:06] -- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----56-----47 completed, returning 0
[Oct 3 23:14:06] == Spawn extension (default, 90046701212121, 2) exited non-zero on 'IAX2/vicibox02-2576'
[Oct 3 23:14:06] -- Hungup 'IAX2/vicibox02-2576'
[Oct 3 23:14:07] == Parsing '/etc/asterisk/manager.conf': [Oct 3 23:14:07] Found
[Oct 3 23:14:07] == Manager 'sendcron' logged on from 127.0.0.1
[Oct 3 23:14:07] == Manager 'sendcron' logged off from 127.0.0.1
extensions-vicidial.conf:
- Code: Select all
TRUNKvicibox02 = IAX2/vicibox:XXXXXXXXXXXXXXX@10.0.8.2:4569
TELE2SIPTRUNK = SIP/tele2carrier
; Local Server: 10.0.8.1
exten => _010*000*008*001*.,1,Goto(default,${EXTEN:16},1)
; Remote Server VDAD extens: vicibox02 10.0.8.2
exten => _010*000*008*002*.,1,Dial(${TRUNKvicibox02}/${EXTEN:16},55,oT)
; VICIDIAL Carrier: tele2 - tele2
; tele2 carrier to dial out
exten => _90046ZXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _90046ZXXXXX.,2,Dial(${TELE2SIPTRUNK}/${EXTEN:1},,tTor)
exten => _90046ZXXXXX.,3,Hangup
I'ts kind of working, but I would like to hear your opinions,
is this the proper way to do it?
should I use any other method?
can I do something in my dial-plan?
Both servers installed with Vicibox 3.1.15
both revision r1859 (admin build 120831-1523)