Hi All,
I have a question regarding call forking and how to access failed branches: the ones for which kamailio sends out the CANCEL because on another one a 200OK was received. This is the scenario: - A calls B - 3 devices are registered on B, so a parallel forking is done to B1, B2 and B3 - B1, B2, and B3 all reply with 180 Ringing - B1 replies with 200OK - Kamailio CANCELs the branches with B2 and B3
What I need is access to each single CANCEL that Kamailio sends out to B2 and B3. In particular I need to know the branch-id and Via branch of all the cancelled branches. Additionally it would be perfect to have them inside the TM module, in order to have access also to internal AVPs.
I tried with dedicated failure routes and also with per-branch failure routes, but I was never able to access to those values. I also didn't found a specific event-route that can help me solve this problem.
Does anyone have an idea?
Kamailio version 5.2.5
Thanks
Regards Marco
You can try event_route[tm:local-request] for this.
On Tue, 25 Feb 2020, 15:36 Marco Capetta, mcapetta@sipwise.com wrote:
Hi All,
I have a question regarding call forking and how to access failed branches: the ones for which kamailio sends out the CANCEL because on another one a 200OK was received. This is the scenario:
- A calls B
- 3 devices are registered on B, so a parallel forking is done to B1,
B2 and B3
- B1, B2, and B3 all reply with 180 Ringing
- B1 replies with 200OK
- Kamailio CANCELs the branches with B2 and B3
What I need is access to each single CANCEL that Kamailio sends out to B2 and B3. In particular I need to know the branch-id and Via branch of all the cancelled branches. Additionally it would be perfect to have them inside the TM module, in order to have access also to internal AVPs.
I tried with dedicated failure routes and also with per-branch failure routes, but I was never able to access to those values. I also didn't found a specific event-route that can help me solve this problem.
Does anyone have an idea?
Kamailio version 5.2.5
Thanks
Regards Marco
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Yuriy,
thanks for the suggestion. I tried both "event_route[tm:local-request]" and "event_route[tm:local-response]" but internally generated CANCEL messages are not captured by those event routes. On the contrary, I can see that OPTIONS, NOTIFY and also PUBLISH messages are there.
Do you have any other suggestion?
Thanks Regards Marco
On 2/25/20 5:50 PM, Yuriy Gorlichenko wrote:
You can try event_route[tm:local-request] for this.
On Tue, 25 Feb 2020, 15:36 Marco Capetta, <mcapetta@sipwise.com mailto:mcapetta@sipwise.com> wrote:
Hi All, I have a question regarding call forking and how to access failed branches: the ones for which kamailio sends out the CANCEL because on another one a 200OK was received. This is the scenario: - A calls B - 3 devices are registered on B, so a parallel forking is done to B1, B2 and B3 - B1, B2, and B3 all reply with 180 Ringing - B1 replies with 200OK - Kamailio CANCELs the branches with B2 and B3 What I need is access to each single CANCEL that Kamailio sends out to B2 and B3. In particular I need to know the branch-id and Via branch of all the cancelled branches. Additionally it would be perfect to have them inside the TM module, in order to have access also to internal AVPs. I tried with dedicated failure routes and also with per-branch failure routes, but I was never able to access to those values. I also didn't found a specific event-route that can help me solve this problem. Does anyone have an idea? Kamailio version 5.2.5 Thanks Regards Marco _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
the last option to try is onsend_route and if the CANCEL shows up there, then use some string operations over $snd(buf) to get the Via branch, last value after "." being the branch index. I am not sure you can get the INVITE avps there, but you can try.
Otherwise a new event route has to be added for this purpose. Probably not much coding, depends of what is wanted to be exposed there, as the cancel is generated locally, there is no incoming sip_msg_t structure.
Cheers, Daniel
On 26.02.20 10:12, Marco Capetta wrote:
Hi Yuriy,
thanks for the suggestion. I tried both "event_route[tm:local-request]" and "event_route[tm:local-response]" but internally generated CANCEL messages are not captured by those event routes. On the contrary, I can see that OPTIONS, NOTIFY and also PUBLISH messages are there.
Do you have any other suggestion?
Thanks Regards Marco
On 2/25/20 5:50 PM, Yuriy Gorlichenko wrote:
You can try event_route[tm:local-request] for this.
On Tue, 25 Feb 2020, 15:36 Marco Capetta, <mcapetta@sipwise.com mailto:mcapetta@sipwise.com> wrote:
Hi All, I have a question regarding call forking and how to access failed branches: the ones for which kamailio sends out the CANCEL because on another one a 200OK was received. This is the scenario: - A calls B - 3 devices are registered on B, so a parallel forking is done to B1, B2 and B3 - B1, B2, and B3 all reply with 180 Ringing - B1 replies with 200OK - Kamailio CANCELs the branches with B2 and B3 What I need is access to each single CANCEL that Kamailio sends out to B2 and B3. In particular I need to know the branch-id and Via branch of all the cancelled branches. Additionally it would be perfect to have them inside the TM module, in order to have access also to internal AVPs. I tried with dedicated failure routes and also with per-branch failure routes, but I was never able to access to those values. I also didn't found a specific event-route that can help me solve this problem. Does anyone have an idea? Kamailio version 5.2.5 Thanks Regards Marco _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- *Marco Capetta * VoIP Developer
Sipwise GmbH http://www.sipwise.com , Campus 21/Europaring F15 AT-2345 Brunn am Gebirge
Phone: +43(0)1 301 2044 tel:+4313012044 Email: mcapetta@sipwise.com mailto:mcapetta@sipwise.com Website: www.sipwise.com http://www.sipwise.com
Particulars according Austrian Companies Code paragraph 14 "Sipwise GmbH" - Europaring F15 - 2345 Brunn am Gebirge FN:305595f, Commercial Court Vienna, ATU64002206
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Never tried that but probably makes sence to check event_route[network:msg]
It acts in the network layer and message itself has to be parsed by some additional script, but still an option.
On Wed, 26 Feb 2020, 10:36 Daniel-Constantin Mierla, miconda@gmail.com wrote:
Hello,
the last option to try is onsend_route and if the CANCEL shows up there, then use some string operations over $snd(buf) to get the Via branch, last value after "." being the branch index. I am not sure you can get the INVITE avps there, but you can try.
Otherwise a new event route has to be added for this purpose. Probably not much coding, depends of what is wanted to be exposed there, as the cancel is generated locally, there is no incoming sip_msg_t structure.
Cheers, Daniel On 26.02.20 10:12, Marco Capetta wrote:
Hi Yuriy,
thanks for the suggestion. I tried both "event_route[tm:local-request]" and "event_route[tm:local-response]" but internally generated CANCEL messages are not captured by those event routes. On the contrary, I can see that OPTIONS, NOTIFY and also PUBLISH messages are there.
Do you have any other suggestion?
Thanks Regards Marco
On 2/25/20 5:50 PM, Yuriy Gorlichenko wrote:
You can try event_route[tm:local-request] for this.
On Tue, 25 Feb 2020, 15:36 Marco Capetta, mcapetta@sipwise.com wrote:
Hi All,
I have a question regarding call forking and how to access failed branches: the ones for which kamailio sends out the CANCEL because on another one a 200OK was received. This is the scenario:
- A calls B
- 3 devices are registered on B, so a parallel forking is done to B1,
B2 and B3
- B1, B2, and B3 all reply with 180 Ringing
- B1 replies with 200OK
- Kamailio CANCELs the branches with B2 and B3
What I need is access to each single CANCEL that Kamailio sends out to B2 and B3. In particular I need to know the branch-id and Via branch of all the cancelled branches. Additionally it would be perfect to have them inside the TM module, in order to have access also to internal AVPs.
I tried with dedicated failure routes and also with per-branch failure routes, but I was never able to access to those values. I also didn't found a specific event-route that can help me solve this problem.
Does anyone have an idea?
Kamailio version 5.2.5
Thanks
Regards Marco
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
- Marco Capetta *
VoIP Developer
Sipwise GmbH http://www.sipwise.com , Campus 21/Europaring F15 AT-2345 Brunn am Gebirge
Phone: +43(0)1 301 2044 <+4313012044> Email: mcapetta@sipwise.com Website: www.sipwise.com
Particulars according Austrian Companies Code paragraph 14 "Sipwise GmbH" - Europaring F15 - 2345 Brunn am Gebirge FN:305595f, Commercial Court Vienna, ATU64002206
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi,
CANCEL message doesn't show up in "onsend_route". I'm only able to the the 200OK reply received from the device in "reply_route", I can probably get the via-branch from there, but I don't have access to the AVPs...
Having a dedicate event route, or reuse an existing one, would be the best option.
Thanks Marco
On 2/26/20 10:28 AM, Daniel-Constantin Mierla wrote:
Hello,
the last option to try is onsend_route and if the CANCEL shows up there, then use some string operations over $snd(buf) to get the Via branch, last value after "." being the branch index. I am not sure you can get the INVITE avps there, but you can try.
Otherwise a new event route has to be added for this purpose. Probably not much coding, depends of what is wanted to be exposed there, as the cancel is generated locally, there is no incoming sip_msg_t structure.
Cheers, Daniel
On 26.02.20 10:12, Marco Capetta wrote:
Hi Yuriy,
thanks for the suggestion. I tried both "event_route[tm:local-request]" and "event_route[tm:local-response]" but internally generated CANCEL messages are not captured by those event routes. On the contrary, I can see that OPTIONS, NOTIFY and also PUBLISH messages are there.
Do you have any other suggestion?
Thanks Regards Marco
On 2/25/20 5:50 PM, Yuriy Gorlichenko wrote:
You can try event_route[tm:local-request] for this.
On Tue, 25 Feb 2020, 15:36 Marco Capetta, <mcapetta@sipwise.com mailto:mcapetta@sipwise.com> wrote:
Hi All, I have a question regarding call forking and how to access failed branches: the ones for which kamailio sends out the CANCEL because on another one a 200OK was received. This is the scenario: - A calls B - 3 devices are registered on B, so a parallel forking is done to B1, B2 and B3 - B1, B2, and B3 all reply with 180 Ringing - B1 replies with 200OK - Kamailio CANCELs the branches with B2 and B3 What I need is access to each single CANCEL that Kamailio sends out to B2 and B3. In particular I need to know the branch-id and Via branch of all the cancelled branches. Additionally it would be perfect to have them inside the TM module, in order to have access also to internal AVPs. I tried with dedicated failure routes and also with per-branch failure routes, but I was never able to access to those values. I also didn't found a specific event-route that can help me solve this problem. Does anyone have an idea? Kamailio version 5.2.5 Thanks Regards Marco _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- *Marco Capetta * VoIP Developer
Sipwise GmbH http://www.sipwise.com , Campus 21/Europaring F15 AT-2345 Brunn am Gebirge
Phone: +43(0)1 301 2044 tel:+4313012044 Email: mcapetta@sipwise.com mailto:mcapetta@sipwise.com Website: www.sipwise.com http://www.sipwise.com
Particulars according Austrian Companies Code paragraph 14 "Sipwise GmbH" - Europaring F15 - 2345 Brunn am Gebirge FN:305595f, Commercial Court Vienna, ATU64002206
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla --www.asipto.com www.twitter.com/miconda --www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin -www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin --www.kamailioworld.com