Definition in file isc.h.
#include "../../parser/msg_parser.h"
#include "checker.h"
#include "mark.h"
Go to the source code of this file.
Defines | |
| #define | IFC_AS_UNAVAILABLE_STATUS_CODE 555 |
| SIP Status Code to send to client on Session Termination because AS did not respond. | |
Functions | |
| int | isc_forward (struct sip_msg *msg, isc_match *m, isc_mark *mark) |
| Forwards the message to the application server. | |
| #define IFC_AS_UNAVAILABLE_STATUS_CODE 555 |
SIP Status Code to send to client on Session Termination because AS did not respond.
Definition at line 65 of file isc.h.
Referenced by ISC_match_filter().
Forwards the message to the application server.
| msg | - the SIP message | |
| m | - the isc_match that matched with info about where to forward it | |
| mark | - the isc_mark that should be used to mark the message |
Definition at line 84 of file isc.c.
References cscf_get_transaction(), isc_fr_inv_timeout, isc_fr_timeout, isc_mark_set(), ISC_RETURN_ERROR, ISC_RETURN_TRUE, isc_tmb, M_NAME, and isc_match::server_name.
Referenced by ISC_match_filter().
00085 { 00086 struct cell *t; 00087 unsigned int hash,label; 00088 ticks_t fr_timeout,fr_inv_timeout; 00089 DBG( "DEBUG:"M_NAME":isc_forward(): marking for AS <%.*s>\n", 00090 m->server_name.len, m->server_name.s ); 00091 00092 isc_mark_set(msg,m,mark); 00093 /* change destination so it forwards to the app server */ 00094 if (msg->dst_uri.s) pkg_free(msg->dst_uri.s); 00095 msg->dst_uri.s = pkg_malloc(m->server_name.len); 00096 if (!msg->dst_uri.s) { 00097 LOG(L_ERR,"ERR:"M_NAME":isc_forward(): error allocating %d bytes\n",m->server_name.len); 00098 return ISC_RETURN_ERROR; 00099 } 00100 msg->dst_uri.len = m->server_name.len; 00101 memcpy(msg->dst_uri.s,m->server_name.s,m->server_name.len); 00102 00103 /* append branch if last trigger failed */ 00104 if (*isc_tmb.route_mode == MODE_ONFAILURE) 00105 append_branch(msg,msg->first_line.u.request.uri.s,msg->first_line.u.request.uri.len, 00106 msg->dst_uri.s,msg->dst_uri.len,0,0); 00107 00108 /* set the timeout timers to a lower value */ 00109 cscf_get_transaction(msg,&hash,&label); 00110 t = isc_tmb.t_gett(); 00111 fr_timeout = t->fr_timeout; 00112 fr_inv_timeout = t->fr_inv_timeout; 00113 t->fr_timeout=S_TO_TICKS(isc_fr_timeout)/1000; 00114 t->fr_inv_timeout=S_TO_TICKS(isc_fr_inv_timeout)/1000; 00115 00116 /* send it */ 00117 isc_tmb.t_relay(msg,0,0); 00118 00119 /* recover the timeouts */ 00120 t->fr_timeout=fr_timeout; 00121 t->fr_inv_timeout=fr_inv_timeout; 00122 00123 LOG(L_INFO,"INFO:"M_NAME">> msg was fwded to AS\n"); 00124 00125 // LOG(L_INFO,"INFO:"M_NAME":isc_forward: fw relayed with marking [%8X]\n",rc->mark.cnt); 00126 // DBG( "DEBUG:"M_NAME":isc_forward: Forward sending finished, resuming operation\n" ); 00127 return ISC_RETURN_TRUE; 00128 }
1.5.2