Hi Klaus, if i understand the t_request-method right, i give it the following parameters: - m: Method-Name - ruri: Request-URI - to: To-Line - from: From-Line - h: Additional Headers (if any) - b: Body (if any) - c / cp: Callback + Parameters
I want to send a request to a specific phone, e.g. a Request to "sip:[EMAIL PROTECTED]:2054;line=c5rotyx7"; if i put this in the To-Parameter, it'll only be in the "To"-Line, not in the Request-URI... And even if i could put it there, that would not affect the t_request-Calls from other modules like the presence modules. Carsten Am Dienstag, den 07.08.2007, 15:52 +0200 schrieb Klaus Darilion: > Why not setting the destination URI (which is actually an outbound proxy) > > regards > klaus > > Carsten Bock schrieb: > > Hi, > > > > i need an Outbound-Proxy in the "t_request"-Method in the TM-API, but i > > do not know how to define it properly in the request. I've managed to do > > this, by extending the TM-API, where i can define the outbound proxy: > > > > /* > > * Send a transactional request, no dialogs involved > > */ > > int request_via(str* m, str* ruri, str * via, str* to, str* from, str* > > h, str* b, transaction_cb c, void* cp) > > { > > str callid, fromtag; > > dlg_t* dialog; > > int res; > > > > if (check_params(m, to, from, &dialog) < 0) goto err; > > > > generate_callid(&callid); > > generate_fromtag(&fromtag, &callid); > > > > if (new_dlg_uac(&callid, &fromtag, DEFAULT_CSEQ, from, to, &dialog) < > > 0) { > > LOG(L_ERR, "request(): Error while creating temporary > > dialog\n"); > > goto err; > > } > > > > if (ruri) { > > dialog->rem_target.s = ruri->s; > > dialog->rem_target.len = ruri->len; > > dialog->hooks.request_uri = &dialog->rem_target; > > } > > w_calculate_hooks(dialog); > > if (via) { > > dialog->hooks.next_hop = via; > > } > > > > res = t_uac(m, h, b, dialog, c, cp); > > dialog->rem_target.s = 0; > > free_dlg(dialog); > > return res; > > > > err: > > if (cp) shm_free(cp); > > return -1; > > } > > > > /* > > * Send a transactional request, no dialogs involved > > */i have a question about the t_request from the TM-API: > > int request(str* m, str* ruri, str* to, str* from, str* h, str* b, > > transaction_cb c, void* cp) > > { > > return request_via(m, ruri, NULL, to, from, h, b, c, cp); > > } > > > > (i can provide a complete patch for OpenSER 1.2.1/Trunk, if required) > > Is this the correct way to implement something like this? What about > > other modules? For our setup, also the messages generated from the > > presence-Module need to go through the outbound proxy (probably the same > > with other modules), and i do not know how configure this (and i found > > no clue in the docs)... > > > > Thank you, > > Carsten > > > > > > > > _______________________________________________ > > Devel mailing list > > Devel@openser.org > > http://openser.org/cgi-bin/mailman/listinfo/devel _______________________________________________ Devel mailing list Devel@openser.org http://openser.org/cgi-bin/mailman/listinfo/devel