Two telephony servers one carrier

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Two telephony servers one carrier

Postby DomeDan » Wed Oct 03, 2012 5:00 pm

No this is not some kind of bizarre video :P

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- &nbsp;


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)
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Two telephony servers one carrier

Postby mcargile » Fri Oct 05, 2012 8:32 am

First off, I do not think this will work, mainly because the VPN tunnel is going to add considerable latency to the database connection. This will cause problems.

That said if you wish to continue down this path, you need to setup the two systems differently. First off you cannot use the cross server links that are in place. You will have to build your own. When you do on the main system put the context that the calls from the remote box as loopback-no-log. In loopback-no-log context put a dialplan entry that calls out through your carrier, but does not call the call_log agi script. On the remote system setup the carrier entry over to the main box just like you would any other carrier.

The problem with how you currently have the call flow setup is that you are not logging it on the remote box, and you are logging it on the main box. This is going to completely confuse Vicidial because the box initiating the call is not the one logging the call.
Michael Cargile | Director of Engineering | ViciDialGroup | http://www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 617
Joined: Tue Jan 16, 2007 9:38 am

Re: Two telephony servers one carrier

Postby DomeDan » Mon Oct 08, 2012 2:58 am

Yeah your right, It would probably not work,
just to get it working I white-listed the remote office ip-address and let the agents connect to my main server.
Now when they are working the server is walking on its knees, I need to separate the DB from the web/telephony to keep down the load.

And I don't what to go down the road with ugly hacks and get a non working system every time I want to update the vicidial system.

Thank you for your comment, It gave me more insight on the setup!
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Two telephony servers one carrier

Postby Michael_N » Mon Oct 08, 2012 5:42 am

Domedan

Maybe you should consider a cluster ?
And just let your remote office logon to the cluster.
Michael_N
 
Posts: 687
Joined: Wed Jul 05, 2006 3:13 pm
Location: sweden

Re: Two telephony servers one carrier

Postby DomeDan » Mon Oct 08, 2012 6:03 am

Yes, that's what I'm gonna do.
the setup will look like this when I'm done:
* HP DL360 G3 2x3.06GHz 2x76Gb 10k scsi raid1 web/telephony
* HP DL360 G3 2x3.06GHz 2x76Gb 10k scsi raid1 DB
* HP DL360 G3 1x2.80GHz 2x76Gb 10k scsi raid1 DB slave (just a simple replication)
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden


Return to Support

Who is online

Users browsing this forum: No registered users and 148 guests