Friday, May 12, 2006

Further on phone number addresses

In my previous post, I made a case for using on URIs to represent phone numbers in the XMPP realm. I came across an additional usage example while discussing the usage of the Jingle transport JEP for IAX, the Asterisk protocol.

The current version of the standard again only addresses a client based P2P session negotiation. In real life, a client application would greatly benefit from having the capacity to include in the transport negotiation candidates an IAX addresses as well as a phone number. Doing so would allow a graceful degradation in the way the communication can be established.

If I am using my IAX Jingle client as a soft phone, the Asterisk PBX administrator has already programmed my extension to reach my client, and has also made the necessary adjustment for direct inward dialing number to map to the same extension. In this context, when negotiating an IAX transport I would simple have to pass four candidate addresses to reach me. In order of priority:

1 – My private LAN IP address
2 – My public Internet address from a STUN server,
3 – My Asterisk extension number expressed as an URI,
4 – My DID PSTN phone number expressed as an URI.

To illustrate this negotiation, my Jingle client will use a stanza similar to:

<iq to='romeo@montague.net/orchard'
     from='juliet@capulet.com/balcony'
     id='jingle1'
     type='set'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
         action='transport-accept'
         initiator='juliet@capulet.com/balcony'
         sid='a73sjjvkla37jfea'>
     <transport xmlns='http://jabber.org/protocol/jingle/transport/iax'
         version='2'
         secure='aes128'> 
       <candidate name='local'
ip='192.168.0.100' port='20333'/>
       <candidate name='public'
ip='212.10.25.100' port='9823'/>
       <candidate name='pbx'
uri='iax2:pbx.montague.net/5555'/>
       <candidate name='pstn'
uri='tel:6467895555'/>
     </transport>
   </jingle>
</iq>

In this scenario the remote party client will try the various candidates in order, and choose appropriately. If the other party is on the same LAN, or on the Internet, the communication will take place in direct P2P mode. If a direct connection cannot be established, then the PBX extension will be tried next. And final, the remote party will have to try using the PSTN. Of course that wont be the cheapest option. The XML snippet illustrate another context where to use URIs to represent phone numbers.

Technorati Tags: , , , , , , , , , ,

Labels:

Links to this post:

Create a Link

<< Home