Asterisk URI - URL Dialing not working with FreePBX

Hi all. I finally decide to post something on URL or URI dialing with Asterisk.

I think that URI dialing is the near futur of telephony. I will try in the coming monthes to promote and developpe this for my country (France).

DNS is technically reliable and commercialy independant. This will be a good basis for a new mondial telecom system.

Enum and Dundi are good ideas, but they never will be widely and massively adopted because :

1: Dundi is too complex and mostly untested at a big scale. Users generaly don’t like the idea of the shared nature of such a database, for reliability and privacy reasons.

2: Enum can help to keep compatibility with the older digit dialplans in the world, but is not a solution for the futur.

The big advantages of URI DNS based dialing are :

  • it is easier to remember the phone numbers, because they are the same as email adresses

  • VOIP operators becomes obsoletes. We don’t need them with URI dialing, as the users IP database is managed by DNS instead of telecom operators.

According to me this is a big improvement for every users, as they don’t need to pay for a telcom operator. With URI dialed VOIP we need only a good Internet Acces. No more.

The problem is that Freepbx don’t support URI dialing. I tried a couple of trick in the dialplan to get it to work, but it does cause problems. For example the conferences stop to work when enabling URI dialing.

Would it be complicated, for you Asterisk specialists, to implement a rock solid URI dialing compatible with the freepbx dialplan and applications ?

According to the small knowledge i have from the dialplan programming capabilities it should be possible ?

I propose two things for Freepbx :

  • The possibility to define a phonebook with URI phone numbers, so that we can dial those URI from non enabled phones through short numbers.

  • The possibility to Dial URI directly from the phone or softphone, like it is possible with Grandstream, Cisco, other phones, X-lite softphone…

For a mondial success with URI dialing, we need a simple to use solution. Freepbx, Trixbox and Asterisk are the key of success.

Thanks for your listening.

OK so are you speaking of this, cuz as I said it works.
(for those who wish to use it)

P2P SIP dialing

Yes i tried this for outbound URI calls. It is partially working.

If you add this in the freepbx dialplan :

exten => _[a-z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})
exten => _[A-Z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})
exten => _X.,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})

Next make sure you add the macro into the extensions.conf in the area where you have your other macros defined:

exten => s,1,NoOp(Calling remote SIP peer ${ARG1})
exten => s,n,Dial(SIP/${ARG1},120,tr)
exten => s,n,Congestion()

Then nothing work.

You will as least need to modify like this :

exten => _[a-z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})
exten => _[A-Z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})

or simpler :

exten => _[a-zA-Z].,1,Macro(uridial,${EXTEN}@${SIPDOMAIN})

But in this case if the URI begin with a digit, it does not work.
There is a bit more programming work to do to recognize correctly the URI.

More, and more importantly, as soon as you put this in the Freepbx dialplan, then the conferencing will stop to work. I suppose that if conferencing stop to work, we could have other problems i didn’t saw neither.

There is clearly debug and integration work to be able to make URI dials in the FreePBX dialplan.

This seems simple to do at the beginning, but needs the intervention of a dialplan expert to really work correctly and without causing any problems with other dialplan functions.

I hope to see somebody proposing a working dialplan modification for transparent URI dialing with FreePBX.

For sure it is possible and not really complex, but need to be seriously done and tested by a dialplan expert.

Yes you are right.

I’m using inbound calls uri dialing this way.

But for outboud calls, what you describe is a target domain URI dialing.

In this case the user agent contact directly the target domain, bypassing the local SIP proxy. (i know asterisk is not realy a proxy but i use this word for simplicity).

Bypassing asterisk for outbound calls means that there is no way to control the call. All the local asterisk server services are unusable in this case.

I think mainly to call recording, call control (for example some extensions cannot dial some domains), and CDR call reports.

Another problem with target domain URI dialing is the necessity to open traffic for IP adresse and ports of each user agent in need of URI dialing. This is a safety issue as some softphones could be installed on an untrusted windows machine, eventually infected with unknow trojans.

Another big improvement we could have with domain URI dialing (domain URI dialing is when the local domain SIP proxy dial the URI himself) is that we can ask asterisk to make DNS SRV records lockup. This is fine because SRV lockups are most of the times buggy on user agents.

Last, and certainly the most interesting application, we could have an aapplication on asterisk to retrieve the extension list of the target domain company (through DNS text records) and annonce it to the calling party in an IVR, giving the possibility to dial the right extension when we don’t know yet wich extensions are available in this company.

Some standardisation works has ever been done with DNS Text records for this application. I have it somewhere and can give a copy if necessary. This should be seriously considered for proposal for a new RFC.

I think that using DNS text records for company extension list would be a serious improvment for the telephony world.

The telecom world was a slow and protected world. Let’s go ahead and let’s use efficient and reliable technologies to improve it. There is only a couple of dialplan modifications and or some small applications to write in asterisk and freepbx to allow for this.

DNS is a good technology and should be used intelligently for the IP telecom world.

Using DNS for VOIP means that Telecom Operators will disappear progressively, or more precisely they will be able to concentrate on their new work : the management of QOS for the IP public network.

Sorry for this aside conversation, but i think it is an important think to share with the freepbx community, and more generaly with the all the people building the VOIP futur.

OK if I want to use URL dailing with SJPhone
My Asterisk does not come into play
Now If I go to my box and I set up a exten 9000 and in the dial box
I put in sip/[email protected]

Assuming I had a with exten 1234 and assuming I allowed UNKNOWN sip call (context to allow inbound)

If i dail 9000 then sip/[email protected] rings.

If I set up a inbound route for DID 1234 to go to the ivr then all calls for 1234 hit the IRV.

So is this not URL dialing and freepbx work together??

OH yea and you can use URL dial to go into a conference no problem.