Hello there,
I have a Kamailio server using dispatcher module to monitor several peers, some of them are in the same network, others are in an external network, for the peers that are in the external network kamailio has to send the OPTIONS(dispatcher keep alives) through another kamailio located in the border and acting as loadbalancer.
If i set the dispatcher option "outbound_proxy" all SIP OPTIONS are sent to the outbound proxy configured and it isn't what i need, I need to have by some way a possibility to set outbound_proxy only for the peers that are located on the external network.
How can I do that?
Regards
On 16 Jun 2016, at 18:10, José Seabra joseseabra4@gmail.com wrote:
Hello there,
I have a Kamailio server using dispatcher module to monitor several peers, some of them are in the same network, others are in an external network, for the peers that are in the external network kamailio has to send the OPTIONS(dispatcher keep alives) through another kamailio located in the border and acting as loadbalancer.
If i set the dispatcher option "outbound_proxy" all SIP OPTIONS are sent to the outbound proxy configured and it isn't what i need, I need to have by some way a possibility to set outbound_proxy only for the peers that are located on the external network.
How can I do that?
I would set outbound_proxy to the local proxy and from that change $du on the “external” ones.
/O
Hi Olle, Thank you for the good hint, this way i can decide the destination of th sip OPTIONS in the kamailio script.
Thank you for the support.
Best regards José
2016-06-17 8:24 GMT+01:00 Olle E. Johansson oej@edvina.net:
On 16 Jun 2016, at 18:10, José Seabra joseseabra4@gmail.com wrote:
Hello there,
I have a Kamailio server using dispatcher module to monitor several
peers, some of them are in the same network, others are in an external network, for the peers that are in the external network kamailio has to send the OPTIONS(dispatcher keep alives) through another kamailio located in the border and acting as loadbalancer.
If i set the dispatcher option "outbound_proxy" all SIP OPTIONS are sent
to the outbound proxy configured and it isn't what i need, I need to have by some way a possibility to set outbound_proxy only for the peers that are located on the external network.
How can I do that?
I would set outbound_proxy to the local proxy and from that change $du on the “external” ones.
/O _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
as alternative -- you should be able to set the out bound proxy address inside the event_route[tm:local-request], avoiding a loop back to the same server.
On the other hand, the event route is executed for all requests generated by kamailio, not only for the keepalives, so you need to have conditions there to select what you want to process.
Cheers, Daniel
On 17/06/16 11:24, José Seabra wrote:
Hi Olle, Thank you for the good hint, this way i can decide the destination of th sip OPTIONS in the kamailio script.
Thank you for the support.
Best regards José
2016-06-17 8:24 GMT+01:00 Olle E. Johansson <oej@edvina.net mailto:oej@edvina.net>:
> On 16 Jun 2016, at 18:10, José Seabra <joseseabra4@gmail.com <mailto:joseseabra4@gmail.com>> wrote: > > Hello there, > > I have a Kamailio server using dispatcher module to monitor several peers, some of them are in the same network, others are in an external network, for the peers that are in the external network kamailio has to send the OPTIONS(dispatcher keep alives) through another kamailio located in the border and acting as loadbalancer. > > If i set the dispatcher option "outbound_proxy" all SIP OPTIONS are sent to the outbound proxy configured and it isn't what i need, I need to have by some way a possibility to set outbound_proxy only for the peers that are located on the external network. > > How can I do that? I would set outbound_proxy to the local proxy and from that change $du on the “external” ones. /O _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel, I already have tried that solution, changing the $du pseudo variable but the SIP OPTIONS still going to the address configured on dispatcher table.
Is it enough change the $du on event_route[tm:local-request], or need something else?
Thank you for your support
Best Regards José
2016-06-17 11:57 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
as alternative -- you should be able to set the out bound proxy address inside the event_route[tm:local-request], avoiding a loop back to the same server.
On the other hand, the event route is executed for all requests generated by kamailio, not only for the keepalives, so you need to have conditions there to select what you want to process. Cheers, Daniel
On 17/06/16 11:24, José Seabra wrote:
Hi Olle, Thank you for the good hint, this way i can decide the destination of th sip OPTIONS in the kamailio script.
Thank you for the support.
Best regards José
2016-06-17 8:24 GMT+01:00 Olle E. Johansson oej@edvina.net:
On 16 Jun 2016, at 18:10, José Seabra < joseseabra4@gmail.com
joseseabra4@gmail.com> wrote:
Hello there,
I have a Kamailio server using dispatcher module to monitor several
peers, some of them are in the same network, others are in an external network, for the peers that are in the external network kamailio has to send the OPTIONS(dispatcher keep alives) through another kamailio located in the border and acting as loadbalancer.
If i set the dispatcher option "outbound_proxy" all SIP OPTIONS are
sent to the outbound proxy configured and it isn't what i need, I need to have by some way a possibility to set outbound_proxy only for the peers that are located on the external network.
How can I do that?
I would set outbound_proxy to the local proxy and from that change $du on the “external” ones.
/O _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://www.asipto.com - http://www.kamailio.orghttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel,
I have enabled kamailio debug=3 and i can see the next hop of sip OPTION before it enter in event_route[tm:local-request], in this event route i'm changing the $du variable on the script but OPTION still going to address configured on dispatcher list instead of the address set on $du, and I can't see any reference to next hop on kamailio log after change $du.
Kamailio log:
2016-06-20 14:08:48.030 DEBUG: dispatcher [dispatch.c:2871]: ds_check_timer(): probing set #7, URI sip:10.112.185.126:5090 2016-06-20 14:08:48.030 DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:10.112.185.126:5090 2016-06-20 14:08:48.031 DEBUG: <core> [resolve.c:1208]: srv_sip_resolvehost(): 10.112.185.126:5090 proto=0 2016-06-20 14:08:48.031 DEBUG: <core> [resolve.c:1329]: srv_sip_resolvehost(): returning 0xa121a0 (10.112.185.126:5090 proto=1) 2016-06-20 14:08:48.031 DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 37827 2016-06-20 14:08:48.031 DEBUG: tm [uac.c:351]: t_uac_prepare(): executing event_route[tm:local-request] 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:608]: parse_msg(): SIP Request: 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:610]: parse_msg(): method: <OPTIONS> 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:612]: parse_msg(): uri: sip:10.112.185.126:5090 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:614]: parse_msg(): version: <SIP/2.0> 2016-06-20 14:08:48.031 DEBUG: <core> [parser/parse_via.c:1254]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK3c39.65f7a3a2000000000000000000000000.0>; state=16 2016-06-20 14:08:48.031 DEBUG: <core> [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found, flags=2 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:498]: parse_headers(): parse_headers: this is the first via 2016-06-20 14:08:48.031 DEBUG: <core> [parser/parse_addr_spec.c:894]: parse_addr_spec(): end of header reached, state=10 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:173]: get_hdr_field(): DEBUG: get_hdr_field: <To> [27]; uri=[sip: 10.112.185.126:5090] 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: to body [sip:10.112.185.126:5090#015#012] 2016-06-20 14:08:48.031 DEBUG: <core> [parser/parse_addr_spec.c:172]: parse_to_param(): DEBUG: add_param: tag=5f2625158503ae21eb962b93cf792822-be99 2016-06-20 14:08:48.031 DEBUG: <core> [parser/parse_addr_spec.c:894]: parse_addr_spec(): end of header reached, state=29 2016-06-20 14:08:48.031 DEBUG: <core> [parser/msg_parser.c:153]: get_hdr_field(): get_hdr_field: cseq <CSeq>: <10> <OPTIONS>
How can i change the destination of sip OPTION in the event_route[tm:local-request]?
Regards José
2016-06-17 12:04 GMT+01:00 José Seabra joseseabra4@gmail.com:
Hi Daniel, I already have tried that solution, changing the $du pseudo variable but the SIP OPTIONS still going to the address configured on dispatcher table.
Is it enough change the $du on event_route[tm:local-request], or need something else?
Thank you for your support
Best Regards José
2016-06-17 11:57 GMT+01:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
as alternative -- you should be able to set the out bound proxy address inside the event_route[tm:local-request], avoiding a loop back to the same server.
On the other hand, the event route is executed for all requests generated by kamailio, not only for the keepalives, so you need to have conditions there to select what you want to process. Cheers, Daniel
On 17/06/16 11:24, José Seabra wrote:
Hi Olle, Thank you for the good hint, this way i can decide the destination of th sip OPTIONS in the kamailio script.
Thank you for the support.
Best regards José
2016-06-17 8:24 GMT+01:00 Olle E. Johansson oej@edvina.net:
On 16 Jun 2016, at 18:10, José Seabra < joseseabra4@gmail.com
joseseabra4@gmail.com> wrote:
Hello there,
I have a Kamailio server using dispatcher module to monitor several
peers, some of them are in the same network, others are in an external network, for the peers that are in the external network kamailio has to send the OPTIONS(dispatcher keep alives) through another kamailio located in the border and acting as loadbalancer.
If i set the dispatcher option "outbound_proxy" all SIP OPTIONS are
sent to the outbound proxy configured and it isn't what i need, I need to have by some way a possibility to set outbound_proxy only for the peers that are located on the external network.
How can I do that?
I would set outbound_proxy to the local proxy and from that change $du on the “external” ones.
/O _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://www.asipto.com - http://www.kamailio.orghttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Cumprimentos José Seabra