[Freeswitch-dev] get rid of mod_loopback for outbound calls

Tamas Cseke cstomi.levlist at gmail.com
Wed Jul 22 08:55:17 PDT 2009


we are using mod_loopback for outbound calls to be able to do a dialplan 
hunt before the actual call origination.
change caller number, change routing according to the prefix and 
something like that.
We have talked about a lot, that this is "not very" efficient  because  
we have 2 extra channels (loopbacks) for every call.

I diged into the state machine code and figured out that if I change the 
on_routing state handler functions for switch_ivr_originate to don't 
veto the standard behavior I can perform a dilplan hunt.
But I still have to originate a channel which makes a dialplan hunt and 
originate another. and this isn't what we really would like to...

I've got the following tip from Anthony earlier:
0416 16:39:28 <@anthm> maybe i could make an api command to pretend to 
do a dialplan run and print out a list in inline format of what to do
0416 16:39:48 <@anthm> that you could feed to originate inline dialplan

But I don't know how to implement this. I need some explanation.

1) the dialplan pretender api returns applications in inline format
2) we feed it to inline dialplan
but how could we originate the call, how should the whole process look like?
could you please give me an example?

I was thinking about someting like this, but it doesn't make sense I quess.
${originate(call_url inline ${pretend_dialplan_hunt(exten XML context)})}

Thanks in advance,

More information about the FreeSWITCH-dev mailing list