[asterisk-dev] [Code Review] 3035: Add a function PJSIP_ENDPOINT to retrieve endpoint configuration details from the dialplan

Matt Jordan reviewboard at asterisk.org
Wed Nov 27 22:29:27 CST 2013

This is an automatically generated e-mail. To reply, visit:

Review request for Asterisk Developers.

Repository: Asterisk


The impetus for this function came from looking at the CHANNEL function for chan_sip, and starting to map out what properties should be applied to chan_pjsip.

While I was looking at it, I thought that - other than the name of the endpoint associated with the channel - endpoint details really shouldn't come from the CHANNEL function. They should come from something else. Hence, the PJSIP_ENDPOINT function.

This function lets you query any property configured on an endpoint, for any endpoint, from the dialplan. Assuming the CHANNEL function gets applied to chan_pjsip, this would let you extract information about a channel's endpoint - or whatever endpoint they're going to go talk to.

This has some obvious implications in knowing what's about to happen before you go Dial some endpoint.

As an aside, I think this patch also shows (to a small extent) the usefulness of both Sorcery as well as XML configuration information. More lines of code are spent on sanitizing input than anything else.


  /branches/12/main/sorcery.c 403234 
  /branches/12/funcs/func_pjsip_endpoint.c PRE-CREATION 
  /branches/12/doc/snapshots.xslt 403234 
  /branches/12/doc/appdocsxml.xslt PRE-CREATION 
  /branches/12/doc/appdocsxml.dtd 403234 
  /branches/12/Makefile 403234 

Diff: https://reviewboard.asterisk.org/r/3035/diff/


Testsuite test written and available here:



Matt Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131128/194f3e68/attachment.html>

More information about the asterisk-dev mailing list