Here are 3 ways:
1) subscribe to the BACKGROUND_JOB event and find the one with the same job-uuid
then the body of that message is the output from your backgrounded FSAPI call which in the case
of an originate will contain the uuid of the actual channel.
2) You can do as suggested and add {myvar=myval} prefix to the dialstring and look for
myvar in the channel_originate event.
3) Finally you can choose the uuid in advance providing it's actually unique using:
{origination_uuid=XYZ}
You can use your own code to generate uuid (make sure they are unique) or
ask the core to give you a new uuid with the create_uuid FSAPI call.
I want to do the following:
Originate a call via event_socket, I get back a job_uuid. Then I want to
control the call when it's established (2 call legs).
Scanning the variables of the 2 call legs I currentyl cannot see any
relation between the job_uuid and the uuid of the resulting call legs.
I may set a variable with my own unique id while originating a call, but
finding the calls later on and dumping the variables fo all channels is
very time consuming in terms of CPU.
A workaround I tried, is to set caller-id or caller-id-number with a
unique id. This works, but has the known side effects of not having a
valid caller-id or caller-id-number.
So my question is: Has anybody an idea how to build a relationship
between job_uuid and the resulting call legs which does not require
dumping the variables of all channels?
Best regards
Peter
_______________________________________________
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
http://www.freeswitch.org