[Freeswitch-users] Setting channel variables for FIFO-originated calls

Ken Treis ken at miriamtech.com
Thu Apr 8 14:42:24 PDT 2010


I'm still pretty new to FreeSWITCH, but learning my way around.

I've been trying to figure out how to use a different filename for each call in an on-hook agent fifo setup. I've been setting fifo_record_template in the originate string of the member definition, e.g.

>  {member_wait=nowait,fifo_record_template=$${base_dir}/recordings/fifo.wav}sofia/gateway/sip.jnctn.net/18005551212

This works, but as soon as I put a (non-preprocessor) variable in there, I get a complaint that my variable contains a variable: "Invalid data (${fifo_record_template} contains a variable)". But the code in mod_fifo.c seems to expect to find variables in there:

>                 if (record_template) {
>                     expanded = switch_channel_expand_variables(other_channel, record_template);
>                     switch_ivr_record_session(session, expanded, 0, NULL);
>                 }

So my only conclusions at this point are that either:

1. The validation rule that gives me the "contains a variable" is being overly paranoid, or
2. There must be some other way to set this variable.

I've chased #2 for a little bit, but apparently since FIFO-originated calls are created without any linked session (first arg to switch_ivr_originate is NULL), I can't export the variable from the original channel either. Is there some other way to set channel variables on the calls the FIFO originates?

--
Ken Treis
Miriam Technologies, Inc.




More information about the FreeSWITCH-users mailing list