Configuring DDI’s on WxC DVX trunks with Asterisk / trixbox

By Steve Biddle, in , posted: 25-Mar-2010 10:18

I've been a user of WxC's VFX VoIP service for a number of years now and believe they offer New Zealand's best VoIP platform for both residential and business users.

WxC offer two VoIP products in the marketplace - a residential VoIP offering called VFX and a business offering called DVX. DVX is a true SIP trunking service and offers features such as multiple inbound DDI numbers that are not available using the VFX service. I've configured VFX on numerous Asterisk systems and DVX on numerous Epygi Quadro PBX's but had never configured a DVX trunk on an Asterisk based system until I sat down last week to test a configuration.

If you're configuring multiple phone numbers with a SIP based system the easiest way is to create an individual SIP registration for each line. This defeats the purpose of a SIP trunk however and doesn't deliver a truly scalable solution - if you had 200 DDI numbers for example you would require 200 SIP registrations which is a lot of unnecessary SIP traffic. A true SIP trunking product such as the Broadsoft solution WxC offer can handle all these DDI's through a single parent registration however Asterisk needs a few tweaks to be able to handle these DDI numbers correctly.

My understanding is that people who have deployed DVX in the past have manually added additional registration lines to their sip.conf or sip_custom.conf files to forward these DDI numbers to the correct inbound route. I decided to look at a much easier way to do this that avoids requiring multiple SIP registrations and after a few minutes work came up with a new custom context that can be used as your inbound trunk in your DVX settings.

 

By default Asterisk can't see the DDI number - it processes it's inbound route thinking the originating number is the parent registration

 

Executing [91234560@from-trunk-dvx:1]

 

This context looks at the inbound SIP URI and extracts the DDI from the To: header and then passes this through to the regular from-trunk context that is used for inbound calls.

 

SIP/SPgtXt7P1OlxZDN9ao-b7c33798", "DVXDDI="User1 3bitdemo" <sip:91234561@as.wxcnz.net;rinstance=4baa739e26af491b

 

It can now pass this to the from-trunk context using the number 91234561 rather than 91234560

 

To configure this you you need to manually edit extensions_custom.conf and add the following

[from-trunk-dvx]
exten => _.,1,Noop(Extract DVX DDI/DID info from SIP URI header. By Steve Biddle stevenbiddle@gmail.com)
exten => _.,n,Noop(NoOp(SIP_HEADER : ${SIP_HEADER})
exten => _.,n,Set(DVXDDI=${SIP_HEADER(To)})
exten => _.,n,Set(DVXDDI=${CUT(DVXDDI,@,1)})
exten => _.,n,Set(DVXDDINAME=${CUT(DVXDDI,",1)})
exten => _.,n,Set(DVXDDI=${CUT(DVXDDI,:,2)})
exten => _.,n,Goto(from-trunk,${DVXDDI},1)

 

In your sip.conf or FreePBX web interface change the context=from-trunk to context=from-trunk-dvx

You can now configure these inbound routes using the DDI number and set the extension you require these to go to. This now results in a single SIP parent registration rather than multiple registrations for each DDI number.

 

And now a plug from me..If anybody is interested in assistance or support with Asterisk based systems or wanting help in deploying an Asterisk based PBX feel free to contact me!

Other related posts:
Sangoma Roadshow heads to New Zealand in September
Obihai OBi 200 Analogue Telephone Adapter (ATA) Review
Raspberry Pi – the ultimate home Asterisk PBX.






comments powered by Disqus

sbiddle's profile

Steve Biddle
Wellington
New Zealand


I'm an engineer who loves building solutions to solve problems.


I also love sharing my views and analysis of the tech world on this blog, along with the odd story about aviation and the travel industry.

My interests and skillset include:

*VoIP (Voice over IP). I work with various brands of hardware and PBX's on a daily basis
  -Asterisk (incl PiaF, FreePBX, Elastix)
  -Polycom
  -Cisco
  -Linksys
  -Patton
  -Zyxel
  -Snom
  -Sangoma
  -Audiocodes

*Telecommunications/Broadband
  -xDSL deployments
  -WiMAX
  -GSM/WCDMA
  -WiFi

*Structured cabling
  -Home/office cabling
  -Phone & Data

*Computer networking
  -Mikrotik hardware
  -WAN/LAN solutions

*Wireless solutions
  -Motel/Hotel hotspot deployments
  -Outdoor wireless deployments, both small and large scale
  -Temporary wireless deployments
   
*CCTV solutions
  -Analogue and IP

I'm an #avgeek who loves to travel the world (preferably in seat 1A) and stay in nice hotels.


+My views do no represent my employer. I'm sure they'll be happy to give their own if you ask them.


You can contact me here or by email at stevenbiddle@gmail.com

twitter.com/stevebiddle