Skip to main content

15. - SIP and the PSTN

  • Basic SIP to PSTN example
  • SIP Messages used in SIP to PSTN call
  • Other SIP to PSTN Codes
  • SIP and Early Media
  • Early Offer / Delayed Offer
  • SIP Gateways
  • TRIP
  • SIP-T and PSTN Bridging
  • ISUP to SIP Code Message Mapping
  • More on SIP addressing
  • DTMF and SIP
  • image.png

Here our SIP phone dial the number of a PSTN device, the proxy will send the invite onto the SIP/PSTN Gateway that will next sent the proper setup message to the PSTN switch then to the telephone.

A PRACK 183 inform the SIP phone of the progress of the call setup and setup an Early Media (RTP)

Once the PSTN phone start ringing the alerting 180 Ringing messages are sent back to our SIP phone along with the 200 OK

Our SIP phone will response with an ACK then the media will start to flow, it is up to the SIP/PSTN gateway to convert the media from RTP to TDM and viceversa

image.png

In more detail 01216896815, the SIP proxy uses the location services and determines the number is on the PSTN it then passes the invite to the SIP/PSTN Gateway which thenn by the PSTN Switch goes to Grahams phone. The detail on the next image shows the INVITE along with the contact details and SDP information

image.png

Some other sample SIP Codes re: SIP to PSTN call setup attemps are 

  • 404 Not Found : The number called is unallocated
  • 407 Proxy authenticarion Req : Call Rejected
  • 480 Temporary Unavailable : No User Response
  • 486 Busy Here : Called Party is Busy
  • 502 Bad Gateway : Network out of order
  • 600 Busy Everywhere : Useer Busy
  • 603 Decline : Call Rejected
  • 604 Does not exist anywhere : Unallocated number

Here is an example of a PSTN to SIP Call Flow

image.png

 

Early Media

To overcome a few problems that arise due to the two different systems such as SIP and the PSTN trying to work together, a concept called 'Early Media' has been introduced

Early media is not required on standard PSTN calls as when a number is dialed a media channel is established so that the caller can hear the ringing tone of the remote device, This also gives companies the opportunity to replace ringing media with corporate messages or other instructions for the caller before they get to speak to a real person.

Clipping is a problem where if a person using a PSTN phone answer their phoene adn starts talking straight away without Early Media the SIP phone that is calling them will miss the first part of the conversation as it hasn't yet received a 200 ok message to enable it to setup the RTP media path.

Early media also allows Busy Tone and other announcements to be played to the caller even though the called phone has not been picked up.

 

image.png

 
Early Offer / Delayed Offer

With Early offer the invite sends the SDP to being voice inmediately 

image.png

 

With delayed  offer Invite goes without SDP allowing the other end select a codec to use, if available it will reply with an ACK SDP to begin media.

image.png