El Wednesday 20 February 2008 10:08:44 Daniel Grotti escribió:
Hi, but how can I get out of outgoing and enter into incoming script? for example:
cpl_run_script("outgoing","force_stateful"); [...] lookup("location"); [...] cpl_run_script("incoming","force_stateful");
Yes, now I understand your main problem. IMHO the only solution is to send outbound the INVITE (so it comes again to OpenSer by DNS resolution). Something as:
if ($si != "IP_OPENSER") { cpl_run_script("outgoing","force_stateful"); t_relay(); # Send out the INVITE. } lookup("location"); cpl_run_script("incoming","force_stateful");
A calls B, the INVITE arrives to the proxy from an IP different than the proxy IP, so the outgoing CPL is runned and the CPL by itself will send out the INVITE. The INVITE will come back to the proxy since B is a local user, but in this case the $si is the proxy IP so the lookup and incoming CPL will be runned.