[SR-Users] From URI attribute for dispatcher target

Giacomo Vacca giacomo.vacca at gmail.com
Wed Sep 5 15:14:56 CEST 2018


Hi all,
I was looking for a solution to set a dedicated From URI in OPTIONS
requests to a specific dispatcher target.

ds_ping_from (
https://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.ds_ping_from)
applies globally, why I needed the granularity of a single target.

With these changes to the dispatcher module I get what I need:
https://github.com/kamailio/kamailio/commit/3f9c38be11416f7abe5c4448088ba66d2d3e6aad

I can just add an attribute to the others, e.g. instead of

*1 sip:127.0.0.1:7070 <http://127.0.0.1:7070> 0 1*

something like:

*1 sip:127.0.0.1:7070 <http://127.0.0.1:7070> 0 1 ping_from=sip.custom.com
<http://sip.custom.com>*

When the ping_from attribute is not specified, the general ds_ping_from
applies and is used.

This would save me from a solution like intercepting the outgoing OPTIONS
and manipulating the From header.

Does this approach make sense? Are there other ways already available to
achieve this?

Thanks,
Giacomo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180905/29c7be81/attachment.html>


More information about the sr-users mailing list