[Standards] Jingle PSTN sessions

Stephen Paul Weber singpolyma at singpolyma.net
Sat Jan 21 19:59:04 UTC 2017


I'd like to get feedback on a crazy proposal I've been batting around.  Many 
times an XMPP client or other JID is in a context where it has some access 
to PSTN (either because the client is on a cell phone, or it has access to a 
VoiP bridge, or it *is* a VoiP gateway of some kind).  Jingle could be used 
to initiate a voice session whose peer-to-peer component is routed entirely 
over PSTN in these cases.  For example, romeo at montague.lit wants to talk to 
juliet at capulet.lit and indicates that one option for contact is to call 
+15557254545

<iq from='romeo at montague.lit/orchard'
    id='ph37a419'
    to='juliet at capulet.lit/balcony'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:1'
	  action='session-initiate'
	  initiator='romeo at montague.lit/orchard'
	  sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:pstn:1' />
      <transport xmlns='urn:xmpp:jingle:transports:pstn:1'>
	<candidate id='el0747fg11'
		   tel='+15557254545' />
      </transport>
    </content>
  </jingle>
</iq>

ACK:

<iq from='juliet at capulet.lit/balcony'
    id='ph37a419'
    to='romeo at montague.lit/orchard'
    type='result'/>

juliet at capulet.lit accepts the session, and indicates that other options 
include calling +15557253232 with callerid set to +15557772222 or calling 
+15558881234 and then adding the DTMF string *714:

<iq from='juliet at capulet.lit/balcony'
    id='jd82f517'
    to='romeo at montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:1'
	  action='session-accept'
	  responder='juliet at capulet.lit/balcony'
	  sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:pstn:1' media='audio' />
      <transport xmlns='urn:xmpp:jingle:transports:pstn:1'>
	<candidate id='el0747fg11'
		   tel='+15557253232'
		   callerid='+15557772222' />
	<candidate id='el0747fg11'
		   tel='+15558881234'
		   dtmf='*714' />
      </transport>
    </content>
  </jingle>
</iq>

ACK:

<iq from='romeo at montague.lit/orchard'
    id='jd82f517'
    to='juliet at capulet.lit/balcony'
    type='result'/>

romeo at montague.lit selects a mechanism (this part is maybe tricky in some 
cases: since some selections will cost one party more money and others the 
other party more money -- I guess still just using priority numbers?  I 
mean, if you offered a candidate clearly you're ok with it being used.) and 
lets juliet at capulet.lit know:

<iq from='romeo at montague.lit/orchard'
    id='pd81b49s'
    to='juliet at capulet.lit/balcony'
    type='set'>
 <jingle xmlns='urn:xmpp:jingle:1'
	 action='transport-info'
	 initiator='romeo at montague.lit/orchard'
	 sid='a73sjjvkla37jfea'>
   <content creator='initiator' name='audio'>
     <transport xmlns='urn:xmpp:jingle:transports:pstn:1'>
	<candidate id='el0747fg11'
		   tel='+15558881234'
		   dtmf='*714' />
     </transport>
   </content>
 </jingle>
</iq>

ACK:

<iq from='juliet at capulet.lit/balcony'
    id='pd81b49s'
    to='romeo at montague.lit/orchard'
    type='result'/>

And then romeo at montague.lit uses whatever PSTN connection it has available 
to call +15558881234,*714.  Once the PSTN session has ended (because Juliet 
hung up, or similar) the session is over:

<iq to='romeo at montague.lit/orchard'
    id='bv81gs75'
    from='juliet at capulet.lit/balcony'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:1'
	  action='session-terminate'
	  sid='a73sjjvkla37jfea'>
    <reason>
      <success/>
    </reason>
  </jingle>
</iq>

ACK:

<iq to='juliet at capulet.lit/balcony'
    id='bv81gs75'
    from='romeo at montague.lit/orchard'
    type='result'/>

Hopefully the above is clear enough to discuss.  My main use case is a PSTN 
Gateway which could, on receiving an inbound call, be told by the XMPP 
client to forward the call over PSTN to a receiving number (either with 
upstream caller id or rewriting caller id, depending on application).  
However, I could see something like this being used to enable XMPP contacts 
to call each other over PSTN directly (without advertising a permanent 
telephone number in vCard, but instead giving out numbers on a case-by-case 
call-establishment basis), or many other cases.

-- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph


More information about the Standards mailing list