Hello,
On 10-03 12:47, Stephan Reiff-Marganiec wrote:
Managed the Parsing now. I see your point with respect to the response, but how would I handle the following case then:
- Proxy received Request from UA and should respond to the UA swallowing
the original message (that is my module generates a response message) -- as I tried above.
sl_send_reply function in sl module, you can call this function directly from the script and it will send a stateless reply, you just give id reply code and reason phrase. You can call this function from your module too, look into ser-0.8.10/modules/registrar/save.c for example.
After you send a reply, your function called from the script should return 0 to the core which indicates that the core should stop processing of the script.
- Proxy receives response from terminating side UA/Proxy and should respond
to them, that is generate a new request without the response bubbling up to the UA.
This can be done using tm module callbacks. See ser-0.8.10/modules/tm/README for more description. tm exports function t_uac_dlg which can send requests. Let me know if you need any further assistance, I will try to find some example how to do it.
- Proxy creates a number of responses/requests to be send.
You can call sl_send_reply/t_uac_dlg several times.
What version of ser are you using, 0.8.10 or a CVS snapshot ?
I was assuming to find a functions like send_request(msg) and send_response(msg) or send_msg(msg) that can be used by modules to send msg to the proxy and leave the routing to the proxy according to ser.cfg instructions, but ignoring instructions in the route block *before* the call to the module -- which probably should allow me to do all of the above.
sl_send_reply (sl module) or t_reply (tm) module can send replies. t_reply also terminates transaction created by the original request. t_uac_dlg (tm module) can send requests.
Jan.