Hi I try register DN from source code as below but my softphone not register
private void button1_Click(object sender, EventArgs e)
{
//Login
try
{
LoginButton.Enabled = false;
RequestRegisterAddress requestRegisterAddress =
RequestRegisterAddress.Create(
thisDn,
RegisterMode.ModeShare,
ControlMode.RegisterDefault,
AddressType.DN);
int uniqueId = GenerateUniqueId();
requestRegisterAddress.ReferenceID = uniqueId;
requestRegisterAddress.Extensions = new KeyValueCollection();
//requestRegisterAddress.Extensions["CPNDigits"] = "2503";
requestRegisterAddress.Extensions["CPNDigits"] = "761001";
mProtocolManager[tServerName].Send(requestRegisterAddress);
RequestHash.Add(uniqueId, "RequestRegisterAddress");
LogoutButton.Enabled = true;
MessageBox.Show("Login complete ");
}
catch (ProtocolException protocolException)
{
MessageBox.Show("Protocol Exception!\n" + protocolException);
}
}
---------------------------------------------------------------------------------------------------
TServer Log
@12/26/10@20:30:42.936 **** PBX::SystemStatus ****
12/26/10@20:30:42.952 link (link-tcp) S->H: System status request (id=899 [2]) from PBX (0[0 / 0] requests pending)
20:30:55.139 Trc 04521 New client 368 connected from '192.168.0.9'
20:30:55.139 {connection {accepted} {socket 368} {remote-host 192.168.0.9} {remote-port 2811} {listener {port-id default} {socket 336}}}
20:30:55.264 Trc 04541 RequestRegisterClient received from [368]
message RequestRegisterClient
AttributeApplicationPassword ''
AttributeApplicationName 'test'
AttributeSessionID 0
AttributeProtocolVersion 'tserver protocol 4.2'
20:30:55.264 Trc 04522 Client [368] authorized, name 'test', id=00000004
12/26/10@20:30:55.264 +++ RqHandler::RequestRegisterClient +++
got message from client <4>
@20:30:55.2640 [0] 7.6.002.00 send_to_client: message EventLinkConnected
AttributeApplicationName 'Tserver'
AttributeSessionID 7995395
AttributeUserData [2] 00 00..
AttributeRegistrationCode 0
AttributeEventSequenceNumber 0000000000000034
AttributeServerStartTime 4d16d114000a3d18 (12:22:28.671000)
AttributeTimeinuSecs 264000
AttributeTimeinSecs 1293370255 (20:30:55)
20:30:55.264 Trc 04542 EventLinkConnected sent to [368] (00000004 test 192.168.0.9:2811)
--- RqHandler::RequestRegisterClient ---
20:31:04.499 Trc 04541 RequestRegisterAddress received from [368] (00000004 test 192.168.0.9:2811)
message RequestRegisterAddress
AttributeExtensions [22] 00 01 00 00..
'CPNDigits' '761001'
AttributeReferenceID 2
AttributeAddressType 1 (DN)
AttributeControlMode 0
AttributeRegisterMode 0
AttributeThisDN '765001'
@20:31:04.4990 [ISCC] Client location test:00000004@ added
20:31:04.499 Trc 20006 Number of seat licenses in use 3 out of 9999 available
(tservice_proc) AddressType changed to 2 for 765001 based on CME
(tservice_proc) ControlMode set to 1 for 765001
12/26/10@20:31:04.499 +++ RqHandler::RequestRegisterAddress +++
got message from client <4>
device <765001> cannot be monitored - could be a real agent
@20:31:04.4990 [0] 7.6.002.00 send_to_client: message EventError
(Bad DN type for DN registration)
AttributeEventSequenceNumber 0000000000000035
AttributeTimeinuSecs 499000
AttributeTimeinSecs 1293370264 (20:31:04)
AttributeErrorMessage 'Bad DN type for DN registration'
AttributeErrorCode 128
AttributeUserEvent RequestRegisterAddress
AttributeClientID 4
AttributeControlMode 1
AttributeAddressType 2 (Position)
AttributeExtensions [22] 00 01 00 00..
'CPNDigits' '761001'
AttributeReferenceID 2
AttributeRegisterMode 0
AttributeThisDN '765001'
20:31:04.499 Int 04545 Interaction message "EventError" sent to 368 ("test")
20:31:04.499 Trc 04542 EventError sent to [368] (00000004 test 192.168.0.9:2811)
--- RqHandler::RequestRegisterAddress ---
@12/26/10@20:31:13.030 **** PBX::SystemStatus ****
link (link-tcp) S->H: System status request (id=89b [2]) from PBX (0[0 / 0] requests pending)