I have a requirement where I need to replace the To field. I am using 
uac_replace_to(); to do this. It works great. I am using the dispatcher module. 
I am using t_on_failure(); to try the next destination in the group. It hits a 
failure_route that then sends it to the "next_dest" route. There I am calling 
ds_next_dst(); to pick the next destination in the group. After the destination 
has been selected I called uac_replace_to(); again. This is where I run into my 
problem.

The To: field now has both the first and second destination in the To: field. 
(i.e. sip:[email protected]:[email protected]). I can see that 
when uac_replace_to(); is called for the second time (in the "next_dest" route) 
that it is trying to store the vst parameter in the dialog:

DBG:dispatcher:ds_next_dst: using [sip:10.10.10.11:5080]
DBG:dispatcher:ds_next_dst: using [sip:10.10.10.10:5060]
DBG:uac:replace_uri: uri to replace [sip:[email protected]]
DBG:uac:replace_uri: replacement uri is [sip:[email protected]]
DBG:dialog:new_dlg_val: inserting <vst>=<sip:[email protected]>
DBG:uac:replace_uri: stored <vst> param in dialog
DBG:dialog:new_dlg_val: inserting <739824>=<sip:[email protected]>

I need the To: field to be updated on each failure with the new destination. I 
tried calling record_route(); after each uac_replace_to(); call as well. This 
resulted in an additional rr added to the header with no vst field. I am not 
sure where to go from here. Am I approaching this the right way? Is there a 
better way to do this?

Link to config: http://pastebin.com/UgzgqeF8

Thanks in advance,

John
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to