[pjsip] UPnP

Alan J. Bond alan.bond at wintology.com
Tue May 20 22:49:29 EDT 2008


Hi Benny,



> But what is interesting to discuss is what uPnP can do that

> ICE/STUN/TURN combo cannot. I'm clueless about uPnP but somehow I feel

> that it doesn't add much more, if at all. I mean, even when uPnP is

> turn on by factory default and everyone has it, all (home) routers by

> default will not block VoIP traffic anyway, so what's the incentive on

> supporting it.



I guess ease of use, simplicity and reliability.  Freedom from having to configure multiple UAs on the same platform to use different ports for SIP/RTP, for example.  Might not seem important but what about co-operative SIP UAs like a generic TAPI driver or browser click-to-dial add-in designed to work in conjunction with a softphone on the same box?  ICE, etc. isn't designed to handle any of that.  UPnP is more than just NAT traversal.



Here's the basic idea - a simple SOAP transaction asking a UPnP NAT router for a port mapping ...



Content-Type: text/xml; charset="utf-8"

Host: 192.168.1.1:80

SOAPAction: "urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"

Content-Length: 648

<?xml version="1.0" encoding="utf-8"?>

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

  <s:Body>

    <u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">

      <NewRemoteHost></NewRemoteHost>

      <NewExternalPort>5190</NewExternalPort>

      <NewProtocol>UDP</NewProtocol>

      <NewInternalPort>5190</NewInternalPort>

      <NewInternalClient>192.168.1.100</NewInternalClient>

      <NewEnabled>1</NewEnabled>

      <NewPortMappingDescription>My New Port Mapping</NewPortMappingDescription>

      <NewLeaseDuration>0</NewLeaseDuration>

    </u:AddPortMapping>

  </s:Body>

</s:Envelope>'



It's pretty simple, OK so you have to discover the router in the first place but that's not difficult either.  An easy way to appreciate what it would take to support UPnP from a client perspective is here:



      http://www.sbbi.net/site/upnp/index.html.



No idea what the code is like (haven't looked) but there are some useful links on here and it should save you having to wade through all the device centric conceptual treacle on upnp.org.  The key standards doc for interacting with home UPnP DSL routers is UPnP_IGD_1.0.pdf in this ZIP:



      http://www.upnp.org/standardizeddcps/documents/UPnP_IGD_1.0.zip



Many up market VoIP phones, etc. now include UPnP (e.g. snom, polycom) as a matter of course.  As you say, would be a nice to have in PJSIP too :-)



Hope this is of use anyway.



Regards,

Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080521/e512477e/attachment.html>


More information about the pjsip mailing list