Gateway.OutboundParams Property

Status
Not open for further replies.

pat71

Joined
Mar 17, 2016
Messages
40
Reaction score
0
Hi,

Any one knows how to use Gateway. OutboundParams Property to change SIP string.

Many thanks,
 
Hi there,

That property returns an array of "TCX.Configuration.GatewayParameterBinding". You can iterate the array until you find the property you need to change, and then change the object accordingly.

It is suggested that you debug it with Visual Studio, so you see the properties values, and you know how to identify each parameter.

Kind regards.
 
Hi there,

That property returns an array of "TCX.Configuration.GatewayParameterBinding". You can iterate the array until you find the property you need to change, and then change the object accordingly.

It is suggested that you debug it with Visual Studio, so you see the properties values, and you know how to identify each parameter.

Kind regards.

Hi,
I did that, but it just dos not want to save the changes I want to change UserFromPart and I want it to be save and reflected in the PBX setting. Is that possible.

Code:
 foreach (var rct in ps.GetGateways())
//                                    {
//                                        rct.OutboundCallerID = "0842003325";
//                                        rct.Save();
                                    
//                                        foreach (var x in rct.OutboundParams)
//                                        {
                                        
//                                            if (x.Param.Name.ToString() == "FromUserPart")
//                                            {
//                                               // if (Code.GetExtCallerIDsettingByMexMobile(args[3]))
//                                                    x.Value = x.Param.PossibleValuesAsOutbound[2];
                                            
//                                                //else
//                                               // {
//                                                 //   x.Value = x.Param.PossibleValuesAsOutbound[0];
//                                               // }
//                           
//                                                rct.Save();
//                                                x.Value = x.Param.PossibleValuesAsOutbound[2];
//                                                rct.Save();
//                                             
//                                            }
//                                        }
//                                    }

Is that the right way?

Thanks for your help.
 
Hello, you code is all commented out. Is that how you have it? In that case the code might not be executing at all...

Kind regards.
 
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,889
Members
165,470
Latest member
Robert Lee