<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">If you are in an event you need to get a ptr to the session then use switch_ivr_session_transfer()<div><br></div><div>Like:</div><div> switch_core_session_t *session;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>const char *destination = "dest";</div><div> const char *dialplan = "XML";</div><div> const char *context = "default";</div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if ((session = switch_core_session_locate(uuid_here)) { /* The condition will catch race conditions where you get the event a couple milliseconds after the call has hung up */</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>switch_ivr_session_transfer(session, destination, dialplan, context);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>switch_core_session_rwunlock(session);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><br></div><div>Definition: (in switch_ivr.h)</div><div><div>/*!</div><div> \brief Transfer an existing session to another location</div><div> \param session the session to transfer</div><div> \param extension the new extension</div><div> \param dialplan the new dialplan (OPTIONAL, may be NULL)</div><div> \param context the new context (OPTIONAL, may be NULL)</div><div>*/</div><div>SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(_In_ switch_core_session_t *session, const char *extension, const char *dialplan,</div><div><span class="Apple-tab-span" style="white-space:pre">                                                                                                                        </span>const char *context);</div><div><br></div><div><br></div></div><div><br></div><div><br></div><div>Math</div></div><div><br><div><div>On 9-Jul-09, at 6:36 PM, Kevin Snow wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <font face="Verdana, Helvetica, Arial"><span style="font-size:12.0px"><br> I’m working on a module in C and I’ve hit a little bit of a stumbling block. I have a situation where I receive an event and in response I want to send a known session to a new dialplan eventhough it’s somewhere in the middle of another dialplan. I can’t find examples of doing this in C.<br> <br> Are there examples of doing this or am I going about this the wrong way.<br> <br> Thanks in advance!<br> <br> Kevin Snow<br> <br> </span></font> </div> _______________________________________________<br>Freeswitch-dev mailing list<br><a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>