After talking to you about this, I just took a look. No its not based on registered users, but authed users will probably more reliably set the right variables to figure out the right user to match to.  Trick is to have the vars set to be able to look them up.

    username[0] = switch_event_get_header(event, "Caller-Username");                                                                                            
    domain[0] = switch_event_get_header(event, "variable_domain_name");                                                                                         

                                                                                                                                                                

    username[1] = switch_event_get_header(event, "variable_dialed_user");                                                                                       
    domain[1] = switch_event_get_header(event, "variable_dialed_domain");                                                                                       

                                                                                                                                                                

    username[2] = switch_event_get_header(event, "variable_user_name");                                                                                         
    domain[2] = switch_event_get_header(event, "variable_domain_name");                                                                                         

                                                                                                                                                                

    username[3] = switch_event_get_header(event, "variable_sip_to_user");                                                                                       
    domain[3] = switch_event_get_header(event, "variable_domain_name");                                                                                         

                                                                                                                                                                

    username[4] = switch_event_get_header(event, "variable_verto_user");                                                                                        
    domain[4] = switch_event_get_header(event, "variable_verto_host");                                                                                          

It has to match one of those pairs.


On Oct 5, 2018, at 6:24 PM, Alex Goulis <agoulis@opensips.org> wrote:

Hi all...

Does the userspy application only target registered users or can you use it to spy calls to let's say calls to a DID?


_________________________________________________________________________
Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com