@@ -856,6 +856,59 @@ modparam("tm", "cluster_param", "tid")
856
856
...
857
857
# disable auto-cancel handling
858
858
modparam("tm", "cluster_auto_cancel", no)
859
+ ...
860
+ </programlisting >
861
+ </example >
862
+ </section >
863
+
864
+ <section id =" param_local_request_route" xreflabel =" local_request_route" >
865
+ <title ><varname >local_request_route</varname > (string)</title >
866
+ <para >
867
+ This parameter points to a route, which is executed whenever TM creates
868
+ a new request (e.g., through the B2B modules or through MI).
869
+ </para >
870
+ <para >
871
+ The route is executed with the generated message by TM, incorporating all
872
+ modifications.
873
+ </para >
874
+ <example >
875
+ <title >Set the <varname >local_request_route</varname > parameter</title >
876
+ <programlisting format =" linespecific" >
877
+ ...
878
+ # Execute the route "local_request_route" upon sending a request
879
+ modparam("tm", "local_request_route", "tm_local_request")
880
+
881
+ route[tm_local_request] {
882
+ if (is_method("INVITE") && $rb(application/sdp) && !has_totag()) {
883
+ $avp(sdp_request) := $rb(application/sdp);
884
+ }
885
+ }
886
+ ...
887
+ </programlisting >
888
+ </example >
889
+ </section >
890
+
891
+ <section id =" param_local_reply_route" xreflabel =" local_reply_route" >
892
+ <title ><varname >local_reply_route</varname > (string)</title >
893
+ <para >
894
+ This parameter points to a reply-route, which is executed whenever TM creates
895
+ a reply (e.g., through the B2B modules or through MI).
896
+ </para >
897
+
898
+ <example >
899
+ <title >Set the <varname >local_reply_route</varname > parameter</title >
900
+ <programlisting format =" linespecific" >
901
+ ...
902
+ # Execute the route "tm_local_reply" upon sending a request
903
+ modparam("tm", "local_reply_route", "tm_local_reply")
904
+
905
+ onreply_route[tm_local_reply] {
906
+ if (is_method("BYE")) {
907
+ $var(rc) = rest_get("http://localhost/qos/delete",
908
+ $var(recv_body), $var(recv_ct), $var(rcode));
909
+ }
910
+ }
911
+
859
912
...
860
913
</programlisting >
861
914
</example >
0 commit comments