Language & multi-devices

Hello,


Thanks to your help, I have nearly finalized integration into our own product line. I'll need to contact you offline for licensing.

However, I have a few more questions :
1) We are implementing multi-devices into our system by having different SIP peers for the same extension. For example, user 74 can be called through Local/74 which will in turn trigger a Dial on SIP/74&SIP/74-2&SIP/74-3 . Is that possible to have one button for all of these and have sort of an integrated status view ?

We have hints defined like this :
exten => 74,hint,SIP/74&SIP/74-2

I have tried different combinations of user definitions without success so far:
[SIP/74]
...
channel=SIP/74&SIP/74-2&/SIP/74-3

2) concerning user language, I would like to dynamically set user language without having the user change his personal preferences. Is there a way to achieve this ?
(ie either looking at the user asterisk language definition or any other tip)

Thank you,

Damien

Comments

  • Hi Damien,

    Try using:

    [SIP/74]
    type=extension
    label=John
    channel=SIP/74-2
    channel=SIP/74-3

    Even the & should work as far as I remember.

    For setting up preferences, look at the fop2settings.db that is created in /usr/local/fop2, open it up with sqlite3, you can manipulate individual preference for every user there.

    Best regards
  • Hello,

    It seems to work to monitor channels, but the problem is that the extension appears to be offline as soon as at least one of the extensions is offline (or as soon as [SIP/75] is offline if [SIP/75] is the leading extension).

    We use multi-devices for softphone support. The softphone is often disconnected.

    Damien
  • There is no way to determine what registration status is the primary, so the last received will win. In your case you will have to modify operator.css and remove the .notregistered calls or modify it to remove the alpha transparency. This way you will never know if a device is registered or not.
  • Hi,

    The hint as determined by exten => 74,hint,SIP/74&SIP/74-2 has the correct value.

    Is it possible for you, technically, to monitor extension status through this hint ?

    Our purpose is to integrate FOP2 (paid version) into our own product. So that is important for us.

    Thank you,

    Damien
  • Hi,

    Perhaps the ideal would be to add a hint= setting in buttons.cfg where the user could specify the hint to watch.

    Is that something you can do in a further release ?


    Damien
  • Not sure if it will work at all. Hints are not really AMI complain, they work for sip based subscriptions. FOP is not a sip softphone.

    Best regards,
  • Hi,

    Actually I checked our code and it is feasible.

    If you define this :
    hint => 75,hint,SIP/75&SIP/75-2
    in context ext-local-users

    then core show hints shows this :
    75@ext-local-users : SIP/75-2&SIP/75 State:Idle Watchers 1

    And when there is an incoming call, the AMI shows this event :
    Event: ExtensionStatus
    Privilege: call,all
    Exten: 75
    Context: ext-local-users
    Status: 8

    The only thing you have to change in your code is to add the ability to listen to that type of event.

    Would it be possible ?

    It is kind of mandatory if we want to go further with FOP2 in our solution :(


    thank you,

    Damien
  • Hi Damien,

    FOP and FOP2 track device/channels, not extensions.

    What you need is actually possible without using hints, but multiple channel entries in the config file. The only issue is with multiple and contradictory registry events.

    So, what you think is a simple change is not simple at all, and it does not add much value to the product either, as you can *already* do it using multiple channel entries.

    Best regards,
  • Hi,

    I understand what you mean.

    So, my only concern is when there are multiple channels : how can I consider the user as online if at least one of the channels is online ?

    I guess it is not possible and will never be but I need to find a solution.

    Damien
  • I have proposed the solution already: disregard the registration state as you will have contradictory information anyways. So, just show unregistered states the same as registered ones. (Note that registration is NOT A HINT). Registration status is something else.

    If you are monitoring 3 devices in one button, and you get 3 AMI events:

    REGISTERED
    UNREGISTERED
    UNREGISTERED

    The button will first show registered (solid) and then grayed out.

    But then again, if you are monitoring multiple devices in one button, then there is not much point on monitoring registration status, at least not on that panel, as it will not add much value at all, so remove the notregistered class and you will always see buttons in solid green.

    If you really want to track registration status as an admin, or whatever, then you can install a 2nd client with the original .css and another panel context where all buttons/devices shows individually.
  • Hi,

    I know I become annoying, but if I do this :
    [SIP/75&SIP/75-2]
    type=extension
    extension=75
    context=ext-everything
    label=DS
    mailbox=75@default
    extenvoicemail=855575@ext-everything-local
    channel=SIP/75&SIP/75-2

    then it works as expected except for one thing : click to call or dialing from the UI does not work anymore :

    [2011-04-12 18:22:29] WARNING[30004]: chan_sip.c:3178 create_addr: No such host: 75&SIP
    [2011-04-12 18:22:29] NOTICE[30004]: channel.c:3490 __ast_request_and_dial: Unable to request channel SIP/75&SIP/75-2

    some escaping required ?

    Damien
  • Hi,

    You are getting the idea wrong, the button should be:
    [SIP/75]
    type=extension
    extension=75
    context=ext-everything
    label=DS
    mailbox=75@default
    extenvoicemail=855575@ext-everything-local
    channel=SIP/75-2
    

    The above will monitor both SIP/75 and SIP/75-2, and will originate calls using SIP/75. If you do not know what device use to originate, you will have to use the dialplan to reach the real device, and use the originatechannel setting in the buttons config, like
    [SIP/75]
    type=extension
    extension=75
    context=ext-everything
    label=DS
    mailbox=75@default
    extenvoicemail=855575@ext-everything-local
    originatechannel=Local/75@some-originate-context
    channel=SIP/75-2
    


    Then, in your dialplan, some-originate-context you must Dial the devices that you want, for example (this is JUST an example, I do not know what is your configuration-purpose, nor your dialplan, etc). Perhaps you already have a standard extension macro that does this:
    [some-originate-context]
    exten => _XX,1,Dial(SIP/${EXTEN}&SIP/{EXTEN}-1,r,30)
    
  • Hi,

    Thanks for the originateCOntext tip.

    But is there a risk to use both channels between []'s ?

    It's the only way to get the correct status for us.
  • Hi,

    The [SIP/123123&SIP/98098080] is invalid. fop2 will probably monitor nothing in that regard. There is no risk, it is just like putting [MYHEAD/hurts-so-much] . So I do not know why it is the only way it works for you?? that seems pretty strange. You can also use [Local/exten@context] so that is used as origination, and add the real devices on channel entries...

    If you get any status out of the concatenated device it is a probably a mere coincidence. The "good" way is to do it using additinoal channel entires and let the main one between [].
Sign In or Register to comment.