#266 Add pvar support for rtp proxy used

modules (179)

Adds new module parameter "rtpp_sock_pvar" which is a pvar to be set with the url of the rtpproxy used on the call.

Example usage:
modparam("rtpproxy", "rtpp_sock_pvar", "$avp(rtp_sock)")
#Load balancing rtpproxies
modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:12221 udp:localhost:12222")

xlog("Used rtpproxy $avp(rtp_sock) for callid $ci");

In the log:
"Used rtpproxy udp:localhost:12222 for callid abc@123.com"

Useful for troubleshooting quality issues related to a single node or instance or rtpproxy.

I have done some limited tested in a lab setup for this patch.


  • Ryan Bullock

    Ryan Bullock - 2013-03-06

    rtpp_sock_pvar support

  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> razvancrainea
  • Razvan Crainea

    Razvan Crainea - 2013-03-12

    Hi, Ryan!

    Thank you for the patch you provided. The only problem I can see is that you only set the variable for the first server. However, if that server fails, and a failover succeeds, you will have a bogus server set. Therefore I moved the code that sets the variable in the select_rtpp_node() function, in order to have a more general approach.
    I attached a new patch for this. Can you five it a try and let me know if it works as desired?

    Best regards,

  • Razvan Crainea

    Razvan Crainea - 2013-03-12

    rev. 2

  • Ryan Bullock

    Ryan Bullock - 2013-03-14

    rev 3, work when only a single rtpproxy node is configured

  • Ryan Bullock

    Ryan Bullock - 2013-03-14

    Hey Răzvan,

    I tested your patch and it works well, but doesn't set the node if only a single rtpproxy is configured. I attached an updated patch that sets it in that case as well (for consistency, hopefully you know what node the call went to if you only have 1 :) .

    Tested with a single rtpproxy, a set of two, and in the scenario where one rtpproxy does not respond. All worked well.

    Thanks for the help, let me know if anything else is required.



  • Razvan Crainea

    Razvan Crainea - 2013-03-15

    Hi, Ryan!

    You are right, I totally missed that case, thanks for pointing it out. I have applied your patch on trunk, revision #9915.

    Thanks and looking forward for more features :)

  • Razvan Crainea

    Razvan Crainea - 2013-03-15
    • status: open --> closed-accepted

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks