Over the last week – in between New Years Eve and a sipsorcery.com crash – I’ve been doing some work on supporting SIP transfers aka REFER requests. I’ve been able to get transfers working between the Bria Softphone and Zoiper Communicator. I didn’t want to disrupt sipsorcery.com so soon after the recent outage so at the moment the update that supports transfers is only available on the sipwizard.net server. Transfers are supported on sipsorcery.com.

Only attended transfers are handled by the sipwizard server as it does not make sense for blind transfers to be processed by a signalling only SIP application server instead blind transfer requests are passed through to the user agent at the other end of the call to process as they see fit.
Both attended and blind transfers are supported. With blind transfers a dial string option can be used to determine whether to process the transfer on the sipsorcery server or to pass it through to the user agent on the other end of the call. Attended transfers are always processed on the server since the user agent on the other end of the call will not know anything about the dialogue being replaced.

There are some additional dial string options that can control the processing of REFER requests. One thing to be cautious of is blind transfers where a malicious called party could send a blind transfer to a premium rate number or such. There are different ways that could be handled: in theory user agents should ask for confirmation before accepting a blind transfer, apart from that I may change have changed the software so that blind transfers are disabled by default and only passed through if explicitly configured on a call by call basis. Of course premium number ranges could also be blocked within the dialplan but there would always be the possibility that a destination had been missed or some other attack was possible.

The new dial string parameter is tr (which stands for transfer). The values it can have are:

  • n for no transfers allowed in which case all REFER requests will be rejected. This is the default value and does not need to be set.
  • p for pass through in which case all blind transfer requests will be forwarded to the user agent on the other end of the dialogue. Attended transfers will still be processed on the sipwizard server.
  • c for place call. Attended transfers will be processed by server, blind transfers will intiate a new call on server and then do an attended transfer. For a blind transfer the Refer-To URI will be sent to a dialplan with a name of transfer, if it doesn’t exist the transfer will fail.

If anyone is using SIP transfers I’d be interested to know whether it works for them through sipwizard.net. I’m currently away from my Polycom and Cisco IP Phones and plan on doing some more testing with them next week.

# To explicitly block all transfer attempts. This is the default operation if there is no tr dial string option.
sys.Dial("1234@provider[tr=n]")

# To process blind transfers in a transfer dialplan.
sys.Dial("1234@provider[tr=c]")

# To pass through transfer requests to the user agent.
sys.Dial("aaron@local[tr=p]")
Advertisements