code: private final String extractPeerName(final String channelName)
      {
          // Find the start of the sequence number
          int channelNameEndPoint = channelName.lastIndexOf("-"); //$NON-NLS-1$
          if (channelNameEndPoint == -1)
          {
              channelNameEndPoint = channelName.length();
          }
          // return the peer name which is everything before the sequence number
          // (and its hypen).
          return channelName.substring(0, channelNameEndPoint);
      }
docs: /*
  Extracts the peer name from a full channel name. The channel name is
  created by asterisk and consists of the peer name a hypen and a unique
  sequence number. e.g. SIP/100-000000123 * For SIP channels the Peer name
  is of the form: SIP/100 For dahdi channels the channel name is of the
  form: DAHDI/i<span>/<number>[:<subaddress>]-0000000123 With the peer name
  of the form: DAHDI/i<span>/<number>[:<subaddress>]