[Freeswitch-users] Accessing sip_reply_host / sip_reply_port when using a redirect_context

Pete Kelly pkelly at gmail.com
Tue Jul 25 15:07:33 UTC 2017


Hi

I am use a reply_context during a bridge in order to handle a 302 Redirect
myself within the FS dialplan.

One of the things I need to know is which host and port that the 302 was
received from.

Looking through sofia.c, this information is being set in the form of:

  switch_channel_set_variable(channel, "sip_reply_host", network_ip);
  switch_channel_set_variable_printf(channel, "sip_reply_port", "%d",
network_port);

However the code then goes on to perform a transfer to the new context:

   switch_ivr_session_transfer(a_session, p_contact->m_url->url_user,
sip_redirect_dialplan, sip_redirect_context);

And within the XML dialplan in that context, the variables sip_reply_host,
sip_reply_port (and the contact_uris from the 302) are all missing,.


Is is possible to get this information somehow from within a
redirect_context? Am I missing a trick somewhere?

Thanks

Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170725/7cf3e635/attachment.html>


More information about the FreeSWITCH-users mailing list