Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

3cx 11 sp3 weird api forwarding error

Discussion in '3CX Phone System - General' started by peradise, Jan 10, 2013.

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

    Joined:
    Oct 5, 2012
    Messages:
    6
    Likes Received:
    0
    Hi all,

    we have written a small app that communicates through the api.

    You pass an extension number and a mobile phone number. It then changes the mobile number of that extension using :

    ex.SetProperty("MOBILENUMBER", Mobile_Number, PropertyType.String, "The mobile number specified for extension")

    Nothing fancy. This worked perfectly with the previous versions of 3cx 11. But now something strange happens. If the forwarding rules of the extension is set to "Send call to my mobile number" then the mobile number of the extension is changed correctly. But for all forwarding rules the forwarding is set to "An external number or Skype ID" and the OLD mobile number is set in it's field.

    See the attached pdf file with screenshots.

    Regards,

    Per
     
  2. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    It never worked the way you specified...
    It has worked the same as it is working now...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. peradise

    Joined:
    Oct 5, 2012
    Messages:
    6
    Likes Received:
    0
    Hi Sy,

    well that is the weirdest answer ever! Why would the pbx change the forwarding rule after i change the mobile number of an extension through the api??? And of course it worked good in the past, our customer has been using it for quite some time! The problems where there after upgrading to sp3. And why does this situation only happen if with forwarding rules that are set to "send to mobile"???

    Have you taken a good look to the screenshots? The api changes the mobile number correctly. But it changes the forwarding rule to the skype option and fills in the old (previous) mobile number.

    So i am sorry, but i really don't understand how you can tell me that it has worked always like this? Could you explain to me then what the idea is behind this functionalty? Why does the api change the forwarding rule to skype and add the old mobile number there?

    Regards,

    Per
     
  4. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Hi Per,
    You also provided weird information about "MOBILENUMBER", so we are 'quits' :)
    About API and how to use it:
    http://www.3cx.com/blog/docs/call-control-api/

    Check descriptions of:
    ExtensionRule

    User interface option "Forward call to My Mobile" is just a shortcut to
    "Forward call to external number or Skype ID" with value specified in "MOBILENUMBER" DNProperty.

    Regards
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. peradise

    Joined:
    Oct 5, 2012
    Messages:
    6
    Likes Received:
    0
    Goodmorning Sy,

    well we are even then ;-)

    But ok, i understand what you are saying. But that doesn't explain the behaviour it shows now. I use the api to set the mobile number. If i look in the logs i see that it says that the server has changed the extension (verbose log). It shows the same command 2 times every time. I guess the second instance in the log is for the changing of the value of the Skype / external id?

    But why does the extension show the correct mobile number in the field for the mobile number and a different one in the skypeid field? If the system works in the way you explained they should be the same? Shouldn't they?

    Regards,

    Per
     
  6. peradise

    Joined:
    Oct 5, 2012
    Messages:
    6
    Likes Received:
    0
    Sy???? Where did you go? ;)
     
  7. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    USER INTERFACE option "forward call to My Mobile" is the shortcut to the ExtensionRule where
    ExtensionRule.Destination.To == DestinationType.External
    and
    ExtensionRule.Destination.External == Extension.GetPropertyByName("MOBILENUMBER").Value

    1. If you select this option in user interface the UI saves rule with external number equal to the number specified in "MOBILENUMBER".
    2. If ExtensionRule forwards calls to an external number which is equal to current value in "MOBILENUMBER" - user interface shows it as "forward call to My Mobile"
    3. Modification of "MOBILENUMBER" DNProperty DOES NOT change destinations specified in ExtensionRule objects, so if you need to update them, you should update them manually.

    It is now and it was before.

    Regards
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.