Assigning forwarding rules from C# API

Discussion in '3CX Phone System - General' started by ShMo, May 23, 2011.

Thread Status:
Not open for further replies.
  1. ShMo

    Joined:
    May 20, 2011
    Messages:
    2
    Likes Received:
    0
    Hello everyone,

    My first post, so I apologize if there is insufficient information.

    I am using the 3CX Phone system version 9. I have two laptops (Extensions 1050 and 1051) connected using the 3CX Soft phones (ver 5.0.14900.0). I have an intercom (Extension 1001), which always calls Extension 1050, when its call button is pressed.
    I am using a C# application to dynamically forward an incoming call from 1050 to 1051. I am using the examples from the "3CXCallControlAPI_v9/TestCSharp" application that I downloaded.

    I am able to assign a 'Forward all' forwarding rule to 1050 from my API. When I monitor the extensions, it lists the correct forwarding rule, as shown in the screenshot :
    [​IMG]

    But the incoming call is not forwarded. Heres the log :

    09:58:41.363 Currently active calls - 1: [18]
    09:58:32.660 Session 60311 of leg C:18.1 is confirmed
    09:58:32.566 [CM503007]: Call(18): Device joined: sip:1050@192.168.1.50:51273;rinstance=e3c721d04b0e9b61
    09:58:32.551 [CM503007]: Call(18): Device joined: sip:1001@192.168.1.2:5060
    09:58:32.551 [MS210003] C:18.1:Answer provided. Connection(transcoding mode[unsecure]):192.168.1.15:7052(7053)
    09:58:32.535 [MS210001] C:18.2:Answer received. RTP connection[unsecure]: 192.168.1.50:40004(40005)
    09:58:32.535 Remote SDP is set for legC:18.2
    09:58:32.441 [CM505001]: Ext.1050: Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [3CXPhone 5.0.14900.0] PBX contact: [sip:1050@192.168.1.15:5060]
    09:58:32.441 [CM503002]: Call(18): Alerting sip:1050@192.168.1.50:51273;rinstance=e3c721d04b0e9b61
    09:58:32.269 [CM503025]: Call(18): Calling Ext:Ext.1050@[Dev:sip:1050@192.168.1.50:51273;rinstance=e3c721d04b0e9b61]
    09:58:32.269 [MS210002] C:18.2:Offer provided. Connection(transcoding mode): 192.168.1.15:7054(7055)
    09:58:32.238 [CM503004]: Call(18): Route 1: Ext:Ext.1050@[Dev:sip:1050@192.168.1.50:51273;rinstance=e3c721d04b0e9b61]
    09:58:32.238 [CM503010]: Making route(s) to <sip:1050@192.168.1.15>
    09:58:32.238 [MS210000] C:18.1:Offer received. RTP connection: 192.168.1.2:10500(10501)
    09:58:32.238 Remote SDP is set for legC:18.1
    09:58:32.238 [CM505001]: Ext.1001: Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [Cyberdata Intercom v6.0.7] PBX contact: [sip:1001@192.168.1.15:5060]
    09:58:32.223 [CM503001]: Call(18): Incoming call from Ext.1001 to <sip:1050@192.168.1.15>

    Thanks
     
  2. davidbenwell

    davidbenwell Active Member

    Joined:
    Apr 27, 2010
    Messages:
    704
    Likes Received:
    0
    if all you are doing is forwarding calls from extension to extension, why not use the 3CX forwarding rules?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ShMo

    Joined:
    May 20, 2011
    Messages:
    2
    Likes Received:
    0
    The forwarding rules need to be changed dynamically based on a look up table I am reading from a PLC. The call could be forwarded to one of the ten available extensions, based on a set of rules.
    If I set the same rule manually in the 3CX Management console, it works fine.

    This is the image link : http://imageshack.us/photo/my-images/801/forwarding.jpg/
     
Thread Status:
Not open for further replies.