ahennis@voicespring.net Posted June 12, 2017 Report Share Posted June 12, 2017 We are using custom headers in our trunks with the To header set up as follows."{domain-display}" <sip:{if clip true}anonymous@anonymous.invalid{fi clip true}{if disa true}{ext-ani}@{domain}{fi disa true}{from-ani}@{domain}>We need to change the "{domain-display}" part based on the outbound ANI of the extension making the call or some other custom field that can be configured for each extension. I do not see any other variables we can use to replace {domain-display} with to make this happen. We can't use {ext-display} because each extension has the users first and last name configured. It would be great if there was a field for each extension that could be populated with this a value that set a variable that could be used in the custom header, something like {ext-CNAM}. If an extension's CNAM field were set to "Company 1" the {ext-CNAM} variable would "Company 1" If a different extension on the same domain had its CNAM field set to "Company 2" the {ext-CNAM} variable would "Company 2" In he custom header below if an extensions CNAM field is set, whatever value was in the field would be used otherwise processing will continue and the {domain-display} variable will be used. {if ext-CNAM isset}"{ext-CNAM}" "{domain-display}" <sip:{if clip true}anonymous@anonymous.invalid{fi clip true}{if disa true}{ext-ani}@{domain}{fi disa true}{from-ani}@{domain}> Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted June 13, 2017 Report Share Posted June 13, 2017 The first problem I see here is that you need to handle true and false cases. Otherwise you will end up with "Whatever" <sip:anonymous@anonymous.invalid123456@domain.com>. I think it makes sense to include the general purpose parameters that are available for extensions and also other accounts. We will call them {ext-param1-3} in the next build. Then you can put whatever you like in there and reference it when building the header. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted June 13, 2017 Author Report Share Posted June 13, 2017 I like this!!! To clarify will you be adding {ext-param1-3} to each extension or to the domain? Edit: Perhaps a {dom-param1-3} would be useful as well. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted June 13, 2017 Report Share Posted June 13, 2017 Yes domain-paramX also makes sense! Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted June 14, 2017 Author Report Share Posted June 14, 2017 Yes domain-paramX also makes sense! This is great to have the variables exposed. Will we also be able to do logical tests on the variables so we can change the header accordingly? For example using {if clip true} checks if the variable clip is true allowing us to return a different value if variable clip is set to true or false. Maybe something like {if ext-param1 isblank} or would it be as simple as {if ext-param1 ""} to make a string comparison with "" meaning a null value. I prefer the later as it is more flexible and allows not only checking if a variable is null but also if it is equal to a value. For example in the below statement we are checking if the ext-param1 field has been populated for an extension making a call. If the variable has a non blank value the system would return {ext-parm1} else it would return {domain-display}. {if ext-param1 isblank}"{domain-display}""{ext-param1}" <sip:{if clip true}anonymous@anonymous.invalid{fi clip true}{if disa true}{ext-ani}@{domain}{fi disa true}{from-ani}@{domain}> Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted June 15, 2017 Report Share Posted June 15, 2017 Yes you can combine that with conditional statements. If you want to compare with empty string, you can use {if ext-param1}, because the argument is missing and evaluate to "". There is actually no quoting there. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted June 15, 2017 Author Report Share Posted June 15, 2017 This is really great news!!! Thank you for considering my request and implementing it so quickly. So is it possible we could see this in v58 or 59? My background is in programming so I understand that features can be delayed due to unforeseen factors. Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted June 15, 2017 Report Share Posted June 15, 2017 It is included in all builds made after 6/14/17, also the latest 57.4 builds. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted June 15, 2017 Author Report Share Posted June 15, 2017 Wow. That was fast. Thank you. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted November 30, 2017 Author Report Share Posted November 30, 2017 I was looking for this in V59.0 and don't see it. Just wondering if it is still planned for a future release? Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted November 30, 2017 Report Share Posted November 30, 2017 This should be in 59.0. Where should this be?! Just use it? Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted December 1, 2017 Author Report Share Posted December 1, 2017 Where are they located to put values in them,? I would expect the dom-param1-3 to be on the General Settings for the domain and ext-param1-3 to be somewhere on the General tab for each extension. I do not see them anywhere. I am running 59.0 with build date of Oct 7 2017 03:01:21 Quote Link to comment Share on other sites More sharing options...
Support Posted December 1, 2017 Report Share Posted December 1, 2017 Have you checked the "registration" tab under extensions? Is that you were referring to? Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted December 1, 2017 Author Report Share Posted December 1, 2017 I have looked everywhere. Even the documentation. The Parameter 1, Parameter 2 and Parameter 3 fields under the registration tab have been there since at least 5.5.0 therefore I can't see how they would be related to a feature put in in v58. Other than being the person who requested the feature I know nothing else about it that what has been presented it this thread. Would it be possible to check with the engineer who added the feature as to how the new feature works? Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted December 1, 2017 Report Share Posted December 1, 2017 Should be in https://vodia.com/doc/trunk_custom_headers search for "param1-3"? The parameter values for the extension are in the dom_ext3.htm tab, and for the domain they are, well is that what you are looking for? ... Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted December 3, 2017 Author Report Share Posted December 3, 2017 That is what I am looking for. I was unaware that the Parameter 1 thru 3 on the registration page were being used for this because the documentation says the following and makes no reference at all to them being accessible for use in custom trunk headers. Parameters 1 through 3: Parameters 1 through 3 allow you to configure fixed values that can be used in conjunction with the "External Voicemail System" setting at the domain level. Without using these parameter settings, using a value of 7$u in the "External Voicemail System" setting tells the PBX to prefix the user name (number) with a "7" before sending it to an external voicemail system. If you prefer to set a fixed value (e.g., 555) for the user name, set one of the parameters to a specific extension (e.g., 555) and link it to the "External Voicemail System" setting by entering 7$1 (if using parameter 1) into the "External Voicemail System" setting. The PBX will then use 7555 for the ANI. These Parameter settings can also be used during the dial plan replacement operation. By default, the PBX uses "\r" in the dial plan replacement to substitute "trunk registrar." Similarly, you can use "\x" to use the value set in Parameter 1, "\y" to use the value set in Parameter 2, and "\z" to use the value set in Parameter 3. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted December 6, 2017 Author Report Share Posted December 6, 2017 Would it be possible to provide a link to the documentation explaining this feature in v59.0? I have a few customers that would benefit from this feature. Quote Link to comment Share on other sites More sharing options...
Support Posted December 6, 2017 Report Share Posted December 6, 2017 Hi, Did you try to use these variables from the registration tab anyway? We are in middle of changing the documentation as well, maybe we will change this too. Quote Link to comment Share on other sites More sharing options...
ahennis@voicespring.net Posted December 6, 2017 Author Report Share Posted December 6, 2017 I have not tried yet. This was a feature that I requested and I was just looking at how to use it. I was specifically looking for the global variables (domain-parm1-3). I saw the variables were added to be used in the custom trunk header documentation on the wiki but I did not see anywhere in the wiki of the PBX GUI where I could populate the variables with values. My understanding of the feature was that there would be 3 new fields on the Advanced|General Settings page of the domain where I could populate the variables with values. There was also supposed to be 3 new fields added for each extension where I could populate the variables with values. I am looking forward to using this feature and am thankful it was added. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.