How do i route calls via many different VSPs?

Hi
I would really appreciate if someone could enlighten me as to how we could achive the following configuration and what hardware/software we will require.

Please have a look at the set-up i want below, i have tried to explain & illustrate it as best i can:

Scene 1

I need to have the ability to route outgoing calls (from clients) via many different voip services.
For example, we should be able to make rules such as the following:
Rule 1: All numbers starting with 011 dialled should be made using VoipProvider1 .
So, when any of our clients makes a call to an 011 number our system will connect the client to his dialed destination via VoipProvider1

Rule 2: All calls to the 012 should use VoipProvider2
So, when any of our clients makes a call starting with 012 code our system should connect the client to his dialed destination via VoipProvider2

And so on…
(see scene1.jpg)

Scene 2

Also, Is it possible to route pre-programmed codes to connect to a Skype (or ony other vsp’s) username?
For example:
When code: 12345 is dialed from any ip phone on our lan, it should create a skype connection and connect the caller with pre-programmed skype username

To make it clearer, if i had a friend in Dubai, his skype address is: myfriend_0012@skype.com
can i set the software to connect to myfriend_0012 over skype when i dial a code on my ip phone?

  • (scene2.jpg)

I can’t help you with Skype because we haven’t done that, but we do route calls to several different providers.

We use global declarations for our different providers so we can change the IP address in one spot (we provide hosted PBX to multiple customers). For example ${TOLLFREE} expands to the IP address of our toll free provider, etc.

All calls are then routed to one of our Cisco gateways where dial peers handle further call routing based on the number called.


; toll free
exten => _1800XXXXXXX,1,Set(CALLERID(all)=Your Company <5555555555>)
exten => _1800XXXXXXX,n,Dial(SIP/${EXTEN}@${TOLLFREE})
exten => _1888XXXXXXX,1,Set(CALLERID(all)=Your Company <5555555555>)
exten => _1888XXXXXXX,n,Dial(SIP/${EXTEN}@${TOLLFREE})
exten => _1866XXXXXXX,1,Set(CALLERID(all)=Your Company <5555555555>)
exten => _1866XXXXXXX,n,Dial(SIP/${EXTEN}@${TOLLFREE})
exten => _1877XXXXXXX,1,Set(CALLERID(all)=Your Company <5555555555>)
exten => _1877XXXXXXX,n,Dial(SIP/${EXTEN}@${TOLLFREE})
;
; operator services through verizon
exten => _0,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _0,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _0,n,Dial(SIP/${EXTEN}@${MCI-SIP})
exten => _0,n,Hangup()
;
; 311 services through verizon
exten => _311,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _311,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _311,n,Dial(SIP/${EXTEN}@${MCI-SIP})
exten => _311,n,Hangup()
;
; 411 services through verizon
exten => _411,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _411,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _411,n,Dial(SIP/${EXTEN}@${MCI-SIP})
exten => _411,n,Hangup()
;
; 1411 services through verizon
exten => _1411,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _1411,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _1411,n,Dial(SIP/${EXTEN:1}@${MCI-SIP})
exten => _1411,n,Hangup()
;
; 911 services through verizon
exten => _911,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _911,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _911,n,Dial(SIP/${EXTEN}@${MCI-SIP})
exten => _911,n,Hangup()
;
; local calls through Cisco 3662 - PRI
exten => _XXXXXXXXXX,1,Set(CALLERID(all)=Your Company <5555555555>)
exten => _XXXXXXXXXX,2,Dial(SIP/${EXTEN}@${MAX-3662})
;
; ld through verizon
exten => _1XXXXXXXXXX,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _1XXXXXXXXXX,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _1XXXXXXXXXX,n,Dial(SIP/${EXTEN:1}@${MCI-SIP},,r)
exten => _1XXXXXXXXXX,n,Hangup()
;
; send international via verizon
exten => _011.,1,Set(CALLERID(all)=Your Company <+15555555555>)
exten => _011.,n,SipAddHeader(P-Asserted-Identity: "Your Company" <sip:${CALLERID(num)}\@${MCI-SIP}\>)
exten => _011.,n,Dial(SIP/${EXTEN}@${MCI-SIP})
exten => _011.,n,Hangup()