What script processes the contact headers returned from a redirect request?
2 posters
Page 1 of 1
What script processes the contact headers returned from a redirect request?
I'm trying to modify/add some logic for data returned from a sip redirect. I cant seem to locate which route script file processes the contact header and then routes the call.
irubado- Number of Messages : 4
Point : 6
Registration Date : 2022-02-24
Re: What script processes the contact headers returned from a redirect request?
Hi
You need to use the redirect_routing.rb script.
You need to use the redirect_routing.rb script.
Re: What script processes the contact headers returned from a redirect request?
Admin wrote:Hi
You need to use the redirect_routing.rb script.
Yes I know, that will setup the routing to the redirect server. However, what actual script processes the contact header in the reply from the redirect server?
irubado- Number of Messages : 4
Point : 6
Registration Date : 2022-02-24
Re: What script processes the contact headers returned from a redirect request?
ın the script, starting from the following line process the contact header.
if (contact_index == 0)
if (contact_index == 0)
Re: What script processes the contact headers returned from a redirect request?
Admin wrote:ın the script, starting from the following line process the contact header.
if (contact_index == 0)
The reply from the redirect will miss that block as contact_index will be populated. There is no "Else" in that file.
irubado- Number of Messages : 4
Point : 6
Registration Date : 2022-02-24
Re: What script processes the contact headers returned from a redirect request?
Hi
You can use something like following
if (contact_index >= 1)
# This section will be called for each contact
# We need to create a new set of routes and not modify the original one, thus the cloning
newroutes = []
routes = clone_routes params[:routes]
log_trace 1, "AAA routes = " + routes.inspect
log_trace 1, "New contact = " + contacts.inspect
contact_info = contacts[:list][contact_index][:sip_uri]
log_trace 2, "This contact index = " + contact_info.inspect
# Extract the IP or domain from the 302 (will be different for each contact)
ipaddress = contacts[:list][contact_index][:sip_uri].match(/@(.*)/)
log_trace 2, "IP address found = " + ipaddress[1].inspect
If you need more help on scripting, you need to go with ProSBC and but 9x5 Professional Support hours.
You can use something like following
if (contact_index >= 1)
# This section will be called for each contact
# We need to create a new set of routes and not modify the original one, thus the cloning
newroutes = []
routes = clone_routes params[:routes]
log_trace 1, "AAA routes = " + routes.inspect
log_trace 1, "New contact = " + contacts.inspect
contact_info = contacts[:list][contact_index][:sip_uri]
log_trace 2, "This contact index = " + contact_info.inspect
# Extract the IP or domain from the 302 (will be different for each contact)
ipaddress = contacts[:list][contact_index][:sip_uri].match(/@(.*)/)
log_trace 2, "IP address found = " + ipaddress[1].inspect
If you need more help on scripting, you need to go with ProSBC and but 9x5 Professional Support hours.
Re: What script processes the contact headers returned from a redirect request?
Admin wrote:Hi
If you need more help on scripting, you need to go with ProSBC and but 9x5 Professional Support hours.
Thanks! I see what you did there.
irubado- Number of Messages : 4
Point : 6
Registration Date : 2022-02-24
Similar topics
» Routing Using Redirect Server
» Route on TGRP with stir shaken and pass all original parameters
» Script to add tgrp of NAP's column and trunk-context to Contact header
» SIP redirect authorisation.
» Request For enabling Media Inactivity Timer || Telco Bridges
» Route on TGRP with stir shaken and pass all original parameters
» Script to add tgrp of NAP's column and trunk-context to Contact header
» SIP redirect authorisation.
» Request For enabling Media Inactivity Timer || Telco Bridges
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum