<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://ss7api.null.ro/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ss7api.null.ro/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Monica</id>
		<title>ss7api.null.ro - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://ss7api.null.ro/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Monica"/>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Special:Contributions/Monica"/>
		<updated>2026-04-27T17:48:30Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>https://ss7api.null.ro/index.php/RegisterSS</id>
		<title>RegisterSS</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/RegisterSS"/>
				<updated>2019-10-03T14:36:04Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:registerSS}}&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
This message is sent to a HLR to register a Supplementary Service for a Mobile Station&lt;br /&gt;
&lt;br /&gt;
==Addressing==&lt;br /&gt;
&lt;br /&gt;
The TCAP dialog userInformation is used for identifying the subscriber. The destinationReference parameter will normally hold the IMSI as a land-mobile international number.&lt;br /&gt;
&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
* '''ss-Code''' – code of the Supplementary Service&lt;br /&gt;
* ''basicService'' – Affected bearer or teleservice, one of:&lt;br /&gt;
** bearer – Affected bearer&lt;br /&gt;
** service – Affected service&lt;br /&gt;
* ''forwardedToNumber'' – Number to which the service will be diverted&lt;br /&gt;
* ''forwardedToSubaddress'' – Subaddress to which the service will be diverted&lt;br /&gt;
* ''noReplyConditionTime'' – How long until a &amp;quot;no answer&amp;quot; condition is declared, 5 to 30&lt;br /&gt;
* ''defaultPriority'' – Priority of the service, 0 to 15&lt;br /&gt;
* ''nbrUser'' - is sent  to register the MC maximum number of user defined circuit switched bearers to be used.&lt;br /&gt;
* ''longFTN-Supported'' - indicates that the mobile station supports Long Forwarded-to Numbers.&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
The set of parameters in the result depends on the invoke parameters, can be one of:&lt;br /&gt;
*forwardingInfo – information about call forwarding&lt;br /&gt;
**''ss-Code'' – code of the Supplementary Service&lt;br /&gt;
**'''forwardingFeatureList''' – list of forwarding features:&lt;br /&gt;
***forwardingFeature – represents the information about each combination of a basic service and call forwarding service. It is a list of the following parameters:&lt;br /&gt;
****basicService – bearer or teleservice&lt;br /&gt;
****ss-Status&lt;br /&gt;
****forwardedToNumber&lt;br /&gt;
****forwardedToSubaddress&lt;br /&gt;
****forwardingOptions&lt;br /&gt;
****noReplyConditionTime&lt;br /&gt;
****extensionContainer&lt;br /&gt;
****longForwardedToNumber &lt;br /&gt;
*callBarringInfo – information about a call barring service:&lt;br /&gt;
**''ss-Code'' – code for supplementary service&lt;br /&gt;
**'''callBarringFeatureList''' – list of call barring features parameters:&lt;br /&gt;
***ext-CallBarFeature – this gives the status of call barring services as they are applicable to the basic service:&lt;br /&gt;
****''basicService'' – the bearer or teleservice&lt;br /&gt;
****'''ss-Status''' – state information of individual supplementary services, see [[interrogateSS]] description.&lt;br /&gt;
****''extensionContainer''&lt;br /&gt;
**''extensionContainer''&lt;br /&gt;
*cug-Info – refers to the information required for the operation of each CUG (Closed User Group):&lt;br /&gt;
**'''cug-SubscriptionList''' – list of CUG subscriptions:&lt;br /&gt;
***cug-Subscription – set of information for each CUG defined in the subscription. Contains the following parameters:&lt;br /&gt;
****'''cug-Index''' – CUG index defined in ETS 300 138.&lt;br /&gt;
****'''cug-Interlock''' – CUG interlock code defined in ETS 300 138.&lt;br /&gt;
****'''intraCUG-Options''' – describes whether or not the subscriber is allowed to originate/to receive calls to/from withing the CUG. It has one of the following values:&lt;br /&gt;
*****noCUG-Restrictions – no restrictions&lt;br /&gt;
*****cugIC-CallBarred – incoming CUG calls are barred&lt;br /&gt;
*****cugOG-CallBarred – outgoing CUG calls are barred&lt;br /&gt;
****''basicServiceGroupList'' – list of basic services&lt;br /&gt;
*****basicService&lt;br /&gt;
****''extensionContainer''&lt;br /&gt;
**''cug-FeatureList'' – sequence of CUG features:&lt;br /&gt;
***cug-Feature – specifies parameters that are to be associated with the Basic Service Group. If the Basic Service is missing, the feature applies to all Basic Services.&lt;br /&gt;
****''basicService'' – the basic Service to which the feature applies&lt;br /&gt;
****'''preferentialCUG-Indicator''' – indicates which CUG indes is to be used at an outgoing call setup using the Basic Service Group&lt;br /&gt;
****'''interCUG-Restrictions''' – indicates whether if for the specified Basic Service Group outgoing and incoming call are allowed. It can have one of the following values:&lt;br /&gt;
*****CUG-only – calls only within the CUG are allowed&lt;br /&gt;
*****CUG-outgoing-access – calls outside the CUG are allowed&lt;br /&gt;
*****CUG-incoming-access – calls coming from outside the CUG are allowed&lt;br /&gt;
*****CUG-both – both incoming and outgoing calls are allowed&lt;br /&gt;
****''extensionContainer''&lt;br /&gt;
**''extensionContainer''&lt;br /&gt;
*ss-Data – Supplementary Service data&lt;br /&gt;
**'''ss-Code''' – code of the Supplementary Service&lt;br /&gt;
**'''ss-Status''' – state information of individual Supplementary Services, see [[interrogateSS]] description.&lt;br /&gt;
**''ss-SubscriptionOption'' – specifies an option attached to the supplementary service. It is a choice between:&lt;br /&gt;
***cliRestrictionOption – refers to the Restriction mode attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
****permanent&lt;br /&gt;
****temporaryDefaultRestricted&lt;br /&gt;
****temporaryDefaultAllowed&lt;br /&gt;
***overrideCategory - specifies the Override Category option attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
****overrideEnabled&lt;br /&gt;
****overrideDisabled&lt;br /&gt;
**''basicServiceGroupList'' – list of:&lt;br /&gt;
***basicService – bearer or teleservice&lt;br /&gt;
**''extensionContainer''&lt;br /&gt;
*emlpp-Info – specifies data associated with the eMLPP service. It has the following parameters:&lt;br /&gt;
**'''maximumentitledPriority''' – indicates the highest priority a subscriber is allowed to apply to an outgoing call setup.&lt;br /&gt;
**'''defaultPriority''' – defines the priority level that should be assigned if no explicit priority is indicated during call setup.&lt;br /&gt;
**''extensionContainer''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
 &amp;lt;component remoteCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;registerSS&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;ss-Code&amp;gt;plmn-specificSS-D&amp;lt;/ss-Code&amp;gt;&lt;br /&gt;
 &amp;lt;/component&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* ETSI TS 100 974 V7.15.0 (2004-03) p1076&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/DeactivateSS</id>
		<title>DeactivateSS</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/DeactivateSS"/>
				<updated>2019-10-03T14:35:29Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:deactivateSS}}&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
This message is sent to a HLR to deactivate a Supplementary Service from a MSC via a VLR.&lt;br /&gt;
&lt;br /&gt;
==Addressing==&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
* '''ss-Code''' – the code of the supplementary service to be deactivated.&lt;br /&gt;
* ''basicService'' – indicates for which basic service group the supplementary service should be deactivated. If not included, the deactivation request applies to all basic services. It's a choice between:&lt;br /&gt;
** bearerService – affected bearer&lt;br /&gt;
** teleservice – affected service&lt;br /&gt;
* ''longFTN-Supported'' - indicates that the mobile station supports Long Forwarded-to Numbers.&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
&lt;br /&gt;
The set of parameters in the result depends on the invoke parameters, can be one of:&lt;br /&gt;
&lt;br /&gt;
* forwardingInfo – information about call forwarding&lt;br /&gt;
** ''ss-Code'' – code of the Supplementary Service&lt;br /&gt;
** forwardingFeatureList – list of forwarding features:&lt;br /&gt;
*** forwardingFeature – represents the information about each combination of a basic service and call forwarding service. It is a list of the following parameters:&lt;br /&gt;
**** ''basicService'' – bearer or teleservice&lt;br /&gt;
**** ''ss-Status''&lt;br /&gt;
**** ''forwardedToNumber''&lt;br /&gt;
**** ''forwardedToSubaddress''&lt;br /&gt;
**** ''forwardingOptions''&lt;br /&gt;
**** ''noReplyConditionTime''&lt;br /&gt;
**** ''extensionContainer''&lt;br /&gt;
**** ''longForwardedToNumber''&lt;br /&gt;
* callBarringInfo – information about a call barring service:&lt;br /&gt;
** ss-Code – code for supplementary service&lt;br /&gt;
** callBarringFeatureList – list of call barring features parameters:&lt;br /&gt;
*** ext-CallBarFeature – this gives the status of call barring services as they are applicable to the basic service:&lt;br /&gt;
**** ''basicService'' – the bearer or teleservice&lt;br /&gt;
**** ss-Status – state information of individual supplementary services, see [[interrogateSS]] description.&lt;br /&gt;
**** extensionContainer &lt;br /&gt;
** extensionContainer &lt;br /&gt;
* cug-Info – refers to the information required for the operation of each CUG (Closed User Group):&lt;br /&gt;
** cug-SubscriptionList – list of CUG subscriptions:&lt;br /&gt;
*** cug-Subscription – set of information for each CUG defined in the subscription. Contains the following parameters:&lt;br /&gt;
**** cug-Index – CUG index defined in ETS 300 138.&lt;br /&gt;
**** cug-Interlock – CUG interlock code defined in ETS 300 138.&lt;br /&gt;
**** intraCUG-Options – describes whether or not the subscriber is allowed to originate/to receive calls to/from within the CUG. It has one of the following values:&lt;br /&gt;
***** noCUG-Restrictions – no restrictions&lt;br /&gt;
***** cugIC-CallBarred – incoming CUG calls are barred&lt;br /&gt;
***** cugOG-CallBarred – outgoing CUG calls are barred&lt;br /&gt;
**** basicServiceGroupList – list of basic services&lt;br /&gt;
***** basicService&lt;br /&gt;
**** extensionContainer&lt;br /&gt;
** cug-FeatureList – sequence of CUG features:&lt;br /&gt;
*** cug-Feature – specifies parameters that are to be associated with the Basic Service Group. If the Basic Service is missing, the feature applies to all Basic Services.&lt;br /&gt;
**** ''basicService'' – the basic Service to which the feature applies&lt;br /&gt;
**** preferentialCUG-Indicator – indicates which CUG indes is to be used at an outgoing call setup using the Basic Service Group&lt;br /&gt;
**** interCUG-Restrictions – indicates whether if for the specified Basic Service Group outgoing and incoming call are allowed. It can have one of the following values:&lt;br /&gt;
***** CUG-only – calls only within the CUG are allowed&lt;br /&gt;
***** CUG-outgoing-access – calls outside the CUG are allowed&lt;br /&gt;
***** CUG-incoming-access – calls coming from outside the CUG are allowed&lt;br /&gt;
***** CUG-both – both incoming and outgoing calls are allowed&lt;br /&gt;
**** extensionContainer &lt;br /&gt;
** extensionContainer&lt;br /&gt;
* ss-Data – Supplementary Service data&lt;br /&gt;
** ss-Code – code of the Supplementary Service&lt;br /&gt;
** ss-Status – state information of individual Supplementary Services, see [[interrogateSS]] description.&lt;br /&gt;
** ''ss-SubscriptionOption'' – specifies an option attached to the supplementary service. It is a choice between:&lt;br /&gt;
*** cliRestrictionOption – refers to the Restriction mode attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
**** permanent&lt;br /&gt;
**** temporaryDefaultRestricted&lt;br /&gt;
**** temporaryDefaultAllowed&lt;br /&gt;
*** overrideCategory - specifies the Override Category option attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
**** overrideEnabled&lt;br /&gt;
**** overrideDisabled&lt;br /&gt;
** ''basicServiceGroupList'' – list of:&lt;br /&gt;
*** basicService – bearer or teleservice&lt;br /&gt;
** ''extensionContainer'' &lt;br /&gt;
* emlpp-Info – specifies data associated with the eMLPP service. It has the following parameters:&lt;br /&gt;
** maximumentitledPriority – indicates the highest priority a subscriber is allowed to apply to an outgoing call setup.&lt;br /&gt;
** defaultPriority – defines the priority level that should be assigned if no explicit priority is indicated during call setup.&lt;br /&gt;
** extensionContainer&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;component localCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;deactivateSS&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;ss-Code&amp;gt;allCallOfferingSS&amp;lt;/ss-Code&amp;gt;&lt;br /&gt;
       &amp;lt;basicService&amp;gt;&lt;br /&gt;
               &amp;lt;teleservice&amp;gt;automaticFacsimileGroup3&amp;lt;/teleservice&amp;gt;&lt;br /&gt;
       &amp;lt;/basicService&amp;gt;&lt;br /&gt;
 &amp;lt;/component&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* ETSI TS 100 974 V7.15.0 (2004-03) p1078&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/ActivateSS</id>
		<title>ActivateSS</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/ActivateSS"/>
				<updated>2019-10-03T14:35:03Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:activateSS}}&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
This message is sent to a HLR to activate a supplementary service from a MSC via a VLR.&lt;br /&gt;
&lt;br /&gt;
==Addressing==&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
* '''ss-Code''' – the code of the supplementary service to be activated&lt;br /&gt;
&lt;br /&gt;
* '''basicService''' – indicates for which basic service group the supplemtary service should be activated. If not included, the activation request applies to all basic services. It's a choice between:&lt;br /&gt;
** bearerService – affected bearer&lt;br /&gt;
** teleservice – affected service&lt;br /&gt;
&lt;br /&gt;
* ''longFTN-Supported'' - indicates that the mobile station supports Long Forwarded-to Numbers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
&lt;br /&gt;
The set of parameters in the result depends on the invoke parameters, can be one of:&lt;br /&gt;
&lt;br /&gt;
* forwardingInfo – information about call forwarding&lt;br /&gt;
** ''ss-Code'' – code of the Supplementary Service&lt;br /&gt;
** forwardingFeatureList – list of forwarding features:&lt;br /&gt;
*** forwardingFeature – represents the information about each combination of a basic service and call forwarding service. It is a list of the following parameters:&lt;br /&gt;
**** ''basicService'' – bearer or teleservice&lt;br /&gt;
**** ''ss-Status''&lt;br /&gt;
**** ''forwardedToNumber''&lt;br /&gt;
**** ''forwardedToSubaddress''&lt;br /&gt;
**** ''forwardingOptions''&lt;br /&gt;
**** ''noReplyConditionTime''&lt;br /&gt;
**** ''extensionContainer''&lt;br /&gt;
**** ''longForwardedToNumber''&lt;br /&gt;
* callBarringInfo – information about a call barring service:&lt;br /&gt;
** ss-Code – code for supplementary service&lt;br /&gt;
** callBarringFeatureList – list of call barring features parameters:&lt;br /&gt;
*** ext-CallBarFeature – this gives the status of call barring services as they are applicable to the basic service:&lt;br /&gt;
**** ''basicService'' – the bearer or teleservice&lt;br /&gt;
**** ss-Status – state information of individual supplementary services, see [[interrogateSS]] description.&lt;br /&gt;
**** ''extensionContainer''&lt;br /&gt;
** extensionContainer &lt;br /&gt;
* cug-Info – refers to the information required for the operation of each CUG (Closed User Group):&lt;br /&gt;
** cug-SubscriptionList – list of CUG subscriptions:&lt;br /&gt;
*** cug-Subscription – set of information for each CUG defined in the subscription. Contains the following parameters:&lt;br /&gt;
**** cug-Index – CUG index defined in ETS 300 138.&lt;br /&gt;
**** cug-Interlock – CUG interlock code defined in ETS 300 138.&lt;br /&gt;
**** intraCUG-Options – describes whether or not the subscriber is allowed to originate/to receive calls to/from within the CUG. It has one of the following values:&lt;br /&gt;
***** noCUG-Restrictions – no restrictions&lt;br /&gt;
***** cugIC-CallBarred – incoming CUG calls are barred&lt;br /&gt;
***** cugOG-CallBarred – outgoing CUG calls are barred&lt;br /&gt;
**** basicServiceGroupList – list of basic services&lt;br /&gt;
***** basicService&lt;br /&gt;
**** extensionContainer&lt;br /&gt;
** cug-FeatureList – sequence of CUG features:&lt;br /&gt;
*** cug-Feature – specifies parameters that are to be associated with the Basic Service Group. If the Basic Service is missing, the feature applies to all Basic Services.&lt;br /&gt;
**** ''basicService'' – the basic Service to which the feature applies&lt;br /&gt;
**** preferentialCUG-Indicator – indicates which CUG indes is to be used at an outgoing call setup using the Basic Service Group&lt;br /&gt;
**** interCUG-Restrictions – indicates whether if for the specified Basic Service Group outgoing and incoming call are allowed. It can have one of the following values:&lt;br /&gt;
***** CUG-only – calls only within the CUG are allowed&lt;br /&gt;
***** CUG-outgoing-access – calls outside the CUG are allowed&lt;br /&gt;
***** CUG-incoming-access – calls coming from outside the CUG are allowed&lt;br /&gt;
***** CUG-both – both incoming and outgoing calls are allowed&lt;br /&gt;
**** ''extensionContainer''&lt;br /&gt;
** extensionContainer&lt;br /&gt;
* ss-Data – Supplementary Service data&lt;br /&gt;
** ss-Code – code of the Supplementary Service&lt;br /&gt;
** ss-Status – state information of individual Supplementary Services, see [[interrogateSS]] description.&lt;br /&gt;
** ''ss-SubscriptionOption'' – specifies an option attached to the supplementary service. It is a choice between:&lt;br /&gt;
*** cliRestrictionOption – refers to the Restriction mode attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
**** permanent&lt;br /&gt;
**** temporaryDefaultRestricted&lt;br /&gt;
**** temporaryDefaultAllowed&lt;br /&gt;
*** overrideCategory - specifies the Override Category option attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
**** overrideEnabled&lt;br /&gt;
**** overrideDisabled&lt;br /&gt;
** ''basicServiceGroupList'' – list of:&lt;br /&gt;
*** basicService – bearer or teleservice&lt;br /&gt;
** extensionContainer &lt;br /&gt;
* emlpp-Info – specifies data associated with the eMLPP service. It has the following parameters:&lt;br /&gt;
** maximumentitledPriority – indicates the highest priority a subscriber is allowed to apply to an outgoing call setup.&lt;br /&gt;
** defaultPriority – defines the priority level that should be assigned if no explicit priority is indicated during call setup.&lt;br /&gt;
** ''extensionContainer''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;component localCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;activateSS&amp;quot;&amp;gt;&lt;br /&gt;
    	&amp;lt;ss-Code&amp;gt;allCallOfferingSS&amp;lt;/ss-Code&amp;gt;&lt;br /&gt;
     	&amp;lt;basicService&amp;gt;&lt;br /&gt;
       	&amp;lt;teleservice&amp;gt;automaticFacsimileGroup3&amp;lt;/teleservice&amp;gt;&lt;br /&gt;
     	&amp;lt;/basicService&amp;gt;&lt;br /&gt;
  &amp;lt;/component&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* ETSI TS 100 974 V7.15.0 (2004-03) p1077&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/EraseSS</id>
		<title>EraseSS</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/EraseSS"/>
				<updated>2019-10-03T14:34:19Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:eraseSS}}&lt;br /&gt;
==Usage==&lt;br /&gt;
This message is sent to a HLR to erase data related to a Supplementary Service from a MSC via a VLR.&lt;br /&gt;
==Addressing==&lt;br /&gt;
...&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
* '''ss-Code''' – the code of the supplementary service to be erased&lt;br /&gt;
&lt;br /&gt;
* ''basicService'' – indicates for which basic service group the supplemtary service should be erased. If not included, the erasure request applies to all basic services. It's a choice between:&lt;br /&gt;
** bearerService – affected bearer&lt;br /&gt;
** teleservice – affected service&lt;br /&gt;
&lt;br /&gt;
* ''longFTN-Supported'' - indicates that the mobile station supports Long Forwarded-to Numbers.&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
&lt;br /&gt;
The set of parameters in the result depends on the invoke parameters, can be one of:&lt;br /&gt;
&lt;br /&gt;
* forwardingInfo – information about call forwarding&lt;br /&gt;
** ''ss-Code'' – code of the Supplementary Service&lt;br /&gt;
** forwardingFeatureList – list of forwarding features:&lt;br /&gt;
*** forwardingFeature – represents the information about each combination of a basic service and call forwarding service. It is a list of the following parameters:&lt;br /&gt;
**** ''basicService'' – bearer or teleservice&lt;br /&gt;
**** ''ss-Status''&lt;br /&gt;
**** ''forwardedToNumber''&lt;br /&gt;
**** ''forwardedToSubaddress''&lt;br /&gt;
**** ''forwardingOptions''&lt;br /&gt;
**** ''noReplyConditionTime''&lt;br /&gt;
**** ''extensionContainer''&lt;br /&gt;
**** ''longForwardedToNumber''&lt;br /&gt;
* callBarringInfo – information about a call barring service:&lt;br /&gt;
** ss-Code – code for supplementary service&lt;br /&gt;
** callBarringFeatureList – list of call barring features parameters:&lt;br /&gt;
*** ext-CallBarFeature – this gives the status of call barring services as they are applicable to the basic service:&lt;br /&gt;
**** ''basicService'' – the bearer or teleservice&lt;br /&gt;
**** ''ss-Status'' – state information of individual supplementary services, see [[interrogateSS]] description.&lt;br /&gt;
**** ''extensionContainer'' &lt;br /&gt;
** ''extensionContainer ''&lt;br /&gt;
&lt;br /&gt;
* cug-Info – refers to the information required for the operation of each CUG (Closed User Group):&lt;br /&gt;
** cug-SubscriptionList – list of CUG subscriptions:&lt;br /&gt;
*** cug-Subscription – set of information for each CUG defined in the subscription. Contains the following parameters:&lt;br /&gt;
**** cug-Index – CUG index defined in ETS 300 138.&lt;br /&gt;
**** cug-Interlock – CUG interlock code defined in ETS 300 138.&lt;br /&gt;
**** intraCUG-Options – describes whether or not the subscriber is allowed to originate/to receive calls to/from withing the CUG. It has one of the following values:&lt;br /&gt;
***** noCUG-Restrictions – no restrictions&lt;br /&gt;
***** cugIC-CallBarred – incoming CUG calls are barred&lt;br /&gt;
***** cugOG-CallBarred – outgoing CUG calls are barred&lt;br /&gt;
**** basicServiceGroupList – list of basic services&lt;br /&gt;
***** basicService&lt;br /&gt;
**** extensionContainer&lt;br /&gt;
** cug-FeatureList – sequence of CUG features:&lt;br /&gt;
*** cug-Feature – specifies parameters that are to be associated with the Basic Service Group. If the Basic Service is missing, the feature applies to all Basic Services.&lt;br /&gt;
**** ''basicService'' – the basic Service to which the feature applies&lt;br /&gt;
**** preferentialCUG-Indicator – indicates which CUG indes is to be used at an outgoing call setup using the Basic Service Group&lt;br /&gt;
**** interCUG-Restrictions – indicates whether if for the specified Basic Service Group outgoing and incoming call are allowed. It can have one of the following values:&lt;br /&gt;
***** CUG-only – calls only within the CUG are allowed&lt;br /&gt;
***** CUG-outgoing-access – calls outside the CUG are allowed&lt;br /&gt;
***** CUG-incoming-access – calls coming from outside the CUG are allowed&lt;br /&gt;
***** CUG-both – both incoming and outgoing calls are allowed&lt;br /&gt;
**** extensionContainer &lt;br /&gt;
** extensionContainer&lt;br /&gt;
&lt;br /&gt;
* ss-Data – Supplementary Service data&lt;br /&gt;
** ss-Code – code of the Supplementary Service&lt;br /&gt;
** ss-Status – state information of individual Supplementary Services, see [[InterrogateSS]] description.&lt;br /&gt;
** ''ss-SubscriptionOption'' – specifies an option attached to the supplementary service. It is a choice between:&lt;br /&gt;
*** cliRestrictionOption – refers to the Restriction mode attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
*** permanent&lt;br /&gt;
**** temporaryDefaultRestricted&lt;br /&gt;
**** temporaryDefaultAllowed&lt;br /&gt;
*** overrideCategory - specifies the Override Category option attached to the supplementary service. It can have one of the following values:&lt;br /&gt;
**** overrideEnabled&lt;br /&gt;
**** overrideDisabled&lt;br /&gt;
** ''basicServiceGroupList'' – list of:&lt;br /&gt;
*** basicService – bearer or teleservice&lt;br /&gt;
** ''extensionContainer'' &lt;br /&gt;
&lt;br /&gt;
* emlpp-Info – specifies data associated with the eMLPP service. It has the following parameters:&lt;br /&gt;
** maximumentitledPriority – indicates the highest priority a subscriber is allowed to apply to an outgoing call setup.&lt;br /&gt;
** defaultPriority – defines the priority level that should be assigned if no explicit priority is indicated during call setup.&lt;br /&gt;
** ''extensionContainer''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;component remoteCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;eraseSS&amp;quot;&amp;gt;&lt;br /&gt;
     	&amp;lt;ss-Code&amp;gt;plmn-specificSS-A&amp;lt;/ss-Code&amp;gt;&lt;br /&gt;
     	&amp;lt;basicService&amp;gt;&lt;br /&gt;
       	&amp;lt;bearerService&amp;gt;general-dataPDS&amp;lt;/bearerService&amp;gt;&lt;br /&gt;
     	&amp;lt;/basicService&amp;gt;&lt;br /&gt;
  &amp;lt;/component&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
* ETSI TS 100 974 V7.15.0 (2004-03) p1076&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Main_Page"/>
				<updated>2013-12-16T12:32:56Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==YATE's TCAP XML Interface==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Note! I believe this page should hold a guide on what this website offers, not technical info as it currently does. --&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The purpose of this document is to describe the XML based protocol used to implement communication between TCAP and the application servers for mobile services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MAP (Mobile Application Part) and CAMEL (Customized Application of Mobile Enhanced Logic) are SS7 protocols used for authentication, registration, messaging, call control and billing in mobile networks. Both protocols are based on TCAP (Transaction Capabilities Application Part) which is a transaction oriented protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This protocol aims to map the structure of MAP and CAMEL messages and messageless TCAP primitives on XML messages as transparently as possible. However, some concepts of the TCAP layer will reflect in the message flow and in some of the parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each communication between two network elements happens inside a dialog created by the first message. Multiple components can exist inside the dialog, each with its own direction and timing. The dialog is ended normally when the last component finished exchanging data. The correlation of simultaneously happening dialogs and components is done using unique identifiers. Dialogs hold a local ID and a remote ID. Each such ID must be unique per communication endpoint.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Components also hold an ID inside the dialog. Each such ID must be unique per component and direction. It is important to note that same numeric ID may be used for components invoked from the opposing sides of the connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following picture shows a transaction with two components: &lt;br /&gt;
&lt;br /&gt;
[[File:tcap_transaction.png]]&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/MSC_simulator</id>
		<title>MSC simulator</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/MSC_simulator"/>
				<updated>2013-10-28T11:57:10Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* call.execute handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This module simulates the call related features of a CAMEL capable MSC.&lt;br /&gt;
&lt;br /&gt;
In particular the module implements the Basic Call Machine State described by the CAMEL standards.&lt;br /&gt;
&lt;br /&gt;
The module does not store the CAMEL subscription, instead it expects any subscription information to be provided in the inbound call routing parameters.&lt;br /&gt;
&lt;br /&gt;
==BCSM Module Configuration==&lt;br /&gt;
The configuration file is '''camel_bcsm.conf'''.&lt;br /&gt;
Sections:&lt;br /&gt;
===[general]===&lt;br /&gt;
Unless explicitly specified, all parameters in this section are applied on reload for new calls only.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* '''application''': string: Application parameter in camel messages sent by the module&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''camel_phase''': integer: CAMEL phase to use&lt;br /&gt;
Allowed values: 1, 2, 3, 4&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 4&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''servicekey''': integer: CAMEL serviceKey parameter to be set in initialDP messages&lt;br /&gt;
Allowed interval: 0..2147483647&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''msc_address''': string: The mscAddress parameter to be set when sending initialDP&lt;br /&gt;
* '''msc_address_plan''': string: MSC address numbering plan. Values: unknown, isdn, data, telex, land-mobile, isdn-mobile, national, private, extension-reserved&lt;br /&gt;
* '''msc_address_nature''': string: MSC address number nature. Values: unknown, international, national, network-specific, subscriber, reserved, abbreviated, extension-reserved&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handlin]])&lt;br /&gt;
&lt;br /&gt;
* '''default_call_handling_continue''': boolean: Continue operation when an error occurs&lt;br /&gt;
Defaults to enable&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handlin]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer''': integer: Application timer (milliseconds) for non user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval is used when call processing is suspended and no user interaction is expected, e.g. an event was notified to SCP and we are waiting for instructions&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 1000..20000 (1..20s)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000 (3 seconds)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer_user''': integer: Application timer (milliseconds) for user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval id used when call processing is suspended and user interaction is expected, e.g. a disconnectForwardConnection (disconnect a temporary leg) was received from SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 60000..1800000 (1..30min)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 180000 (3 minutes)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''report_etc_failed_timer''': integer: The interval in milliseconds to report failure for temporary calls started on Establish Temporary Connection requests&lt;br /&gt;
Failure will be reported if the SRF terminates the call within this interval&amp;lt;br/&amp;gt;&lt;br /&gt;
If no failure is reported the controlling SCF (which has its own timer) will treat the request as succeeded&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_busy_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'busy' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_busy_reason the 'busy' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^busy$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_noanswer_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'no answer' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_noanswer_reason the 'no answer' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^noanswer$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''export_xml_as''': string: Specify in which way the XML will be passed along into camel messages. Allowed values are:&lt;br /&gt;
** string: pass the XML as a string&amp;lt;br/&amp;gt;&lt;br /&gt;
** object: pass the XML as an object&amp;lt;br/&amp;gt;&lt;br /&gt;
** both: pass the XML as a string and object&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to object&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_xml''': boolean/string: Instruct the module to print sent/received xml components. Allowed values are:&lt;br /&gt;
** boolean true: Print xml on single line&lt;br /&gt;
** boolean false: Don't print xml&lt;br /&gt;
** verbose: Print xml children on separate lines&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to false&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_decoded''': boolean: Print decoded xml elements to output if debug is at level 10&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==BCSM Routing==&lt;br /&gt;
&lt;br /&gt;
===call.execute handling===&lt;br /&gt;
&lt;br /&gt;
An incoming call is routed to this module by adding a '''bcsm/''' prefix to target.&amp;lt;br/&amp;gt;&lt;br /&gt;
The prefix may be followed a call target to use when CAMEL SCF request to continue the call at initial DP, CAMEL SCF is not available (network failure) or initialDP fails:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1&lt;br /&gt;
&lt;br /&gt;
The following parameters (See [[#BCSM Configuration|BCSM Configuration]] for details) can be added when routing:&lt;br /&gt;
* servicekey&lt;br /&gt;
* default_call_handling_continue&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1;servicekey=2;default_call_handling_continue=false&lt;br /&gt;
&lt;br /&gt;
===Starting outgoing calls===&lt;br /&gt;
&lt;br /&gt;
When need to start an outgoing call (received ETC, ICA/CWA, CWA, CONT) the module will send ''call.preroute'', ''call.route'' and ''call.execute'' messages.&amp;lt;br/&amp;gt;&lt;br /&gt;
The ''call.preroute'' message is filled with initial ''call.execute'' message parameters and request parameters (the request may override initial parameters).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The following parameters are always replaced in the initial message:&lt;br /&gt;
* '''id''': Replaced by BCSM leg id&lt;br /&gt;
* '''module''': Replaced by BCSM module name&lt;br /&gt;
&lt;br /&gt;
When the initial call is continued, e.g. the call must be continued to initial called number, the call is routed if no target was specified in ''call.execute'' message, e.g. the call was initially routed to ''bcsm/''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Otherwise, a ''call.execute'' message is sent with initial target in ''callto'' parameter.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The preroute/route/execute messages are dispatched, e.g. the operation is done synchronously.&lt;br /&gt;
* When ICA/CWA is processed, the initial message parameters are replaced from ICA first and then from CWA request.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/MSC_simulator</id>
		<title>MSC simulator</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/MSC_simulator"/>
				<updated>2013-10-28T11:56:58Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* call.execute handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This module simulates the call related features of a CAMEL capable MSC.&lt;br /&gt;
&lt;br /&gt;
In particular the module implements the Basic Call Machine State described by the CAMEL standards.&lt;br /&gt;
&lt;br /&gt;
The module does not store the CAMEL subscription, instead it expects any subscription information to be provided in the inbound call routing parameters.&lt;br /&gt;
&lt;br /&gt;
==BCSM Module Configuration==&lt;br /&gt;
The configuration file is '''camel_bcsm.conf'''.&lt;br /&gt;
Sections:&lt;br /&gt;
===[general]===&lt;br /&gt;
Unless explicitly specified, all parameters in this section are applied on reload for new calls only.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* '''application''': string: Application parameter in camel messages sent by the module&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''camel_phase''': integer: CAMEL phase to use&lt;br /&gt;
Allowed values: 1, 2, 3, 4&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 4&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''servicekey''': integer: CAMEL serviceKey parameter to be set in initialDP messages&lt;br /&gt;
Allowed interval: 0..2147483647&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''msc_address''': string: The mscAddress parameter to be set when sending initialDP&lt;br /&gt;
* '''msc_address_plan''': string: MSC address numbering plan. Values: unknown, isdn, data, telex, land-mobile, isdn-mobile, national, private, extension-reserved&lt;br /&gt;
* '''msc_address_nature''': string: MSC address number nature. Values: unknown, international, national, network-specific, subscriber, reserved, abbreviated, extension-reserved&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handlin]])&lt;br /&gt;
&lt;br /&gt;
* '''default_call_handling_continue''': boolean: Continue operation when an error occurs&lt;br /&gt;
Defaults to enable&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handlin]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer''': integer: Application timer (milliseconds) for non user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval is used when call processing is suspended and no user interaction is expected, e.g. an event was notified to SCP and we are waiting for instructions&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 1000..20000 (1..20s)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000 (3 seconds)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer_user''': integer: Application timer (milliseconds) for user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval id used when call processing is suspended and user interaction is expected, e.g. a disconnectForwardConnection (disconnect a temporary leg) was received from SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 60000..1800000 (1..30min)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 180000 (3 minutes)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''report_etc_failed_timer''': integer: The interval in milliseconds to report failure for temporary calls started on Establish Temporary Connection requests&lt;br /&gt;
Failure will be reported if the SRF terminates the call within this interval&amp;lt;br/&amp;gt;&lt;br /&gt;
If no failure is reported the controlling SCF (which has its own timer) will treat the request as succeeded&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_busy_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'busy' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_busy_reason the 'busy' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^busy$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_noanswer_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'no answer' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_noanswer_reason the 'no answer' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^noanswer$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''export_xml_as''': string: Specify in which way the XML will be passed along into camel messages. Allowed values are:&lt;br /&gt;
** string: pass the XML as a string&amp;lt;br/&amp;gt;&lt;br /&gt;
** object: pass the XML as an object&amp;lt;br/&amp;gt;&lt;br /&gt;
** both: pass the XML as a string and object&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to object&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_xml''': boolean/string: Instruct the module to print sent/received xml components. Allowed values are:&lt;br /&gt;
** boolean true: Print xml on single line&lt;br /&gt;
** boolean false: Don't print xml&lt;br /&gt;
** verbose: Print xml children on separate lines&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to false&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_decoded''': boolean: Print decoded xml elements to output if debug is at level 10&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==BCSM Routing==&lt;br /&gt;
&lt;br /&gt;
===call.execute handling===&lt;br /&gt;
&lt;br /&gt;
An incoming call is routed to this module by adding a '''bcsm/''' prefix to target.\\&lt;br /&gt;
The prefix may be followed a call target to use when CAMEL SCF request to continue the call at initial DP, CAMEL SCF is not available (network failure) or initialDP fails:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1&lt;br /&gt;
&lt;br /&gt;
The following parameters (See [[#BCSM Configuration|BCSM Configuration]] for details) can be added when routing:&lt;br /&gt;
* servicekey&lt;br /&gt;
* default_call_handling_continue&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1;servicekey=2;default_call_handling_continue=false&lt;br /&gt;
&lt;br /&gt;
===Starting outgoing calls===&lt;br /&gt;
&lt;br /&gt;
When need to start an outgoing call (received ETC, ICA/CWA, CWA, CONT) the module will send ''call.preroute'', ''call.route'' and ''call.execute'' messages.&amp;lt;br/&amp;gt;&lt;br /&gt;
The ''call.preroute'' message is filled with initial ''call.execute'' message parameters and request parameters (the request may override initial parameters).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The following parameters are always replaced in the initial message:&lt;br /&gt;
* '''id''': Replaced by BCSM leg id&lt;br /&gt;
* '''module''': Replaced by BCSM module name&lt;br /&gt;
&lt;br /&gt;
When the initial call is continued, e.g. the call must be continued to initial called number, the call is routed if no target was specified in ''call.execute'' message, e.g. the call was initially routed to ''bcsm/''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Otherwise, a ''call.execute'' message is sent with initial target in ''callto'' parameter.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The preroute/route/execute messages are dispatched, e.g. the operation is done synchronously.&lt;br /&gt;
* When ICA/CWA is processed, the initial message parameters are replaced from ICA first and then from CWA request.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/MSC_simulator</id>
		<title>MSC simulator</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/MSC_simulator"/>
				<updated>2013-10-28T11:56:26Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* [general] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This module simulates the call related features of a CAMEL capable MSC.&lt;br /&gt;
&lt;br /&gt;
In particular the module implements the Basic Call Machine State described by the CAMEL standards.&lt;br /&gt;
&lt;br /&gt;
The module does not store the CAMEL subscription, instead it expects any subscription information to be provided in the inbound call routing parameters.&lt;br /&gt;
&lt;br /&gt;
==BCSM Module Configuration==&lt;br /&gt;
The configuration file is '''camel_bcsm.conf'''.&lt;br /&gt;
Sections:&lt;br /&gt;
===[general]===&lt;br /&gt;
Unless explicitly specified, all parameters in this section are applied on reload for new calls only.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* '''application''': string: Application parameter in camel messages sent by the module&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''camel_phase''': integer: CAMEL phase to use&lt;br /&gt;
Allowed values: 1, 2, 3, 4&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 4&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''servicekey''': integer: CAMEL serviceKey parameter to be set in initialDP messages&lt;br /&gt;
Allowed interval: 0..2147483647&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''msc_address''': string: The mscAddress parameter to be set when sending initialDP&lt;br /&gt;
* '''msc_address_plan''': string: MSC address numbering plan. Values: unknown, isdn, data, telex, land-mobile, isdn-mobile, national, private, extension-reserved&lt;br /&gt;
* '''msc_address_nature''': string: MSC address number nature. Values: unknown, international, national, network-specific, subscriber, reserved, abbreviated, extension-reserved&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handlin]])&lt;br /&gt;
&lt;br /&gt;
* '''default_call_handling_continue''': boolean: Continue operation when an error occurs&lt;br /&gt;
Defaults to enable&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[#call.execute handling|call.execute handlin]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer''': integer: Application timer (milliseconds) for non user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval is used when call processing is suspended and no user interaction is expected, e.g. an event was notified to SCP and we are waiting for instructions&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 1000..20000 (1..20s)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000 (3 seconds)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer_user''': integer: Application timer (milliseconds) for user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval id used when call processing is suspended and user interaction is expected, e.g. a disconnectForwardConnection (disconnect a temporary leg) was received from SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 60000..1800000 (1..30min)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 180000 (3 minutes)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''report_etc_failed_timer''': integer: The interval in milliseconds to report failure for temporary calls started on Establish Temporary Connection requests&lt;br /&gt;
Failure will be reported if the SRF terminates the call within this interval&amp;lt;br/&amp;gt;&lt;br /&gt;
If no failure is reported the controlling SCF (which has its own timer) will treat the request as succeeded&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_busy_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'busy' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_busy_reason the 'busy' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^busy$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_noanswer_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'no answer' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_noanswer_reason the 'no answer' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^noanswer$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''export_xml_as''': string: Specify in which way the XML will be passed along into camel messages. Allowed values are:&lt;br /&gt;
** string: pass the XML as a string&amp;lt;br/&amp;gt;&lt;br /&gt;
** object: pass the XML as an object&amp;lt;br/&amp;gt;&lt;br /&gt;
** both: pass the XML as a string and object&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to object&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_xml''': boolean/string: Instruct the module to print sent/received xml components. Allowed values are:&lt;br /&gt;
** boolean true: Print xml on single line&lt;br /&gt;
** boolean false: Don't print xml&lt;br /&gt;
** verbose: Print xml children on separate lines&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to false&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_decoded''': boolean: Print decoded xml elements to output if debug is at level 10&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==BCSM Routing==&lt;br /&gt;
&lt;br /&gt;
===call.execute handling===&lt;br /&gt;
&lt;br /&gt;
An incoming call is routed to this module by adding a '''bcsm/''' prefix to target.\\&lt;br /&gt;
The prefix may be followed a call target to use when CAMEL SCF request to continue the call at initial DP, CAMEL SCF is not available (network failure) or initialDP fails:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1&lt;br /&gt;
&lt;br /&gt;
The following parameters (See [[BCSM Configuration]] for details) can be added when routing:&lt;br /&gt;
* servicekey&lt;br /&gt;
* default_call_handling_continue&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1;servicekey=2;default_call_handling_continue=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting outgoing calls===&lt;br /&gt;
&lt;br /&gt;
When need to start an outgoing call (received ETC, ICA/CWA, CWA, CONT) the module will send ''call.preroute'', ''call.route'' and ''call.execute'' messages.&amp;lt;br/&amp;gt;&lt;br /&gt;
The ''call.preroute'' message is filled with initial ''call.execute'' message parameters and request parameters (the request may override initial parameters).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The following parameters are always replaced in the initial message:&lt;br /&gt;
* '''id''': Replaced by BCSM leg id&lt;br /&gt;
* '''module''': Replaced by BCSM module name&lt;br /&gt;
&lt;br /&gt;
When the initial call is continued, e.g. the call must be continued to initial called number, the call is routed if no target was specified in ''call.execute'' message, e.g. the call was initially routed to ''bcsm/''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Otherwise, a ''call.execute'' message is sent with initial target in ''callto'' parameter.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The preroute/route/execute messages are dispatched, e.g. the operation is done synchronously.&lt;br /&gt;
* When ICA/CWA is processed, the initial message parameters are replaced from ICA first and then from CWA request.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/MSC_simulator</id>
		<title>MSC simulator</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/MSC_simulator"/>
				<updated>2013-10-28T11:55:30Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This module simulates the call related features of a CAMEL capable MSC.&lt;br /&gt;
&lt;br /&gt;
In particular the module implements the Basic Call Machine State described by the CAMEL standards.&lt;br /&gt;
&lt;br /&gt;
The module does not store the CAMEL subscription, instead it expects any subscription information to be provided in the inbound call routing parameters.&lt;br /&gt;
&lt;br /&gt;
==BCSM Module Configuration==&lt;br /&gt;
The configuration file is '''camel_bcsm.conf'''.&lt;br /&gt;
Sections:&lt;br /&gt;
===[general]===&lt;br /&gt;
Unless explicitly specified, all parameters in this section are applied on reload for new calls only.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* '''application''': string: Application parameter in camel messages sent by the module&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''camel_phase''': integer: CAMEL phase to use&lt;br /&gt;
Allowed values: 1, 2, 3, 4&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 4&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''servicekey''': integer: CAMEL serviceKey parameter to be set in initialDP messages&lt;br /&gt;
Allowed interval: 0..2147483647&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[BCSM Routing#BehaviourCallExecuteHandle|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''msc_address''': string: The mscAddress parameter to be set when sending initialDP&lt;br /&gt;
* '''msc_address_plan''': string: MSC address numbering plan. Values: unknown, isdn, data, telex, land-mobile, isdn-mobile, national, private, extension-reserved&lt;br /&gt;
* '''msc_address_nature''': string: MSC address number nature. Values: unknown, international, national, network-specific, subscriber, reserved, abbreviated, extension-reserved&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[BCSM Routing#BehaviourCallExecuteHandle|call.execute handling]])&lt;br /&gt;
&lt;br /&gt;
* '''default_call_handling_continue''': boolean: Continue operation when an error occurs&lt;br /&gt;
Defaults to enable&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[BCSM Routing#BehaviourCallExecuteHandle|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer''': integer: Application timer (milliseconds) for non user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval is used when call processing is suspended and no user interaction is expected, e.g. an event was notified to SCP and we are waiting for instructions&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 1000..20000 (1..20s)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000 (3 seconds)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer_user''': integer: Application timer (milliseconds) for user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval id used when call processing is suspended and user interaction is expected, e.g. a disconnectForwardConnection (disconnect a temporary leg) was received from SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 60000..1800000 (1..30min)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 180000 (3 minutes)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''report_etc_failed_timer''': integer: The interval in milliseconds to report failure for temporary calls started on Establish Temporary Connection requests&lt;br /&gt;
Failure will be reported if the SRF terminates the call within this interval&amp;lt;br/&amp;gt;&lt;br /&gt;
If no failure is reported the controlling SCF (which has its own timer) will treat the request as succeeded&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_busy_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'busy' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_busy_reason the 'busy' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^busy$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_noanswer_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'no answer' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_noanswer_reason the 'no answer' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^noanswer$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''export_xml_as''': string: Specify in which way the XML will be passed along into camel messages. Allowed values are:&lt;br /&gt;
** string: pass the XML as a string&amp;lt;br/&amp;gt;&lt;br /&gt;
** object: pass the XML as an object&amp;lt;br/&amp;gt;&lt;br /&gt;
** both: pass the XML as a string and object&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to object&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_xml''': boolean/string: Instruct the module to print sent/received xml components. Allowed values are:&lt;br /&gt;
** boolean true: Print xml on single line&lt;br /&gt;
** boolean false: Don't print xml&lt;br /&gt;
** verbose: Print xml children on separate lines&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to false&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_decoded''': boolean: Print decoded xml elements to output if debug is at level 10&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==BCSM Routing==&lt;br /&gt;
&lt;br /&gt;
===call.execute handling===&lt;br /&gt;
&lt;br /&gt;
An incoming call is routed to this module by adding a '''bcsm/''' prefix to target.\\&lt;br /&gt;
The prefix may be followed a call target to use when CAMEL SCF request to continue the call at initial DP, CAMEL SCF is not available (network failure) or initialDP fails:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1&lt;br /&gt;
&lt;br /&gt;
The following parameters (See [[BCSM Configuration]] for details) can be added when routing:&lt;br /&gt;
* servicekey&lt;br /&gt;
* default_call_handling_continue&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 ^123$=bcsm/sig/123;trunk=trunk1;servicekey=2;default_call_handling_continue=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Starting outgoing calls===&lt;br /&gt;
&lt;br /&gt;
When need to start an outgoing call (received ETC, ICA/CWA, CWA, CONT) the module will send ''call.preroute'', ''call.route'' and ''call.execute'' messages.&amp;lt;br/&amp;gt;&lt;br /&gt;
The ''call.preroute'' message is filled with initial ''call.execute'' message parameters and request parameters (the request may override initial parameters).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The following parameters are always replaced in the initial message:&lt;br /&gt;
* '''id''': Replaced by BCSM leg id&lt;br /&gt;
* '''module''': Replaced by BCSM module name&lt;br /&gt;
&lt;br /&gt;
When the initial call is continued, e.g. the call must be continued to initial called number, the call is routed if no target was specified in ''call.execute'' message, e.g. the call was initially routed to ''bcsm/''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Otherwise, a ''call.execute'' message is sent with initial target in ''callto'' parameter.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The preroute/route/execute messages are dispatched, e.g. the operation is done synchronously.&lt;br /&gt;
* When ICA/CWA is processed, the initial message parameters are replaced from ICA first and then from CWA request.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/MSC_simulator</id>
		<title>MSC simulator</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/MSC_simulator"/>
				<updated>2013-10-28T11:53:27Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: Created page with &amp;quot;This module simulates the call related features of a CAMEL capable MSC.  In particular the module implements the Basic Call Machine State described by the CAMEL standards.  Th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This module simulates the call related features of a CAMEL capable MSC.&lt;br /&gt;
&lt;br /&gt;
In particular the module implements the Basic Call Machine State described by the CAMEL standards.&lt;br /&gt;
&lt;br /&gt;
The module does not store the CAMEL subscription, instead it expects any subscription information to be provided in the inbound call routing parameters.&lt;br /&gt;
&lt;br /&gt;
==BCSM Module Configuration==&lt;br /&gt;
The configuration file is '''camel_bcsm.conf'''.&lt;br /&gt;
Sections:&lt;br /&gt;
===[general]===&lt;br /&gt;
Unless explicitly specified, all parameters in this section are applied on reload for new calls only.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
* '''application''': string: Application parameter in camel messages sent by the module&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''camel_phase''': integer: CAMEL phase to use&lt;br /&gt;
Allowed values: 1, 2, 3, 4&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 4&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing for each call&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''servicekey''': integer: CAMEL serviceKey parameter to be set in initialDP messages&lt;br /&gt;
Allowed interval: 0..2147483647&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[BCSM Routing#BehaviourCallExecuteHandle|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''msc_address''': string: The mscAddress parameter to be set when sending initialDP&lt;br /&gt;
* '''msc_address_plan''': string: MSC address numbering plan. Values: unknown, isdn, data, telex, land-mobile, isdn-mobile, national, private, extension-reserved&lt;br /&gt;
* '''msc_address_nature''': string: MSC address number nature. Values: unknown, international, national, network-specific, subscriber, reserved, abbreviated, extension-reserved&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[BCSM Routing#BehaviourCallExecuteHandle|call.execute handling]])&lt;br /&gt;
&lt;br /&gt;
* '''default_call_handling_continue''': boolean: Continue operation when an error occurs&lt;br /&gt;
Defaults to enable&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameters can be overridden from routing for each statically armed DP (see [[BCSM Routing#BehaviourCallExecuteHandle|call.execute handling]])&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer''': integer: Application timer (milliseconds) for non user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval is used when call processing is suspended and no user interaction is expected, e.g. an event was notified to SCP and we are waiting for instructions&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 1000..20000 (1..20s)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000 (3 seconds)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''tssf_timer_user''': integer: Application timer (milliseconds) for user interaction&amp;lt;br/&amp;gt;&lt;br /&gt;
This interval id used when call processing is suspended and user interaction is expected, e.g. a disconnectForwardConnection (disconnect a temporary leg) was received from SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Interval allowed: 60000..1800000 (1..30min)&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 180000 (3 minutes)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''report_etc_failed_timer''': integer: The interval in milliseconds to report failure for temporary calls started on Establish Temporary Connection requests&lt;br /&gt;
Failure will be reported if the SRF terminates the call within this interval&amp;lt;br/&amp;gt;&lt;br /&gt;
If no failure is reported the controlling SCF (which has its own timer) will treat the request as succeeded&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_busy_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'busy' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_busy_reason the 'busy' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^busy$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dp_noanswer_reason''': regexp: Regexp to match termination reason when a called party terminates the call and we have the 'no answer' DP armed&amp;lt;br/&amp;gt;&lt;br /&gt;
If the reason matches dp_noanswer_reason the 'no answer' DP will be notified to SCP&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to ^noanswer$&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''export_xml_as''': string: Specify in which way the XML will be passed along into camel messages. Allowed values are:&lt;br /&gt;
** string: pass the XML as a string&amp;lt;br/&amp;gt;&lt;br /&gt;
** object: pass the XML as an object&amp;lt;br/&amp;gt;&lt;br /&gt;
** both: pass the XML as a string and object&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to object&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_xml''': boolean/string: Instruct the module to print sent/received xml components. Allowed values are:&lt;br /&gt;
** boolean true: Print xml on single line&lt;br /&gt;
** boolean false: Don't print xml&lt;br /&gt;
** verbose: Print xml children on separate lines&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to false&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''print_decoded''': boolean: Print decoded xml elements to output if debug is at level 10&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter can be overridden from routing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:47:56Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:46:12Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Multiple Continue/ContinueWithArgument handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:45:45Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* RequestReportBCSM and EventReportBCSM handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
'''Question:''' It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Answer:''' Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
Question: how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:44:17Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
Question: It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
Question: Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes.&lt;br /&gt;
&lt;br /&gt;
Question: Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
Question: It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
Question: how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:44:03Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
Question: It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
Question: Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes.&lt;br /&gt;
&lt;br /&gt;
Question: Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
Question: It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
Question: how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:43:48Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
Question: It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
Question: Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes.&lt;br /&gt;
&lt;br /&gt;
Question: Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
Question: It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
Question: how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:43:07Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* RequestReportBCSM and EventReportBCSM handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
Question: It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? &amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
Question: Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes.&lt;br /&gt;
&lt;br /&gt;
Question: Are CRBT scripts ready for this scenario?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
Question: It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
Question: how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:42:25Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Yate side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;br /&gt;
&lt;br /&gt;
==Proxy Behaviour==&lt;br /&gt;
&lt;br /&gt;
Bellow, the behaviour of the CAMEL proxy implemented in ''camel_proxy.php'' is described.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
The main purpose of the proxy is to act as a SCF on the SSF side and as a SSF on the proxied SCF side.&lt;br /&gt;
&lt;br /&gt;
The proxy sits between the SSF and and the SCFs. From the point of view of the SSF, it will act as a SCF, from the point of view of the proxied SCFs, it will act as a SSF.&lt;br /&gt;
&lt;br /&gt;
The main characteristics of the proxy behaviour are:&lt;br /&gt;
* when receiving Invoke components from the SSF, the proxy will decide to which SCFs they should be passed along. The decision is taken by looking at the configuration of the SCF for what operation it specifically handles. The operation will be passed only to those SCFs that were configured to receive that specific information. If no SCF was configured to accept the incoming Invoke for an operation, the proxy will return an error to the SSF. InitialDP and EventReportBCSM operations are excluded from this kind of handling.&lt;br /&gt;
* if for a Invoke component arrived from the SSF there are multiple SCFs that match it and to which it should be sent, the proxy will send it in order of SCF priority.&lt;br /&gt;
* Invoke components from SCFs will be sent to the SSF and the proxy will keep track to which SCF each component belongs to.&lt;br /&gt;
* Result and ReturnError components from the SSF will be passed by the proxy to the SCF that initially sent it.&lt;br /&gt;
* sending of an Invoke component to multiple SCFs is done in a serialized fashion. It will send the message to the first SCF, then to the second. Depending on the state of the dialog with the SSF and of the state of the dialogs with the SCFs, the proxy first awaits or not a response from the SCF before sending the Invoke to the next SCF. If the received Invoke caused a SCF to change its state to ''WFI (Waiting For Instructions - from SCF)'', the proxy will first await a response containing a Continue or ContinueWithArgument operation (operation that moves the SCF into ''MON - Monitoring'' state) before sending the Invoke to the next SCF. This means that while a dialog with a SCF is in ''WFI'' state, it can exchange multiple messages with the SSF until the SCF goes into ''MON'' state, and just then the original Invoke will be sent to the next SCF. The message flow looks like this:&lt;br /&gt;
&lt;br /&gt;
    SSF                         Proxy                    SCF 1                       SCF 2&lt;br /&gt;
    |------- Invoke 1 -----------&amp;gt;|WFI                    |                           |  &lt;br /&gt;
    |                             |----- Invoke 1a ------&amp;gt;|WFI                        |             &lt;br /&gt;
    |                             |&amp;lt;---- Invoke 2a -------|WFI                        |&lt;br /&gt;
    |&amp;lt;------ Invoke 2a -----------|WFI                    |                           |&lt;br /&gt;
    |------- Result 2a ----------&amp;gt;|WFI                    |                           |&lt;br /&gt;
    |                             |----- Result 2a ------&amp;gt;|WFI                        |&lt;br /&gt;
    |                             |&amp;lt;---- Invoke 3a CWA ---|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 1b ---------&amp;gt;|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke 2b ----------|WFI&lt;br /&gt;
    |                             |&amp;lt;----------------------------- Invoke CONT 3b CONT-|MON&lt;br /&gt;
    |&amp;lt;------ Invoke 2b -----------|                       |                           |&lt;br /&gt;
    |&amp;lt;------ Invoke 3a CWA -------|MON                    |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |                             |                       |                           |&lt;br /&gt;
    |------- Invoke 4 -----------&amp;gt;|MON                    |                           |&lt;br /&gt;
    |                             |------ Invoke 4a -----&amp;gt;|MON                        |&lt;br /&gt;
    |                             |------------------------------ Invoke 4b ---------&amp;gt;|MON&lt;br /&gt;
&lt;br /&gt;
* if the proxy received a error or reject component from a SCF, it will check whether an error on that dialog is fatal (this is part of the SCF configuration), and if so, the proxy will abort the dialog with the SSF and with all SCFs.&lt;br /&gt;
* when sending a operation in a WFI state, the proxy will start a timer for how long it will wait a response from the SCF to which it had just sent the operation. If the timer expires, it will send an abort on the dialogue with that SCF. If an error is fatal on this dialog, the dialogs with the SSF and other SCFs are also aborted. If not, the proxy will try to pass the operation to the next SCF that should receive it.&lt;br /&gt;
* if an TCAP End message is received from a SCF and there other SCFs that have active dialogues with the SSF, the proxy will terminate the dialogue with just that SCFs. If the TCAP End message contained components, the proxy will rewrite the TCAP END to TCAP CONTINUE and send it to the SSF.&lt;br /&gt;
* the proxy will set the required SS7 addressing information if so configured for a SCF. '''NOTE!''' For external SCFs, the configuration parameter for addressing must not be empty. Refer to the the [[http://crbt-doc.lan/index.php?n=CRBT.ProxyConfiguration|configuration page]] for how to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===InitialDP handling===&lt;br /&gt;
&lt;br /&gt;
The initialDP operation has special handling. Upon receiving this operation from the SSF, the proxy will take the following steps:&lt;br /&gt;
* it will check for presence of the ''serviceKey'' parameter. If missing, it will reject the operation and end the dialogue with the SSF.&lt;br /&gt;
* then it will compare the received serviceKey value with the one configured for the proxy. If they do not match, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* it will check for the presence of the ''eventTypeBCSM'' parameter. If missing, the proxy will return an error for the operation and end the dialogue with the SSF.&lt;br /&gt;
* after passing these checks, the proxy will look for SCFs that match the BCSM event that triggered the IDP. If no SCFs match the detection point,  the proxy will return an error for the operation and end the dialogue with the SSF. Otherwise, it will build dialogues towards every matched SCF and, build IDP operation for them and start processing.&lt;br /&gt;
* if a matched SCF requires another service key value or another application context, the proxy will replace these values with the ones configured for the SCF. &lt;br /&gt;
&lt;br /&gt;
===RequestReportBCSM and EventReportBCSM handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RequestReportBCSM and EventReportBCSM operation are specially handled as seeing that multiple SCFs can arm the same DP (detection point) with different event modes: ''interrupted, notify, transparent''. A subsequent arming request for a DP will override the previous arming mode and this can be a problem if one SCF first armed a DP in interrupted mode and another one puts it afterwards in notify or transparent mode. &lt;br /&gt;
If a DP was rearmed to ''notify'' from ''interrupted'', this will mess up the handling for the first SCF as it probably armed it as ''interrupted'' as to not continue with call handling until it decided upon something. A ''notify'' means that the SSF continued with call handling without waiting anything from the SCF. ''transparent'' means that the SCF will not be notified about the event, which again messes up the handling of the first SCF.&lt;br /&gt;
&lt;br /&gt;
In order to prevent that, proxy does the following:&lt;br /&gt;
* the proxy keeps track about how DPs were armed for the dialogue with the SSF, and also for the dialogues with the SCFs.&lt;br /&gt;
* upon a RequestReportBCSM invocation from a SCF, it will check for all requested DPs if the DP wasn't already armed previously. If it wasn't already armed, the proxy will leave it as is. If it was already armed, it will check how was it armed and depending on the situation, will leave it as is or rewrite it. For example:&lt;br /&gt;
** if the DP was previously armed as ''transparent'' and now it is requested as ''notify'' or ''interrupted'', the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''interrupted'', , the proxy will leave it the invocation as is and update only the information about how was it armed.&lt;br /&gt;
** if the DP was previously armed as ''interrupted'' and now it is requested as ''notify'' or ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
** if the DP was previously armed as ''notify'' and now it is requested as ''transparent, , the proxy will rewrite the arming mode in the invocation.&lt;br /&gt;
* when receiving an EventReportBCSM invocation from the SSF, the proxy will send it to all SCFs that had previously armed the reported DP. The proxy will not rewrite the mode how this event is reported as it interferes with situations where the dialogue with the SCF that requested ''interrupted'' might have been terminated due to a exception. Rewriting it to a ''notify'' will not correspond with the SSF BCSM state.&lt;br /&gt;
&lt;br /&gt;
Question: It may turn that SCF requested ''notify'', but got ''interrupted'' EventReportBCSM, right? Is it OK? \\&lt;br /&gt;
Answer: Yes, that's the behaviour right now, but it can be changed to report notify. This would mean adding a configuration parameter as to what to do when this situation occurs: either pass it to the SCF how it was received (what it does right now)  or let the proxy generate a Continue if it could not send it with interrupted to anyone.&lt;br /&gt;
&lt;br /&gt;
Question: Does this mean, that every SCF, which received ''interrupted'' EventReportBCSM, is obliged to decide on it and issue CONT in the end, even if it didn't intend to receive such an event in ''interrupted'' mode?\\&lt;br /&gt;
Answer: Yes.&lt;br /&gt;
&lt;br /&gt;
Question: Are CRBT scripts ready for this scenario?\\&lt;br /&gt;
Answer: Yes, the CRBT script when handling DPs is prepared to handle such a situation.&lt;br /&gt;
&lt;br /&gt;
Question: It seems better to issue CONT by proxy and change ''interrupted'' to what was originally requested by certain SCF. Not sure.\\&lt;br /&gt;
Answer: Yes, the proxy could decide to send a Continue to the SSF if none of the SCFs requested it in &amp;quot;interrupted&amp;quot; mode. If one of the SCFs requested &amp;quot;interrupted&amp;quot;, the proxy will expect the SCF to send the Continue.&lt;br /&gt;
&lt;br /&gt;
===Multiple Continue/ContinueWithArgument handling===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proxy deals with the situation in which SCFs that were all in ''WFI'' state send each a Continue (CONT)/ ContinueWithArgument (CWA) invocation to get into ''MON'' state. The proxy gathers all their invocations in a single message to the SSF. Because sending multiple CONT/CWA in a single message to the SSF can alterate the BCSM processing - for example, a CONT will stop processing of subsequent operation invocation until the next interrupt - the proxy ensures that it sends a valid mesage to the SSF in order to process all the operations that were requested by the SCFs.&lt;br /&gt;
For that, the proxy will do the following:&lt;br /&gt;
* if from the view of the proxy, the dialogue with the SSF should result in a ''WFI'' state in the BCSM, it will remove from the message all CONT/CWAs.&lt;br /&gt;
* if in the message there are only CONT invocations, only the last one is left, the other ones are removed before sending.&lt;br /&gt;
* in in the message there are onle CWA invocations, they are all kept, but the last CWA is moved to also be the last invocation in the message.&lt;br /&gt;
* if there is a mix of CWA and CONT invocations, all CONT invocations will be removed and the last CWA is moved to being the last invocation in the message.&lt;br /&gt;
&lt;br /&gt;
Question: how does SSF handle multiple CWA?&amp;lt;br/&amp;gt;&lt;br /&gt;
Answer: A SSF should be able to handle multiple CWAs, as usually multiple CWA are sent with different parameters: one can only modify call parameters, one can specify a continue with changed parameters on a certain leg or segment.&lt;br /&gt;
&lt;br /&gt;
===Leg ID and DP rewriting===&lt;br /&gt;
&lt;br /&gt;
In case of CAMEL phase 4 call party handling (what the CRBT SCF does), the proxy does special handling of leg IDs and DPs in order to deal with the fact that leg 2 is disconnected and leg 3 is created. The PPS SCF has no way to know that leg 2 doesn't exist anymore, so handling for dealing with the fact that from its point of view leg 2 still exists has been implemented:&lt;br /&gt;
* for this, the proxy will keep track of what legs exist. When a successful InitiateCallAttempt operation has occurred, the proxy will consider it as a replacement for a previously disconnected leg, if that exists.&lt;br /&gt;
* when the proxy receives an operation that request actions on a leg previously disconnected, the proxy will rewrite the leg ID towards the SSF to match with the one, that from it's point of view, replaced it. If an operation arrives from the SSF and must be transmitted to a SCF that doesn't not know that the leg it had requested no longes exists, it will rewrite it to its replacement.&lt;br /&gt;
* in case of a RRBE operation, if the leg ID must be rewritten, the armed DPs will also be rewritten to matcht the BCSM state machine for the leg that is the replacement (leg 2 was a T-BSCM so PPS would arm T-BCSM DPs, but replacing the leg with leg 3, which is a result of an ICA, means arming DPs for O-BCSM events)&lt;br /&gt;
* when a ERBE operation is received from the SSF, if required, the proxy will rewrite the leg ID and reported DP to the SCF that doesn't know that the leg was disconnected.&lt;br /&gt;
* leg rewriting handling also aplies to ApplyCharging and ApplyChargingReport operations.&lt;br /&gt;
&lt;br /&gt;
In case of a SCF that had armed DPs on a leg that was subsequently disconnected, the proxy, in order to ensure that events will be reported to the SCF even after the leg was disconnected, will send to the SSF a RRBE operation to arm on the replacement leg all DPs that are equivalent with the ones that were armed for the disconnected leg.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:40:51Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Yate side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
 &lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:40:34Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Yate side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named &amp;lt;tt&amp;gt;[local name_of_proxy]&amp;lt;/tt&amp;gt; must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional &amp;lt;tt&amp;gt;[local scfName]&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
&lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid &amp;lt;tt&amp;gt;[local crbt-scp]&amp;lt;/tt&amp;gt; section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Script side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature''' &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named @@[local name_of_proxy]@@ must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A @@[tcap name]@@ section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional @@[local scfName]@@ and @@[tcap name]@@ sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
&lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid @@[local crbt-scp]@@ section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:38:36Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Proxy Module Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
Configuration of the &amp;quot;camel_proxy.php&amp;quot; script is done through ''config_proxy.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1 '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
 &lt;br /&gt;
* 2. '''$proxyName''' - string. It represent the value of the ''application'' parameter set in the ''camel.message'' coming from and going to the SSF. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
 &lt;br /&gt;
* 3. '''$mynum''' - string. GTT number assigned to this SCP.                                                                       &lt;br /&gt;
                                                                                             &lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$scfs''' - array. This defines the list of configured proxied SCFs. Each entry in the array defines a SCF with its configuration parameters. The key set for the entry designates the name of the SCF and the value used for the ''aplication'' parameter set in the ''camel.message'' used to communicate between the proxy and the SCF. For each entry, the following parameters must be set:&lt;br /&gt;
** 5.1. '''serviceKey''' - integer. It represents the service key to be used when constructing an IDP for this SCF..&lt;br /&gt;
&lt;br /&gt;
** 5.2. '''dp''' - string. It represent the detection point at which this SCF should be contacted. In order for the proxy to build an IDP for this SCF, the detection point received in the IDP from the SSF should match the one configured here.&lt;br /&gt;
&lt;br /&gt;
** 5.3. '''priority''' - integer. It specifies the priority of this SCF when handling messages from SSF. According to priority,messages from the SSF will be passed by the proxy in priority order to the SCFs, first to the highest priority SCF (meaning the one with the lowest set value).&lt;br /&gt;
&lt;br /&gt;
** 5.4. '''errorFatal''' - boolean. It specifies whether or not an error or reject component from this SCF should terminate the dialogue with the SSF and also with the other SCFs.&lt;br /&gt;
&lt;br /&gt;
** 5.5. '''addr''' - array. It specifies SS7 network addressing parameters. They only need be set for external SCFs. Parameters are usually set here are:&lt;br /&gt;
*** '''CalledPartyAddress.route''' -  string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
*** '''CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
*** '''CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
*** '''CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to ''bcd''.&lt;br /&gt;
*** '''CalledPartyAddress.gt.translation''' - integer. It specifies the GT translation type. It is usually set to ''0''.                                          &lt;br /&gt;
*** '''CalledPartyAddress.gt.plan''' - string. The GT numbering plan. It is usually set to ''isdn''. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
*** '''CalledPartyAddress.gt.nature'''- string. It specifies the nature of the GT number. It is usually set to ''international''.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
*** '''CallingPartyAddress.route'''&lt;br /&gt;
*** '''CalledPartyAddress.ssn'''&lt;br /&gt;
*** '''CallingPartyAddress.gt'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.encoding'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.translation'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.plan'''&lt;br /&gt;
*** '''CallingPartyAddress.gt.nature'''&lt;br /&gt;
    &lt;br /&gt;
** 5.6. '''local''' - boolean. It specifies whether the SCF application is found locally, inside the same Yate instance. If not, communication with the SCF means messages on the SS7 network.&lt;br /&gt;
&lt;br /&gt;
** 5.7. '''handles''' -  array. It specifies a list of operations that are handled by this SCF. Besides IDP and ERBE which are sent to all SCFs that match the sending criteria, other operation must be listed here in order for that SCF to receive it.&lt;br /&gt;
&lt;br /&gt;
** 5.8. '''context''' - integer. The application context to be used in the dialogue with this SCF. If not set, the one received in the IDP from the SSF will be used.&lt;br /&gt;
&lt;br /&gt;
** 5.9. '''waitTime''' - integer. It set the time, in seconds, for the proxy to wait for a result from this SCF while being in Waiting For Instructions state, after which the dialogue with that SCF is aborted, and proxy continues processing. Setting it to 0 means that the proxy will wait indefinetely.&lt;br /&gt;
&lt;br /&gt;
A working configuration for ''camel_proxy.php'' looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $myServiceKey = &amp;quot;1&amp;quot;;                                                                                &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 $proxyName = &amp;quot;camelProxy&amp;quot;;                                                                          &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * GTT number of this SCP                                                                           &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $mynum = &amp;quot;8820003&amp;quot;;                                                                                 &lt;br /&gt;
                                                                                                    &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * Transaction timeout after inactivity                                                             &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $transTimeout = 180;                                                                                &lt;br /&gt;
                                                                                                     &lt;br /&gt;
 /**                                                                                                 &lt;br /&gt;
  * List of configured proxied SCFs                                                                  &lt;br /&gt;
  * The following parameters must be configured, all are mandatory:                                  &lt;br /&gt;
  *    serviceKey - value with which the IDP serviceKey should be rewritten                          &lt;br /&gt;
  *    dp - detection point that should match the one received in IDP in order to contact this SCF   &lt;br /&gt;
  *    priority - priority in handling messages from SSF                                             &lt;br /&gt;
  *    errorFatal - whether or not an error or reject component from the SCF should terminate the whole proxy dialoque                                                                                   &lt;br /&gt;
  *    addr - SS7 network addressing parameters.                                                     &lt;br /&gt;
  *    local - whether the SCF is local (a local application) or external (it passes through the SS7 network to reach it)                                                                                &lt;br /&gt;
  *    handles - lists operation received from the SSF that are accepted by this SCF.                &lt;br /&gt;
  *              NOTE: Except ERBE, which is sent to all SCFs that match the reported DP, all operations that are handled by a                                                                           &lt;br /&gt;
  *                    SCF should be listed, otherwise the proxy will report to the SSF an error.    &lt;br /&gt;
  *    context - if set, rewrites the application context for the dialog established with the SCF, otherwise leaves it as received                                                                       &lt;br /&gt;
  *    waitTime - time, in seconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialogue                                                              &lt;br /&gt;
  *                    is aborted.                                                                   &lt;br /&gt;
  */                                                                                                 &lt;br /&gt;
 $scfs = array(                                                                                      &lt;br /&gt;
     &amp;quot;crbt-scp&amp;quot; =&amp;gt; array(                                                                           &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 2,                                                                          &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 1,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; false,                                                                      &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; true,                                                                            &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(),                                                                       &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),&lt;br /&gt;
    &amp;quot;pps-scp&amp;quot; =&amp;gt; array(                                                                            &lt;br /&gt;
        &amp;quot;serviceKey&amp;quot; =&amp;gt; 99,                                                                         &lt;br /&gt;
        &amp;quot;dp&amp;quot; =&amp;gt; &amp;quot;termAttemptAuthorized&amp;quot;,                                                            &lt;br /&gt;
        &amp;quot;priority&amp;quot; =&amp;gt; 2,                                                                            &lt;br /&gt;
        &amp;quot;errorFatal&amp;quot; =&amp;gt; true,                                                                       &lt;br /&gt;
        &amp;quot;addr&amp;quot; =&amp;gt; array(&amp;quot;CalledPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820007&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                  &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                          &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                       &lt;br /&gt;
                        &amp;quot;CalledPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                          &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt&amp;quot; =&amp;gt; &amp;quot;8820003&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.route&amp;quot; =&amp;gt; &amp;quot;gt&amp;quot;,                                        &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.encoding&amp;quot; =&amp;gt; &amp;quot;bcd&amp;quot;,                                 &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.tt&amp;quot; =&amp;gt; &amp;quot;0&amp;quot;,                                         &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.np&amp;quot; =&amp;gt; &amp;quot;isdn&amp;quot;,                                      &lt;br /&gt;
                        &amp;quot;CallingPartyAddress.gt.nature&amp;quot; =&amp;gt; &amp;quot;international&amp;quot;,                         &lt;br /&gt;
                        ),                                                                          &lt;br /&gt;
        &amp;quot;local&amp;quot; =&amp;gt; false,                                                                           &lt;br /&gt;
        &amp;quot;handles&amp;quot; =&amp;gt; array(&amp;quot;applyChargingReport&amp;quot;),                                                  &lt;br /&gt;
        &amp;quot;context&amp;quot; =&amp;gt; &amp;quot;&amp;quot;,                                                                            &lt;br /&gt;
        &amp;quot;waitTime&amp;quot; =&amp;gt; 3,                                                                            &lt;br /&gt;
     ),                                                                                             &lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
In order for the module to ensure communication with the SSF, a section named @@[local name_of_proxy]@@ must be configured:&lt;br /&gt;
&lt;br /&gt;
  [local proxyName] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=scp - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator has only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
A @@[tcap name]@@ section must be configured also. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap scp] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-scp -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=0 -- port on which to listen for incoming applications. 0 means that will not build a listener, as the proxy works on messages.&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For an external proxied SCF, additional @@[local scfName]@@ and @@[tcap name]@@ sections must be configured:&lt;br /&gt;
&lt;br /&gt;
  [tcap msc]&lt;br /&gt;
  tcap=tcap-msc&lt;br /&gt;
  host=0.0.0.0&lt;br /&gt;
  port=0&lt;br /&gt;
  type=CAMEL&lt;br /&gt;
  print-messages=true&lt;br /&gt;
  add-encoding=false&lt;br /&gt;
&lt;br /&gt;
  [local ext-scp]&lt;br /&gt;
  ;enable=no&lt;br /&gt;
  translator=msc&lt;br /&gt;
  capabilities=Camel&lt;br /&gt;
  export_xml_as=both&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE!''' In a proxy scenario, please check that you won't have a valid @@[local crbt-scp]@@ section configured in camel_map.conf. If so, this will allow to the camel_map module to catch messages emitted by the CRBT SCP that should have been catched by the proxy instead.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:37:14Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* camel_bcsm_proxy.conf.sample */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
==Proxy Module Test==&lt;br /&gt;
This chapter describes how the Camel Proxy module was tested.&lt;br /&gt;
&lt;br /&gt;
The purpose of the test was to check if the Camel BCSM Proxy module can handle 100CPS.&lt;br /&gt;
&lt;br /&gt;
The machine used was a Dual Intel Xeon E5620 (Quad Core with HT) = 16CPUs, 32GB RAM with CentOS 6.2&lt;br /&gt;
&lt;br /&gt;
The setup was:&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate1 - Call generator, sending calls to Yate3 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate2 - Call generator, sending calls to Yate4 using SIP&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate3 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate4 - Call handling, send initialDP to Yate5 (Proxy)&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate5 - Camel BCSM Proxy&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate6 - CRBT script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate7 - PPS script&amp;lt;br/&amp;gt;&lt;br /&gt;
Yate8 - PPS script&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
          SIP             M2PA link             M2PA links&lt;br /&gt;
 Yate1 ---------&amp;gt; Yate3 ------------|         |-----------&amp;gt; Yate6 (CRBT)&lt;br /&gt;
                                    |         |&lt;br /&gt;
                                    |-&amp;gt; Yate5 |-----------&amp;gt; Yate7 (PPS)&lt;br /&gt;
                                    |         |&lt;br /&gt;
          SIP             M2PA link |         |-----------&amp;gt; Yate8 (PPS)&lt;br /&gt;
 Yate2 ---------&amp;gt; Yate4 ------------|        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTES:'''&lt;br /&gt;
* The sum of both call generators was 110CPS.&lt;br /&gt;
* During test top reported ~250%CPU for Proxy.&lt;br /&gt;
* All yate instances were running on the same machine.&lt;br /&gt;
* The reason of using 2 PPS instances was the performance of PPS script: 1 script is not able to respond quick enough. The PPS SCFs were rotated using 'scf.query' message.&lt;br /&gt;
&lt;br /&gt;
How success was checked:&lt;br /&gt;
* On call generators all calls were answered&lt;br /&gt;
* On call handling instances (Yate3 and 4) there were no Tssf timeouts (this would indicate a timeout while waiting for instrunctions from SCP - after sending initialDP or eventReportBCSM with type='request')&lt;br /&gt;
* On Proxy instance (Yate5) there were no timeouts (this would indicate a SCF is not responding withing default 3 seconds interval)&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:34:16Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload.&amp;lt;br/&amp;gt;&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.&amp;lt;br/&amp;gt;&lt;br /&gt;
Setting the GT without other parameters is the same as:&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.route=gt&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn&amp;lt;br/&amp;gt;&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0 if missing or invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is applied on reload for new dialogs only.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, the message will be dumped on output.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored if print_msg is disabled.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.&amp;lt;br/&amp;gt;&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.&amp;lt;br/&amp;gt;&lt;br /&gt;
Default to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.&amp;lt;br/&amp;gt;&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to yes.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.&amp;lt;br/&amp;gt;&lt;br /&gt;
Allowed interval: 0..2147483647.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to SSF service key set in 'general' section.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Items may be DP value or name.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to no (external application).&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''instances''': integer: Number of local application instances.&amp;lt;br/&amp;gt;&lt;br /&gt;
This parameter is ignored for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 it must be set to a value greater then 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 0.&amp;lt;br/&amp;gt;&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
E.g.:&lt;br /&gt;
 &lt;br /&gt;
 [proxy SCP]&lt;br /&gt;
 instances=2&lt;br /&gt;
&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.&amp;lt;br/&amp;gt;&lt;br /&gt;
Defaults to 3000.&amp;lt;br/&amp;gt;&lt;br /&gt;
Minimum allowed value is 1000.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.&amp;lt;br/&amp;gt;&lt;br /&gt;
They should be set for non local SCFs.&amp;lt;br/&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 application=camelProxy&lt;br /&gt;
 servicekey=1&lt;br /&gt;
 gt=8820003&lt;br /&gt;
 &lt;br /&gt;
 [proxy crbt-scp]&lt;br /&gt;
 servicekey=2&lt;br /&gt;
 local=true&lt;br /&gt;
 &lt;br /&gt;
 [proxy pps-scp]&lt;br /&gt;
 servicekey=99&lt;br /&gt;
 priority=2&lt;br /&gt;
 errorfatal=true&lt;br /&gt;
 handles=applyChargingReport&lt;br /&gt;
 addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
 addr.CalledPartyAddress.route=gt&lt;br /&gt;
 addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
 addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
 addr.CallingPartyAddress.route=gt&lt;br /&gt;
 addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
 addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
 addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
 addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
&lt;br /&gt;
 [local camelProxy]&lt;br /&gt;
 translator=scp_proxy&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_proxy]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_msc&lt;br /&gt;
 port=0&lt;br /&gt;
 &lt;br /&gt;
 [local pps-scp]&lt;br /&gt;
 translator=scp_pps&lt;br /&gt;
 capabilities=Camel&lt;br /&gt;
 &lt;br /&gt;
 [tcap scp_pps]&lt;br /&gt;
 type=CAMEL&lt;br /&gt;
 tcap=tcap_pps&lt;br /&gt;
 port=0&lt;br /&gt;
&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
&lt;br /&gt;
 ; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
 ; [postload]&lt;br /&gt;
 ; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
 &lt;br /&gt;
 [general]&lt;br /&gt;
 ; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
 ;  dialogs only&lt;br /&gt;
 ; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
 &lt;br /&gt;
 ; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
 ; This parameter is required&lt;br /&gt;
 ; This parameter is not applied on reload&lt;br /&gt;
 ;application=&lt;br /&gt;
 &lt;br /&gt;
 ; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
 ; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
 ;gt=&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
 ;  set when forwarding them to SCFs&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to 0 if missing or invalid&lt;br /&gt;
 ; This parameter is applied on reload for new dialogs only&lt;br /&gt;
 ;servicekey=0&lt;br /&gt;
 &lt;br /&gt;
 ; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
 ; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
 ;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
 ; The response must return the list of SCFs to proxy&lt;br /&gt;
 ; The list may be shorter then configured SCFs&lt;br /&gt;
 ; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
 ; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
 ;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;query_scf=no&lt;br /&gt;
 &lt;br /&gt;
 ; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; Defaults to 15000&lt;br /&gt;
 ;component_ttl=15000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
 ; Defaults to 5000&lt;br /&gt;
 ;dialog_idle_ttl=5000&lt;br /&gt;
 &lt;br /&gt;
 ; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
 ; Minimum allowed value is 1000.&lt;br /&gt;
 ; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;dialog_ended_ttl=0&lt;br /&gt;
 &lt;br /&gt;
 ; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
 ;  Yate messages&lt;br /&gt;
 ; Allowed values are:&lt;br /&gt;
 ;  - string: pass the XML as a string&lt;br /&gt;
 ;  - object: pass the XML as an object&lt;br /&gt;
 ;  - both: pass the XML as a string and object&lt;br /&gt;
 ; Defaults to object&lt;br /&gt;
 ;export_xml_as=object&lt;br /&gt;
 &lt;br /&gt;
 ; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, the message will be dumped on output&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_msg=no&lt;br /&gt;
 &lt;br /&gt;
 ; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
 ;  level is at least 9&lt;br /&gt;
 ; This parameter is ignored if print_msg is disabled&lt;br /&gt;
 ; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
 ; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
 ;  shown on separate lines&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;print_xml=no&lt;br /&gt;
 &lt;br /&gt;
 ; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_calling_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
 ; Default to yes&lt;br /&gt;
 ;idp_called_required=yes&lt;br /&gt;
 &lt;br /&gt;
 ; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
 ; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
 ;  non 0 values only)&lt;br /&gt;
 ;dispatcher_maxthreads=0&lt;br /&gt;
 &lt;br /&gt;
 ;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
 ; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
 ; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
 ; Low priorities are not recommended except for debugging&lt;br /&gt;
 ; Defaults to 'normal'&lt;br /&gt;
 ; This parameter is applied on reload for new threads only&lt;br /&gt;
 ;dispatcher_priority=normal&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;[proxy appname]&lt;br /&gt;
 ; This section configures a proxied SCF&lt;br /&gt;
 ; 'appname' is the application name to be used for the SCF&lt;br /&gt;
 &lt;br /&gt;
 ; enable: boolean: Enable the SCF&lt;br /&gt;
 ; Defaults to yes&lt;br /&gt;
 ;enable=yes&lt;br /&gt;
 &lt;br /&gt;
 ; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;priority=0&lt;br /&gt;
 &lt;br /&gt;
 ; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
 ; Allowed interval: 0..2147483647&lt;br /&gt;
 ; Defaults to SSF service key set in 'general' section&lt;br /&gt;
 ;servicekey=&lt;br /&gt;
 &lt;br /&gt;
 ; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
 ;  in order to contact this SCF&lt;br /&gt;
 ; Items may be DP value or name&lt;br /&gt;
 ; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
 ;dp=termAttemptAuthorized&lt;br /&gt;
 &lt;br /&gt;
 ; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;endfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
 ;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
 ; Defaults to no&lt;br /&gt;
 ;errorfatal=no&lt;br /&gt;
 &lt;br /&gt;
 ; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
 ;  through the SS7 network to reach it)&lt;br /&gt;
 ; Defaults to no (external application)&lt;br /&gt;
 ;local=no&lt;br /&gt;
 &lt;br /&gt;
 ; instances: integer: Number of local application instances&lt;br /&gt;
 ; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
 ;  round-robin algorithm&lt;br /&gt;
 ; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
 ;  suffix startting from 1&lt;br /&gt;
 ; E.g.&lt;br /&gt;
 ; [proxy SCP]&lt;br /&gt;
 ; instances=2&lt;br /&gt;
 ; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
 ; This parameter is ignored for non local SCFs&lt;br /&gt;
 ; If non 0 it must be set to a value greater then 1&lt;br /&gt;
 ; Defaults to 0&lt;br /&gt;
 ;instance=&lt;br /&gt;
 &lt;br /&gt;
 ; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
 ;  accepted by this SCF&lt;br /&gt;
 ; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
 ;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
 ;  proxy will report to the SSF an error&lt;br /&gt;
 ;handles=&lt;br /&gt;
 &lt;br /&gt;
 ; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
 ;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
 ;  is aborted&lt;br /&gt;
 ; Defaults to 3000&lt;br /&gt;
 ; Minimum allowed value is 1000&lt;br /&gt;
 ;waittime=3000&lt;br /&gt;
 &lt;br /&gt;
 ; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
 ;  message sent for this SCF&lt;br /&gt;
 ; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:25:52Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;br /&gt;
&lt;br /&gt;
==Camel Proxy Module Configuration==&lt;br /&gt;
&lt;br /&gt;
The configuration file is camel_bcsm_proxy.conf&lt;br /&gt;
&lt;br /&gt;
===Module configuration===&lt;br /&gt;
&lt;br /&gt;
===='general' section====&lt;br /&gt;
&lt;br /&gt;
'''application''': Application parameter in camel messages sent/handled for SSF dialogs.\\&lt;br /&gt;
This parameter is required and is not applied on reload (can't be changed after module starts).\\&lt;br /&gt;
\\&lt;br /&gt;
'''gt''': Global Title to be set in the first message sent in the SSF dialog.\\&lt;br /&gt;
This parameter is applied on reload.\\&lt;br /&gt;
TCAP address parameters to be set in the first message sent back to SSF can also be set using '''addr.''' prefix.\\&lt;br /&gt;
E.g. GT can be set as '''addr.CallingPartyAddress.gt''' along with other parameters like number nature '''addr.CallingPartyAddress.nature'''.\\&lt;br /&gt;
Setting the GT without other parameters is the same as:\\&lt;br /&gt;
addr.CallingPartyAddress.gt=[GT set]\\&lt;br /&gt;
addr.CallingPartyAddress.route=gt\\&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd\\&lt;br /&gt;
addr.CallingPartyAddress.gt.translation=0\\&lt;br /&gt;
addr.CallingPartyAddress.gt.plan=isdn\\&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international\\&lt;br /&gt;
\\&lt;br /&gt;
'''servicekey''': CAMEL serviceKey to check when in received initialDP and set when forwarding them to SCFs.\\&lt;br /&gt;
Allowed interval: 0..2147483647.\\&lt;br /&gt;
Defaults to 0 if missing or invalid.\\&lt;br /&gt;
This parameter is applied on reload for new dialogs only.\\&lt;br /&gt;
\\&lt;br /&gt;
'''query_scf''': Boolean value indicating whether to query for proxied SCFs update when processing initialDP.\\&lt;br /&gt;
Is enabled a 'scf.query' message will be enqueued and the module will wait for a 'scf.response' message to continue IDP processing.\\&lt;br /&gt;
Defaults to no.\\&lt;br /&gt;
\\&lt;br /&gt;
'''print_msg''': boolean/string: Print sent/received messages to output if debug level is at least 9.\\&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.\\&lt;br /&gt;
If verbose is specified, the message will be dumped on output.\\&lt;br /&gt;
Defaults to no.\\&lt;br /&gt;
\\&lt;br /&gt;
'''print_xml''': boolean/string: Print sent/received XML data to output if debug level is at least 9.\\&lt;br /&gt;
This parameter is ignored if print_msg is disabled.\\&lt;br /&gt;
Allowed values are boolean values or 'verbose' string.\\&lt;br /&gt;
If verbose is specified, XML elements' children, attributes or text will be shown on separate lines.\\&lt;br /&gt;
Defaults to no.\\&lt;br /&gt;
\\&lt;br /&gt;
'''idp_calling_required''': boolean: Calling party number is required (non empty) in initialDP.\\&lt;br /&gt;
Default to yes.\\&lt;br /&gt;
\\&lt;br /&gt;
'''idp_called_required''': boolean: Called party number is required (non empty) in initialDP.\\&lt;br /&gt;
Default to yes.\\&lt;br /&gt;
\\&lt;br /&gt;
'''dispatcher_maxthreads''': integer: Maximum number of message dispatch threads to use.\\&lt;br /&gt;
Set to 0 to enqueue messages using yate engine.\\&lt;br /&gt;
Defaults to 0.\\&lt;br /&gt;
When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to non 0 values only).\\&lt;br /&gt;
\\&lt;br /&gt;
====Proxied SCF section(s)====&lt;br /&gt;
&lt;br /&gt;
'''enable''': boolean: Enable the SCF.\\&lt;br /&gt;
Defaults to yes.\\&lt;br /&gt;
\\&lt;br /&gt;
'''priority''': integer: Priority in handling messages from SSF.\\&lt;br /&gt;
Defaults to 0.\\&lt;br /&gt;
\\&lt;br /&gt;
'''servicekey''': integer: Value with which the IDP serviceKey should be rewritten.\\&lt;br /&gt;
Allowed interval: 0..2147483647.\\&lt;br /&gt;
Defaults to SSF service key set in 'general' section.\\&lt;br /&gt;
\\&lt;br /&gt;
'''dp''': string: Comma separated list of detection points that should match the one received in IDP in order to contact this SCF.\\&lt;br /&gt;
Items may be DP value or name.\\&lt;br /&gt;
Defaults to termAttemptAuthorized if empty or all DPs are invalid.\\&lt;br /&gt;
\\&lt;br /&gt;
'''endfatal''': boolean: Indicate whether or not terminate the proxy dialog when this dialog ends.\\&lt;br /&gt;
Defaults to no.\\&lt;br /&gt;
\\&lt;br /&gt;
'''errorfatal''': boolean: Indicate whether or not an error or reject component from the SCF should terminate the whole proxy dialog.\\&lt;br /&gt;
Defaults to no.\\&lt;br /&gt;
\\&lt;br /&gt;
'''local''': boolean: The SCF is local (a local application) or external (it passes through the SS7 network to reach it).\\&lt;br /&gt;
Defaults to no (external application).\\&lt;br /&gt;
\\&lt;br /&gt;
'''instances''': integer: Number of local application instances.\\&lt;br /&gt;
This parameter is ignored for non local SCFs.\\&lt;br /&gt;
If non 0 it must be set to a value greater then 1.\\&lt;br /&gt;
Defaults to 0.\\&lt;br /&gt;
If non 0 the module will build the required number of SCFs and will pick them using a round-robin algorithm.\\&lt;br /&gt;
Each application's name will be built from SCF application name concatenated with instance suffix startting from 1.\\&lt;br /&gt;
E.g.:&lt;br /&gt;
 [=&lt;br /&gt;
[proxy SCP]&lt;br /&gt;
instances=2&lt;br /&gt;
=]&lt;br /&gt;
Will build 2 applications: SCP1 and SCP2.\\&lt;br /&gt;
\\&lt;br /&gt;
'''handles''': string: Comma separated list of operations received from the SSF accepted by this SCF.\\&lt;br /&gt;
Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP, all operations that are handled by a SCF should be listed, otherwise the proxy will report to the SSF an error.\\&lt;br /&gt;
\\&lt;br /&gt;
'''waittime''': integer: Time, in miliseconds, to wait for a result from a SCF while being in Waiting For Instructions state, after which the dialog is aborted.\\&lt;br /&gt;
Defaults to 3000.\\&lt;br /&gt;
Minimum allowed value is 1000.\\&lt;br /&gt;
\\&lt;br /&gt;
All other parameters starting with 'addr.' prefix will be put in dialog begin message sent for this SCF.\\&lt;br /&gt;
They should be set for non local SCFs.\\&lt;br /&gt;
Parameters:&lt;br /&gt;
* '''addr.CalledPartyAddress.route''' - string. It can be set to values: gt/ssn. It specifies how the SCCP address should be routed.&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn''' - integer. It's the SSN number in case of SSN routing.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt''' - string. GTT number digits for the SCF.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.encoding''' - string. It specifies the encoding for the GT digits. It is usually set to bcd.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.tt''' - integer. It specifies the GT translation type. It is usually set to 0.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.np''' - string. The GT numbering plan. It is usually set to isdn. It can be one of the following values: unknown, isdn, e164, generic, data, x121, telex, maritime-mobile, e210, e211, land-mobile, e212, isdn-mobile, e214, network-specific.&lt;br /&gt;
* '''addr.CalledPartyAddress.gt.nature''' - string. It specifies the nature of the GT number. It is usually set to international.It can have one the following values: unknown, subscriber, national-reserved, national-significant, international.&lt;br /&gt;
* '''addr.CallingPartyAddress.route'''&lt;br /&gt;
* '''addr.CalledPartyAddress.ssn'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.encoding'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.tt'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.np'''&lt;br /&gt;
* '''addr.CallingPartyAddress.gt.nature''' &lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
 [=&lt;br /&gt;
[general]&lt;br /&gt;
application=camelProxy&lt;br /&gt;
servicekey=1&lt;br /&gt;
gt=8820003&lt;br /&gt;
&lt;br /&gt;
[proxy crbt-scp]&lt;br /&gt;
servicekey=2&lt;br /&gt;
local=true&lt;br /&gt;
&lt;br /&gt;
[proxy pps-scp]&lt;br /&gt;
servicekey=99&lt;br /&gt;
priority=2&lt;br /&gt;
errorfatal=true&lt;br /&gt;
handles=applyChargingReport&lt;br /&gt;
addr.CalledPartyAddress.gt=8820007&lt;br /&gt;
addr.CalledPartyAddress.route=gt&lt;br /&gt;
addr.CalledPartyAddress.gt.encoding=bcd&lt;br /&gt;
addr.CalledPartyAddress.gt.tt=0&lt;br /&gt;
addr.CalledPartyAddress.gt.np=isdn&lt;br /&gt;
addr.CalledPartyAddress.gt.nature=international&lt;br /&gt;
addr.CallingPartyAddress.gt=8820003&lt;br /&gt;
addr.CallingPartyAddress.route=gt&lt;br /&gt;
addr.CallingPartyAddress.gt.encoding=bcd&lt;br /&gt;
addr.CallingPartyAddress.gt.tt=0&lt;br /&gt;
addr.CallingPartyAddress.gt.np=isdn&lt;br /&gt;
addr.CallingPartyAddress.gt.nature=international&lt;br /&gt;
=]&lt;br /&gt;
&lt;br /&gt;
=== camel_map configuration ===&lt;br /&gt;
 [=&lt;br /&gt;
[local camelProxy]&lt;br /&gt;
translator=scp_proxy&lt;br /&gt;
capabilities=Camel&lt;br /&gt;
&lt;br /&gt;
[tcap scp_proxy]&lt;br /&gt;
type=CAMEL&lt;br /&gt;
tcap=tcap_msc&lt;br /&gt;
port=0&lt;br /&gt;
&lt;br /&gt;
[local pps-scp]&lt;br /&gt;
translator=scp_pps&lt;br /&gt;
capabilities=Camel&lt;br /&gt;
&lt;br /&gt;
[tcap scp_pps]&lt;br /&gt;
type=CAMEL&lt;br /&gt;
tcap=tcap_pps&lt;br /&gt;
port=0&lt;br /&gt;
=]&lt;br /&gt;
===camel_bcsm_proxy.conf.sample===&lt;br /&gt;
 [=&lt;br /&gt;
; NOTE: This module is not loaded automatically, it needs a line in yate.conf:&lt;br /&gt;
; [postload]&lt;br /&gt;
; ${modulepath}/sig/camel_bcsm_proxy${modsuffix}=yes&lt;br /&gt;
&lt;br /&gt;
[general]&lt;br /&gt;
; Unless explicitly specified, all parameters are applied on reload for new&lt;br /&gt;
;  dialogs only&lt;br /&gt;
; All parameters starting with 'addr.' prefix will be put in the first message sent to SSF&lt;br /&gt;
&lt;br /&gt;
; application: string: Application parameter in camel messages sent by the module&lt;br /&gt;
; This parameter is required&lt;br /&gt;
; This parameter is not applied on reload&lt;br /&gt;
;application=&lt;br /&gt;
&lt;br /&gt;
; gt: string: Global Title to be set in the first message sent in the SSF dialog&lt;br /&gt;
; This parameter is applied on reload for new dialogs only&lt;br /&gt;
; If non empty other calling party address parameters will be set to default values&lt;br /&gt;
; This parameter can be overriden by addr.CallingPartyAddress.gt parameter&lt;br /&gt;
;gt=&lt;br /&gt;
&lt;br /&gt;
; servicekey: integer: CAMEL serviceKey to check in received initialDP messages and&lt;br /&gt;
;  set when forwarding them to SCFs&lt;br /&gt;
; Allowed interval: 0..2147483647&lt;br /&gt;
; Defaults to 0 if missing or invalid&lt;br /&gt;
; This parameter is applied on reload for new dialogs only&lt;br /&gt;
;servicekey=0&lt;br /&gt;
&lt;br /&gt;
; query_scf: boolean: Query for proxied SCFs update when processing initialDP&lt;br /&gt;
; Is enabled a 'scf.query' message will be enqueued and the module will wait&lt;br /&gt;
;  for a 'scf.response' message to continue IDP processing&lt;br /&gt;
; The response must return the list of SCFs to proxy&lt;br /&gt;
; The list may be shorter then configured SCFs&lt;br /&gt;
; New SCFs, other then configured ones, will be ignored&lt;br /&gt;
; The following SCF parameters can be overridden: priority, servicekey, errorfatal,&lt;br /&gt;
;  handles, waittime and all parameters starting with 'addr.' prefix&lt;br /&gt;
; Defaults to no&lt;br /&gt;
;query_scf=no&lt;br /&gt;
&lt;br /&gt;
; component_ttl: integer: Component time to live in milliseconds&lt;br /&gt;
; Minimum allowed value is 1000&lt;br /&gt;
; Defaults to 15000&lt;br /&gt;
;component_ttl=15000&lt;br /&gt;
&lt;br /&gt;
; dialog_idle_ttl: integer: Dialog idle (nothing sent/received) time to live in milliseconds&lt;br /&gt;
; Minimum allowed value is 1000&lt;br /&gt;
; It can be set to 0 to keep it alive until the remote party terminates the dialog&lt;br /&gt;
; Defaults to 5000&lt;br /&gt;
;dialog_idle_ttl=5000&lt;br /&gt;
&lt;br /&gt;
; dialog_ended_ttl: integer: Ended dialog time to live in milliseconds&lt;br /&gt;
; Minimum allowed value is 1000.&lt;br /&gt;
; It can be set to 0 to remove the dialog after termination&lt;br /&gt;
; Defaults to 0&lt;br /&gt;
;dialog_ended_ttl=0&lt;br /&gt;
&lt;br /&gt;
; export_xml_as: string: Specify in which way the XML will be passed along into&lt;br /&gt;
;  Yate messages&lt;br /&gt;
; Allowed values are:&lt;br /&gt;
;  - string: pass the XML as a string&lt;br /&gt;
;  - object: pass the XML as an object&lt;br /&gt;
;  - both: pass the XML as a string and object&lt;br /&gt;
; Defaults to object&lt;br /&gt;
;export_xml_as=object&lt;br /&gt;
&lt;br /&gt;
; print_msg: boolean/string: Print sent/received messages to output if debug&lt;br /&gt;
;  level is at least 9&lt;br /&gt;
; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
; If verbose is specified, the message will be dumped on output&lt;br /&gt;
; Defaults to no&lt;br /&gt;
;print_msg=no&lt;br /&gt;
&lt;br /&gt;
; print_xml: boolean/string: Print sent/received XML data to output if debug&lt;br /&gt;
;  level is at least 9&lt;br /&gt;
; This parameter is ignored if print_msg is disabled&lt;br /&gt;
; Allowed values are boolean values or 'verbose' string&lt;br /&gt;
; If verbose is specified, XML elements' children, attributes or text will be&lt;br /&gt;
;  shown on separate lines&lt;br /&gt;
; Defaults to no&lt;br /&gt;
;print_xml=no&lt;br /&gt;
&lt;br /&gt;
; idp_calling_required: boolean: Calling party number is required (non empty) in initialDP&lt;br /&gt;
; Default to yes&lt;br /&gt;
;idp_calling_required=yes&lt;br /&gt;
&lt;br /&gt;
; idp_called_required: boolean: Called party number is required (non empty) in initialDP&lt;br /&gt;
; Default to yes&lt;br /&gt;
;idp_called_required=yes&lt;br /&gt;
&lt;br /&gt;
; dispatcher_maxthreads: integer: Maximum number of message dispatch threads to use&lt;br /&gt;
; Set to 0 to enqueue messages using yate engine&lt;br /&gt;
; Defaults to 0&lt;br /&gt;
; When reloaded it can't be set to 0 (e.g. once set to a non 0 value it can be changed to&lt;br /&gt;
;  non 0 values only)&lt;br /&gt;
;dispatcher_maxthreads=0&lt;br /&gt;
&lt;br /&gt;
;dispatcher_priority: string: Default priority of message dispatch threads&lt;br /&gt;
; Can be one of: lowest, low, normal, high, highest&lt;br /&gt;
; High priorities need superuser privileges on POSIX operating systems&lt;br /&gt;
; Low priorities are not recommended except for debugging&lt;br /&gt;
; Defaults to 'normal'&lt;br /&gt;
; This parameter is applied on reload for new threads only&lt;br /&gt;
;dispatcher_priority=normal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[proxy appname]&lt;br /&gt;
; This section configures a proxied SCF&lt;br /&gt;
; 'appname' is the application name to be used for the SCF&lt;br /&gt;
&lt;br /&gt;
; enable: boolean: Enable the SCF&lt;br /&gt;
; Defaults to yes&lt;br /&gt;
;enable=yes&lt;br /&gt;
&lt;br /&gt;
; priority: integer: Priority in handling messages from SSF&lt;br /&gt;
; Defaults to 0&lt;br /&gt;
;priority=0&lt;br /&gt;
&lt;br /&gt;
; servicekey: integer: Value with which the IDP serviceKey should be rewritten&lt;br /&gt;
; Allowed interval: 0..2147483647&lt;br /&gt;
; Defaults to SSF service key set in 'general' section&lt;br /&gt;
;servicekey=&lt;br /&gt;
&lt;br /&gt;
; dp: string: Comma separated list of detection points that should match the one received in IDP&lt;br /&gt;
;  in order to contact this SCF&lt;br /&gt;
; Items may be DP value or name&lt;br /&gt;
; Defaults to termAttemptAuthorized if empty or all DPs are invalid&lt;br /&gt;
;dp=termAttemptAuthorized&lt;br /&gt;
&lt;br /&gt;
; endfatal: boolean: Indicate whether or not terminate the proxy dialog when this dialog ends&lt;br /&gt;
; Defaults to no&lt;br /&gt;
;endfatal=no&lt;br /&gt;
&lt;br /&gt;
; errorfatal: boolean: Indicate whether or not an error or reject component from&lt;br /&gt;
;  the SCF should terminate the whole proxy dialog&lt;br /&gt;
; Defaults to no&lt;br /&gt;
;errorfatal=no&lt;br /&gt;
&lt;br /&gt;
; local: boolean: The SCF is local (a local application) or external (it passes&lt;br /&gt;
;  through the SS7 network to reach it)&lt;br /&gt;
; Defaults to no (external application)&lt;br /&gt;
;local=no&lt;br /&gt;
&lt;br /&gt;
; instances: integer: Number of local application instances&lt;br /&gt;
; If non 0 the module will build the required number of SCFs and will pick them using a&lt;br /&gt;
;  round-robin algorithm&lt;br /&gt;
; Each application's name will be built from SCF application name concatenated with instance&lt;br /&gt;
;  suffix startting from 1&lt;br /&gt;
; E.g.&lt;br /&gt;
; [proxy SCP]&lt;br /&gt;
; instances=2&lt;br /&gt;
; Will build 2 applications: SCP1 and SCP2&lt;br /&gt;
; This parameter is ignored for non local SCFs&lt;br /&gt;
; If non 0 it must be set to a value greater then 1&lt;br /&gt;
; Defaults to 0&lt;br /&gt;
;instance=&lt;br /&gt;
&lt;br /&gt;
; handles: string: Comma separated list of operations received from the SSF&lt;br /&gt;
;  accepted by this SCF&lt;br /&gt;
; NOTE: Except ERB (Event Report BCSM), which is sent to all SCFs that match the reported DP,&lt;br /&gt;
;  all operations that are handled by a SCF should be listed, otherwise the&lt;br /&gt;
;  proxy will report to the SSF an error&lt;br /&gt;
;handles=&lt;br /&gt;
&lt;br /&gt;
; waittime: integer: Time, in miliseconds, to wait for a result from a SCF&lt;br /&gt;
;  while being in Waiting For Instructions state, after which the dialog&lt;br /&gt;
;  is aborted&lt;br /&gt;
; Defaults to 3000&lt;br /&gt;
; Minimum allowed value is 1000&lt;br /&gt;
;waittime=3000&lt;br /&gt;
&lt;br /&gt;
; All other parameters starting with 'addr.' prefix will be put in dialog begin&lt;br /&gt;
;  message sent for this SCF&lt;br /&gt;
; E.g. addr.CalledPartyAddress.route=gt will be put as CalledPartyAddress.route=gt&lt;br /&gt;
&lt;br /&gt;
=]&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CAMEL_proxy</id>
		<title>CAMEL proxy</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CAMEL_proxy"/>
				<updated>2013-10-28T11:22:13Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: Created page with &amp;quot;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''camel_proxy.php'' module provides functionality that allows that a single gsmSSF CAMEL invocation be proxied to multiple SCFs. The aim of this module is to provide a way of providing multiple CAMEL services on a single CAMEL request.&lt;br /&gt;
&lt;br /&gt;
The main purpose is to be able to provide CRBT and PPS (PrePaid Service) facilities in parallel.&lt;br /&gt;
&lt;br /&gt;
The layout for such a scenario will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CamelProxy.png]]&lt;br /&gt;
&lt;br /&gt;
What it basically does is that for one IDP invocation, the proxy will be able to translate it to multiple IDPs sent to multiple SCPs, either locally (like the CRBT one) or external.&lt;br /&gt;
The proxy keeps an evidence of these multiple invocations and aggregates them into a single, valid dialogue with the invoking SSP.&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:16:15Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Abnormal procedures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Script behaviour==&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 4===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
=====Initial DP ServiceKey mismatch /  DP mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Initial DP missing parameters=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Application context mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
=====Receiving an unsupported CAMEL phase=====&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Errors received from SSF / Timeout detected for class 1 and 3 operations=====&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 2.1.2.1 - 2.1.2.4 shall also apply here:&lt;br /&gt;
* [[#Initial DP ServiceKey mismatch / DP mismatch|Initial DP ServiceKey mismatch / DP mismatch]]&lt;br /&gt;
* [[#Initial DP missing parameters| Initial DP missing parameters]]&lt;br /&gt;
* [[#Application context mismatch| Application context mismatch]]&lt;br /&gt;
* [[#Receiving an unsupported CAMEL phase| Receiving an unsupported CAMEL phase]]&lt;br /&gt;
&lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:15:30Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Abnormal procedures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Script behaviour==&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 4===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
=====Initial DP ServiceKey mismatch /  DP mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Initial DP missing parameters=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Application context mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
=====Receiving an unsupported CAMEL phase=====&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Errors received from SSF / Timeout detected for class 1 and 3 operations=====&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 2.1.2.1 - 2.1.2.4 shall also apply here.&lt;br /&gt;
* [[#Initial DP ServiceKey mismatch / DP mismatch ]]&lt;br /&gt;
* [[#Initial DP missing parameters ]]&lt;br /&gt;
* [[#Application context mismatch ]]&lt;br /&gt;
* [[#Receiving an unsupported CAMEL phase ]]&lt;br /&gt;
&lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:13:34Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* 1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Script behaviour==&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 4===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
=====Initial DP ServiceKey mismatch /  DP mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Initial DP missing parameters=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Application context mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
=====Receiving an unsupported CAMEL phase=====&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Errors received from SSF / Timeout detected for class 1 and 3 operations=====&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:13:20Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* 1.2.3 Application context mismatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Script behaviour==&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 4===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
=====Initial DP ServiceKey mismatch /  DP mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Initial DP missing parameters=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Application context mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
=====Receiving an unsupported CAMEL phase=====&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations=====&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:12:11Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Script behaviour==&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 4===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
=====Initial DP ServiceKey mismatch /  DP mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Initial DP missing parameters=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
=====1.2.3 Application context mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
=====Receiving an unsupported CAMEL phase=====&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations=====&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:11:41Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Behaviour */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Script behaviour==&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 4===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
=====Initial DP ServiceKey mismatch /  DP mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
=====Initial DP missing parameters=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
=====1.2.3 Application context mismatch=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
=====Receiving an unsupported CAMEL phase=====&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations=====&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Behaviour CAMEL phase 2/3==&lt;br /&gt;
&lt;br /&gt;
===Normal procedure for dialogue===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
===Abnormal procedures===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
===Errors received from SSF===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:09:49Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Yate side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* setting port to 0 will disable the support for TCP applications&lt;br /&gt;
* the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
==Behaviour==&lt;br /&gt;
&lt;br /&gt;
===Script behaviour===&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
====Behaviour CAMEL phase 4====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Normal procedure for dialogue=====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
=====Abnormal procedures=====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
======Initial DP ServiceKey mismatch /  DP mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
======Initial DP missing parameters======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
======1.2.3 Application context mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
======Receiving an unsupported CAMEL phase======&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations======&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:06:53Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Script side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
 '''Note:'''&lt;br /&gt;
 * setting port to 0 will disable the support for TCP applications&lt;br /&gt;
 * the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
==Behaviour==&lt;br /&gt;
&lt;br /&gt;
===Script behaviour===&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
====Behaviour CAMEL phase 4====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Normal procedure for dialogue=====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
=====Abnormal procedures=====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
======Initial DP ServiceKey mismatch /  DP mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
======Initial DP missing parameters======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
======1.2.3 Application context mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
======Receiving an unsupported CAMEL phase======&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations======&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:05:57Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a &amp;lt;tt&amp;gt;[tcap name]&amp;lt;/tt&amp;gt; section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named &amp;lt;tt&amp;gt;[local appName]&amp;lt;/tt&amp;gt; should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
 '''Note:'''&lt;br /&gt;
 * setting port to 0 will disable the support for TCP applications&lt;br /&gt;
 * the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
==Behaviour==&lt;br /&gt;
&lt;br /&gt;
===Script behaviour===&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
====Behaviour CAMEL phase 4====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Normal procedure for dialogue=====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
=====Abnormal procedures=====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
======Initial DP ServiceKey mismatch /  DP mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
======Initial DP missing parameters======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
======1.2.3 Application context mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
======Receiving an unsupported CAMEL phase======&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations======&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T11:05:06Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Script side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule &amp;lt;tt&amp;gt;$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID&amp;lt;/tt&amp;gt;.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a @@[tcap name]@@ section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named @@[local appName]@@ should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
 '''Note:'''&lt;br /&gt;
 * setting port to 0 will disable the support for TCP applications&lt;br /&gt;
 * the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
==Behaviour==&lt;br /&gt;
&lt;br /&gt;
===Script behaviour===&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
====Behaviour CAMEL phase 4====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Normal procedure for dialogue=====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
=====Abnormal procedures=====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
======Initial DP ServiceKey mismatch /  DP mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
======Initial DP missing parameters======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
======1.2.3 Application context mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
======Receiving an unsupported CAMEL phase======&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations======&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T10:32:22Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Script side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule @@$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID@@.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a @@[tcap name]@@ section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named @@[local appName]@@ should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
 '''Note:'''&lt;br /&gt;
 * setting port to 0 will disable the support for TCP applications&lt;br /&gt;
 * the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
==Behaviour==&lt;br /&gt;
&lt;br /&gt;
===Script behaviour===&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
====Behaviour CAMEL phase 4====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Normal procedure for dialogue=====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
=====Abnormal procedures=====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
======Initial DP ServiceKey mismatch /  DP mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
======Initial DP missing parameters======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
======1.2.3 Application context mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
======Receiving an unsupported CAMEL phase======&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations======&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T10:31:00Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
'&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule @@$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID@@.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a @@[tcap name]@@ section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named @@[local appName]@@ should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
 '''Note:'''&lt;br /&gt;
 * setting port to 0 will disable the support for TCP applications&lt;br /&gt;
 * the name of the local application should match the name set in ''$appName'' for the script&lt;br /&gt;
&lt;br /&gt;
==Behaviour==&lt;br /&gt;
&lt;br /&gt;
===Script behaviour===&lt;br /&gt;
&lt;br /&gt;
This is a global script that awaits dialog beginnings from SSFs and it is able to handle CAMEL phases 2, 3 and 4.&lt;br /&gt;
The phase used for handling the call  will be determined using the information provided in the InitialDP operation using the following rules:&lt;br /&gt;
* first, an application context check will be done. As seeing that every phase has a different context assigned, phase will be first determined at this stage.&lt;br /&gt;
* if the application context determined a phase 4 handling, in the handling of the InitialDP operation these additional checks will be made:&lt;br /&gt;
** the value for ''supportedCamelPhases'' will be checked. In this parameter, the MSC advertises the CAMEL phases that it can handle. From that list, the SCP will choose the highest phase advertised.&lt;br /&gt;
** the value for ''offeredCamel4Functionalities'' will be checked. SCP will verify that all the CAMEL 4 functionalities required for doing CRBT handling in phase 4 are supported. If that is not so, the SCP will downgrade the phase to phase 2 as seeing that the presence of this parameter implied phase 4 functionality and phase 4 functionality implies, by convention, prior phases support also.&lt;br /&gt;
&lt;br /&gt;
In case of phase 1 detection, the SCP will end the dialogue either with an Abort with application-context-not-supported, either with a Continue operation for CAMEL.&lt;br /&gt;
&lt;br /&gt;
An configuration parameter was added (''$maxPhase'') - mainly for testing purposes - in order to limit what phase the SCP will accept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bellow there is detailed description of how the script will act in different scenarios.&lt;br /&gt;
&lt;br /&gt;
====Behaviour CAMEL phase 4====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Normal procedure for dialogue=====&lt;br /&gt;
&lt;br /&gt;
In case of a normal, error free dialogue, things will proceed according to the describing flow below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
  1.    --------------------- IDP(serviceKey,termAttemptAuth) --------------------------------&amp;gt;&lt;br /&gt;
  2.    &amp;lt;-------------------- RRBE (tAbandon,leg1) --------------------------------------------&lt;br /&gt;
  3.    &amp;lt;-------------------- DL (leg2) -------------------------------------------------------&lt;br /&gt;
  4.    --------------------- DL Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  5.    &amp;lt;-------------------- ICA (CS2,leg3) --------------------------------------------------&lt;br /&gt;
  6.    --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
  7.    &amp;lt;-------------------- RRBE (oTermSeized,oBusy,oAnswer,oNoAnswer,routeFailure,leg3) ----&lt;br /&gt;
  8.    &amp;lt;-------------------- CWA (leg3)-------------------------------------------------------&lt;br /&gt;
  9.    --------------------- ERBE (oTermSeized,leg3) ----------------------------------------&amp;gt;&lt;br /&gt;
  10.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  11.   &amp;lt;-------------------- ETC (CS1) -------------------------------------------------------&lt;br /&gt;
  12.   --------------------- ERBE (oAnswer,leg3) --------------------------------------------&amp;gt;&lt;br /&gt;
  13.   &amp;lt;-------------------- DFCWA (CS1) -----------------------------------------------------&lt;br /&gt;
  14.   &amp;lt;-------------------- ML (leg3) -------------------------------------------------------&lt;br /&gt;
  15.   --------------------- ML Result ------------------------------------------------------&amp;gt;&lt;br /&gt;
  16.   &amp;lt;-------------------- CWA (leg3) ------------------------------------------------------&lt;br /&gt;
  17.   &amp;lt;-------------------- CWA (CS1) -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
In case of busy received from the called party, the call flow is:&lt;br /&gt;
&lt;br /&gt;
  1.  --------------- ERBE (oCalledPartyBusy, leg3, cause) ----------------------&amp;gt;&lt;br /&gt;
  2. &amp;lt;-------------- RC (cause received in ERBE/Busy) --------------------------&lt;br /&gt;
&lt;br /&gt;
=====Abnormal procedures=====&lt;br /&gt;
&lt;br /&gt;
The following schematics will describe the behaviour of the script in certain scenarios. &lt;br /&gt;
The numbers assigned above (in the normal dialogue schematic) designate states in the dialogue. These will be used to describe a starting state for when an error is detected.&lt;br /&gt;
&lt;br /&gt;
======Initial DP ServiceKey mismatch /  DP mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(unexpectedDataValue) --------------------------------&lt;br /&gt;
&lt;br /&gt;
======Initial DP missing parameters======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReturnError(missingParameter) -----------------------------------&lt;br /&gt;
&lt;br /&gt;
======1.2.3 Application context mismatch======&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
        --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- U_Abort (user-application-context-name-not-supported) -----------&lt;br /&gt;
&lt;br /&gt;
======Receiving an unsupported CAMEL phase======&lt;br /&gt;
&lt;br /&gt;
This error can be detected upon receiving an InitialDP operation, or in the ReturnResult for InitiateCallAttempt. Depending upon the state when the error is detected, handling will be done as described below:&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     1. --------------------- IDP(serviceKey,oTermAttemptAuth) -------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
     6. --------------------- ICA Result -----------------------------------------------------&amp;gt;&lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall -----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======1.2.5 Errors received from SSF / Timeout detected for class 1 and 3 operations======&lt;br /&gt;
&lt;br /&gt;
The following schematics describe general error procedures when a error is reported by the SSF or when a result for an operation is not received in the specified time allotted for the operation.&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 1 / 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 4 / 5 / 13/ 14   &lt;br /&gt;
        &amp;lt;-------------------- ReleaseCall --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 6  - 11  &lt;br /&gt;
    14.  &amp;lt;-------------------- MoveLeg --------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Behaviour CAMEL phase 2/3===&lt;br /&gt;
&lt;br /&gt;
====Normal procedure for dialogue====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagrams will detail the operation of the CRBT script in case of normal, error free phase 2/3 handling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        SSF                                                                                    SCP&lt;br /&gt;
     1. -------------------------- IDP (serviceKey, termAttemptAuth) ---------------------------&amp;gt;&lt;br /&gt;
     2. &amp;lt;------ RRBE (leg1,tAbandon) &amp;amp; (leg2,tBusy,tAnswer,tNoAnswer)----------------------------&lt;br /&gt;
     3. &amp;lt;------------------------- ETC ----------------------------------------------------------&lt;br /&gt;
     4. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
     5. -------------------------- ERBE (leg2,tAnswer) ------------------------------------------&lt;br /&gt;
     6. &amp;lt;------------------------- DFC ----------------------------------------------------------&lt;br /&gt;
     7. &amp;lt;------------------------- CONT ---------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
====Abnormal procedures====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Situations described in sections 1.2.1 - 1.2.4 shall also apply here.&lt;br /&gt;
 &lt;br /&gt;
====Errors received from SSF====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
       SSF                                                                                   SCP&lt;br /&gt;
                  SCP can be in either of the states : 2 / 3   &lt;br /&gt;
        &amp;lt;-------------------- Continue --------------------------------------------------------&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/CRBT_logic</id>
		<title>CRBT logic</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/CRBT_logic"/>
				<updated>2013-10-28T10:26:20Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: Created page with &amp;quot;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.  Upon service invoca...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The crbt_scp.php is an implementation for a CAMEL gsmSCP application which provides a Colourful Ring Back Tone service by interfacing with a CAMEL gsmSSF.&lt;br /&gt;
&lt;br /&gt;
Upon service invocation, this script implements the required actions in order to instruct the gsmSSF to provide the required ringback tone.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
===Script side===&lt;br /&gt;
&lt;br /&gt;
The CRBT script supports two ways of communicating with Yate:&lt;br /&gt;
# One based on the XML protocol, communication being realized through a TCP socket.&lt;br /&gt;
# The other one based done through Yate messages, using ''extmodule''.&lt;br /&gt;
The way which the script will use is chosen according to configuration - in particular, through the ''$ioType'' setting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuration of this script is done through ''config.php''. This allows setting the following parameters:&lt;br /&gt;
&lt;br /&gt;
* 1. '''$appName'''- value of the ''application'' parameters set in the ''camel.message''. This value is used to check that the message is indeed intented for this script.&lt;br /&gt;
&lt;br /&gt;
* 2. '''$ioType''' - type of I/O to use to communicate with Yate. The script recognizes these two values:&lt;br /&gt;
** ''TCP'' - use the configured TCP socket to communicate with Yate.&lt;br /&gt;
** ''MSG'' - use messages through exmodule protocol for communication.&lt;br /&gt;
&lt;br /&gt;
* 3. '''$host''','''$port''' - host and port where the application should connect to in order to communicate with Yate if ''$ioType'' is set to ''TCP''.&lt;br /&gt;
'&lt;br /&gt;
* 4. '''$transTimeout''' - integer. It sets the time for which the PHP TCAP library will keep alive a TCAP dialogue after remaining with no active components. A new TCAP message will reset the associated timer. If the timer runs out, the library will generate a TCAP End in order to terminate the dialog. For this application, this timer is set by default to 180 seconds.&lt;br /&gt;
&lt;br /&gt;
* 5. '''$findMelodyID''' - boolean. It specifies whether the gsmSCF should take the necessary steps in order to find out the required ringtone for the called user. Its default value is false, meaning that the gsmSCF will assume that all requests reaching it are requests for subscribers which have the service activated&lt;br /&gt;
&lt;br /&gt;
* 6. '''$httpRequest''' - string. It's the HTTP request to be made in order to find out the ringtone associated with the user.&lt;br /&gt;
&lt;br /&gt;
* 7. '''$myServiceKey''' - integer. The ID of the service provided by this gsmSCF application and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 8. '''$myDP''' - string. The DP for which this SCP should be triggered and which should come in IDP in order to accept the request.&lt;br /&gt;
&lt;br /&gt;
* 9. '''$sendAll''' - bool. If true, it will send all response components batched in a single TCAP message, otherwise it will send them each with its own TCAP message. It is set by default to true.&lt;br /&gt;
&lt;br /&gt;
* 10. '''$buildSRFNum''' - string. It specifies how the address of the gsmSRF for the EstablishTemporaryConnection operation will be built. It can have of of the following values:&lt;br /&gt;
** ''prefix_called'' - build the gsmSRF address following this rule @@$srfNumber.$srfSeparator.$correlationID.$srfSeparator.$sfcID@@.&lt;br /&gt;
** ''fixed_number'' - use ''$srfNumber'' as a fixed address for the gsmSRF address. Setting this means that correlationID and scfID for ETC wil be set separately.&lt;br /&gt;
&lt;br /&gt;
When instructing the SSF to establish a temporary connection to a SRF through an ETC operation, the SCF must provide addressing information to the SSF in regards to the SRF. This information requires:&lt;br /&gt;
* the address of the SRF - a routable number&lt;br /&gt;
* a correlation ID - that can mean whatever the operators want, but that, according to specification, can be used by the SRF if/when contacting the SCF in order to associate the SSF -&amp;gt; SCF dialogue with the SRF -&amp;gt;SCF dialogue.&lt;br /&gt;
* a scfID - an ID for the contacting SCF. This could be used by the SRF to know where to contact the SCF.&lt;br /&gt;
&lt;br /&gt;
The script provides this information in an ETC operation in 2 ways:&lt;br /&gt;
* providing all the above information in the assistingSSPIPAddress. This is done by concatenating the SRF number, correlation ID and scfID -according to an agreement between the SSF and SCF operators. The script simply concatenates these parameters, putting between them the configured separator.&lt;br /&gt;
* providing the information in 3 separated parameters:&lt;br /&gt;
** assistingSSPIPAddress - the SRF Number&lt;br /&gt;
** correlationID - the script will set this parameter to either the melody ID or the called party number, encoded in hexified BCD form.&lt;br /&gt;
** scfID - the script will set this parameter to the hexified BCD form of the SCP's GT number.&lt;br /&gt;
&lt;br /&gt;
Listed bellow are the parameters that need to be configured for the gsmSRF number:&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber''' - string. It specifies a number at which the gsmSRF is found.&lt;br /&gt;
&lt;br /&gt;
* '''$srfSeparator''' - string. Digit(s) used as separator between SRF number, correlationID and sfcID when the assistingSSPIPAddress contains all of them.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_qualifier''' - string. It specifies the GenericNumber qualifier. It can be one of the following values:&lt;br /&gt;
** ''dialed-digits''&lt;br /&gt;
** ''called-additional''&lt;br /&gt;
** ''caller-failed''&lt;br /&gt;
** ''caller-not-screened''&lt;br /&gt;
** ''terminating''&lt;br /&gt;
** ''connected-additional''&lt;br /&gt;
** ''caller-additional''&lt;br /&gt;
** ''called-original''&lt;br /&gt;
** ''redirecting''&lt;br /&gt;
** ''redirection''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_complete''' - boolean. It specifies whether the called number is complete or not. It should be complete.&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_nature''' - string. Nature of number. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''international''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''network-specific''&lt;br /&gt;
** ''subscriber''&lt;br /&gt;
** ''reserved''&lt;br /&gt;
** ''abbreviated''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_plan''' - string. It's the used numbering plan. It can have one of the following values:&lt;br /&gt;
** ''unknown''&lt;br /&gt;
** ''isdn''&lt;br /&gt;
** ''data''&lt;br /&gt;
** ''telex''&lt;br /&gt;
** ''land-mobile''&lt;br /&gt;
** ''isdn-mobile''&lt;br /&gt;
** ''national''&lt;br /&gt;
** ''private''&lt;br /&gt;
** ''extension-reserved''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_restrict''' - string. It specifies the presentation of the number. Possible values are:&lt;br /&gt;
** ''allowed''&lt;br /&gt;
** ''restricted''&lt;br /&gt;
** ''unavailable''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
* '''$srfNumber_screened''' - string. It specifies the screening indicator for the number. Possible values are:&lt;br /&gt;
** ''user-provided''&lt;br /&gt;
** ''user-provided-passed''&lt;br /&gt;
** ''user-provided-failed''&lt;br /&gt;
** ''network-provided''&lt;br /&gt;
** ''no''&lt;br /&gt;
** ''false''&lt;br /&gt;
** ''yes''&lt;br /&gt;
** ''true''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 11. '''$shortTimer''', '''$mediumTimer''', '''$longTimer''' - integer. Timeout values for operations. Some operation have short timeouts, other medium or long times. These parameters configure their values. These default to 3,6 and 9 seconds respectively. In case of larger delays on the network, they should be increased.&lt;br /&gt;
&lt;br /&gt;
* 12. '''$maxPhase''' - integer.Represents the maximum CAMEL phase allowed for CAMEL interaction. If not set, it will default to 4, meaning that all supported CAMEL phases are allowed.&lt;br /&gt;
&lt;br /&gt;
* 13. '''$msStateNotAllowed''' - array. List of states received for the subscriber in IDP for which the SCP will abandon CRBT handling and will continue with the call. Recognized values are:&lt;br /&gt;
** ''assumedIdle''&lt;br /&gt;
** ''camelBusy''&lt;br /&gt;
** ''netDetNotReachable''&lt;br /&gt;
** ''notProvidedFromVLR''&lt;br /&gt;
It has no default, meaning that it will do CRBT handling ignoring the subscriber state.&lt;br /&gt;
&lt;br /&gt;
* 14. '''$noAnswerTimer''' - integer. Timer value to be set when arming o/tNoAnswer. If not configured, this value will not be provided by RRBE. If set, the SSF should report a noAnswer DP after the timer value has expired and no other event was armed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* 15. '''$prearrangedEndOn''' - array. List of DP events reported as notifications that should determine a prearranged end situation. The listed events should match events listed for BCSMs in camel_map module (see  s_eventTypeBCSM[] in camel_map.cpp). In no events are listed, basic termination will be assumed for all DPs that represent an end to the TCAP dialogue.&lt;br /&gt;
&lt;br /&gt;
'''Note''' - The following parameters need not be set usually:&lt;br /&gt;
* ''$host'', ''$port'' - set only if you intend to use TCP communication.&lt;br /&gt;
* ''$transTimeout''&lt;br /&gt;
* ''$sendAll''&lt;br /&gt;
* ''$shortTimer'', ''$mediumTimer'', ''$longTimer''&lt;br /&gt;
* ''$maxPhase''&lt;br /&gt;
* ''$msStateNotAllowed''&lt;br /&gt;
* ''$prearrangedEndOn'' - if there is no prearranged end agreement between operator, this doesn't need to be configured.&lt;br /&gt;
&lt;br /&gt;
* 16. '''$mynum''' - string. GTT number assigned to this SCP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Yate side===&lt;br /&gt;
&lt;br /&gt;
On the Yate side, the ''camel_map'' module must be configured through ''camel_map.conf''. &lt;br /&gt;
&lt;br /&gt;
For functionality provided through a TCP socket, a @@[tcap name]@@ section should be configured. A section looks like this:&lt;br /&gt;
&lt;br /&gt;
  [tcap camel] -- what comes after ''tcap'' will be the name of the translator&lt;br /&gt;
  ;enable=no -- enable this translator&lt;br /&gt;
  tcap=tcap-test-itu -- TCAP to be used by the translator for SS7 network communication, a section with that name should be configured in ''ysigchan.conf''&lt;br /&gt;
  host=0.0.0.0 -- address on which to listen for incoming applications&lt;br /&gt;
  port=16101 -- port on which to listen for incoming applications&lt;br /&gt;
  type=CAMEL -- type of translator (MAP/CAMEL). For the intended case, CAMEL should be set&lt;br /&gt;
  print-messages=true -- whether or not to print TCAP and XML messages in the logs&lt;br /&gt;
  add-encoding=false -- whether to add encoding attribute to data translated to XML&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For functionality through Yate messages, an additional section, named @@[local appName]@@ should be configured:&lt;br /&gt;
  &lt;br /&gt;
  [local camelLocal] - what comes after ''local'' will be the name of the application&lt;br /&gt;
  ;enable=no -- enable this application&lt;br /&gt;
  translator=camel - which translator should be used. A section named [tcap translatorValue] should be present in the config file.&lt;br /&gt;
  capabilities=Camel - capabilities supported by this application. CAMEL translator have only one capability and that is ''Camel''.&lt;br /&gt;
  export_xml_as=both - how to export the XML part: string, object or both?&lt;br /&gt;
&lt;br /&gt;
 '''Note:'''&lt;br /&gt;
 * setting port to 0 will disable the support for TCP applications&lt;br /&gt;
 * the name of the local application should match the name set in ''$appName'' for the script&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Main_Page"/>
				<updated>2013-09-02T12:40:34Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==YATE's TCAP XML Interface==&lt;br /&gt;
&lt;br /&gt;
 Note! I believe this page should hold a guide on what this website offers, not technical info as it currently does.&lt;br /&gt;
 &lt;br /&gt;
The purpose of this document is to describe the XML based protocol used to implement communication between TCAP and the application servers for mobile services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MAP (Mobile Application Part) and CAMEL (Customized Application of Mobile Enhanced Logic) are SS7 protocols used for authentication, registration, messaging, call control and billing in mobile networks. Both protocols are based on TCAP (Transaction Capabilities Application Part) which is a transaction oriented protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This protocol aims to map the structure of MAP and CAMEL messages and messageless TCAP primitives on XML messages as transparently as possible. However, some concepts of the TCAP layer will reflect in the message flow and in some of the parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each communication between two network elements happens inside a dialog created by the first message. Multiple components can exist inside the dialog, each with its own direction and timing. The dialog is ended normally when the last component finished exchanging data. The correlation of simultaneously happening dialogs and components is done using unique identifiers. Dialogs hold a local ID and a remote ID. Each such ID must be unique per communication endpoint.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Components also hold an ID inside the dialog. Each such ID must be unique per component and direction. It is important to note that same numeric ID may be used for components invoked from the opposing sides of the connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following picture shows a transaction with two components: &lt;br /&gt;
&lt;br /&gt;
[[File:tcap_transaction.png]]&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Introduction</id>
		<title>Introduction</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Introduction"/>
				<updated>2013-09-02T12:39:06Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Introduction}}&lt;br /&gt;
&lt;br /&gt;
The purpose of this document is to describe the XML based protocol used to implement communication between TCAP and the application servers for mobile services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MAP (Mobile Application Part) and CAMEL (Customized Application of Mobile Enhanced Logic) are SS7 protocols used for authentication, registration, messaging, call control and billing in mobile networks. Both protocols are based on TCAP (Transaction Capabilities Application Part) which is a transaction oriented protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This protocol aims to map the structure of MAP and CAMEL messages and messageless TCAP primitives on XML messages as transparently as possible. However, some concepts of the TCAP layer will reflect in the message flow and in some of the parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each communication between two network elements happens inside a dialog created by the first message. Multiple components can exist inside the dialog, each with its own direction and timing. The dialog is ended normally when the last component finished exchanging data. The correlation of simultaneously happening dialogs and components is done using unique identifiers. Dialogs hold a local ID and a remote ID. Each such ID must be unique per communication endpoint.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Components also hold an ID inside the dialog. Each such ID must be unique per component and direction. It is important to note that same numeric ID may be used for components invoked from the opposing sides of the connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following picture shows a transaction with two components: &lt;br /&gt;
&lt;br /&gt;
[[File:tcap_transaction.png]]&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Introduction</id>
		<title>Introduction</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Introduction"/>
				<updated>2013-09-02T12:38:25Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Introduction - YATE's TCAP XML Interface}}&lt;br /&gt;
&lt;br /&gt;
The purpose of this document is to describe the XML based protocol used to implement communication between TCAP and the application servers for mobile services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MAP (Mobile Application Part) and CAMEL (Customized Application of Mobile Enhanced Logic) are SS7 protocols used for authentication, registration, messaging, call control and billing in mobile networks. Both protocols are based on TCAP (Transaction Capabilities Application Part) which is a transaction oriented protocol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This protocol aims to map the structure of MAP and CAMEL messages and messageless TCAP primitives on XML messages as transparently as possible. However, some concepts of the TCAP layer will reflect in the message flow and in some of the parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each communication between two network elements happens inside a dialog created by the first message. Multiple components can exist inside the dialog, each with its own direction and timing. The dialog is ended normally when the last component finished exchanging data. The correlation of simultaneously happening dialogs and components is done using unique identifiers. Dialogs hold a local ID and a remote ID. Each such ID must be unique per communication endpoint.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Components also hold an ID inside the dialog. Each such ID must be unique per component and direction. It is important to note that same numeric ID may be used for components invoked from the opposing sides of the connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following picture shows a transaction with two components: &lt;br /&gt;
&lt;br /&gt;
[[File:tcap_transaction.png]]&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Error_codes</id>
		<title>Error codes</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Error_codes"/>
				<updated>2013-09-02T12:36:30Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: /* Error Codes - CAMEL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents:&lt;br /&gt;
#[[#Error codes - GSM MAP|Error codes - GSM MAP]]&lt;br /&gt;
#[[#Error codes - CAMEL|Error codes - CAMEL]]&lt;br /&gt;
&lt;br /&gt;
==Error codes - GSM MAP==&lt;br /&gt;
&lt;br /&gt;
Unless a dash appears in the optional parameters an extensionContainer can be added to an error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Optional parameters&lt;br /&gt;
|-&lt;br /&gt;
|unknownSubscriber&lt;br /&gt;
|1&lt;br /&gt;
|unknownSubscriberDiagnostic&lt;br /&gt;
|-&lt;br /&gt;
|unknownMSC&lt;br /&gt;
|3&lt;br /&gt;
|– &lt;br /&gt;
|-&lt;br /&gt;
|absentsubscriberSM&lt;br /&gt;
|6&lt;br /&gt;
|absentSubscriberDiagnosticSM, additionalAbsentSubscriberDiagnosticSM&lt;br /&gt;
|-&lt;br /&gt;
|unknownEquipment&lt;br /&gt;
|7&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|roamingNotAllowed&lt;br /&gt;
|8&lt;br /&gt;
|additionalRoamingNotAllowedCause&lt;br /&gt;
|-&lt;br /&gt;
|illegalSubscriber&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bearerServiceNotProvisioned&lt;br /&gt;
|10&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|teleserviceNotProvisioned&lt;br /&gt;
|11&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|illegalEquipment&lt;br /&gt;
|12&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|callBarred&lt;br /&gt;
|13&lt;br /&gt;
|'''Mandatory: callBarringCause''', unauthorisedMessageOriginator&lt;br /&gt;
|-&lt;br /&gt;
|cug-Reject&lt;br /&gt;
|15&lt;br /&gt;
|cug-RejectCause&lt;br /&gt;
|-&lt;br /&gt;
|illegalSS-Operation&lt;br /&gt;
|16&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|ss-ErrorStatus&lt;br /&gt;
|17&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|ss-NotAvailable&lt;br /&gt;
|18&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|ss-SubscriptionViolation&lt;br /&gt;
|19&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|ss-Incompatibility&lt;br /&gt;
|20&lt;br /&gt;
|ss-Code, basicService, ss-Status&lt;br /&gt;
|-&lt;br /&gt;
|facilityNotSupported&lt;br /&gt;
|21&lt;br /&gt;
|shapeOfLocationEstimateNotSupported, neededLcsCapabilityNotSupportedInServingNode&lt;br /&gt;
|-&lt;br /&gt;
|absentSubscriber&lt;br /&gt;
|27&lt;br /&gt;
|absentSubscriberReason&lt;br /&gt;
|-&lt;br /&gt;
|subscriberBusyForMT-SMS&lt;br /&gt;
|31&lt;br /&gt;
|gprsConnectionSuspended&lt;br /&gt;
|-&lt;br /&gt;
|sm-DeliveryFailure&lt;br /&gt;
|32&lt;br /&gt;
|'''Mandatory: sm-EnumeratedDeliveryFailureCause''', diagnosticInfo&lt;br /&gt;
|-&lt;br /&gt;
|messageWaitingListFull&lt;br /&gt;
|33&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|pw-RegistrationFailure	&lt;br /&gt;
|37&lt;br /&gt;
|'''Mandatory: reason value'''&lt;br /&gt;
|-&lt;br /&gt;
|negativePW-Check&lt;br /&gt;
|38&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|noRoamingNumberAvailable&lt;br /&gt;
|39&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|tracingBufferFull&lt;br /&gt;
|40&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|busySubscriber	&lt;br /&gt;
|45&lt;br /&gt;
|ccbs-Possible, ccbs-Busy&lt;br /&gt;
|-&lt;br /&gt;
|noSubscriberReply&lt;br /&gt;
|46&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|unauthorizedRequestingNetwork&lt;br /&gt;
|52&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Error codes - CAMEL==&lt;br /&gt;
Unless a dash appears in the optional parameters an extensionContainer can be added to an error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Optional parameters&lt;br /&gt;
|-&lt;br /&gt;
|cancelled&lt;br /&gt;
|0&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|cancelFailed&lt;br /&gt;
|1&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|eTCFailed&lt;br /&gt;
|3&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|improperCallerResponse&lt;br /&gt;
|4&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|missingCustomerRecord&lt;br /&gt;
|6&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|missingParameter&lt;br /&gt;
|7&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|parameterOutOfRange&lt;br /&gt;
|8&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|requestedInfoError&lt;br /&gt;
|10&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|systemFailure&lt;br /&gt;
|11&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|taskRefused&lt;br /&gt;
|12&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|unavailableResource&lt;br /&gt;
|13&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedComponentSequence&lt;br /&gt;
|14&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedData&lt;br /&gt;
|15&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedParameter&lt;br /&gt;
|16&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unknownLegID&lt;br /&gt;
|17&lt;br /&gt;
|–&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Error_codes</id>
		<title>Error codes</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Error_codes"/>
				<updated>2013-09-02T12:36:17Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents:&lt;br /&gt;
#[[#Error codes - GSM MAP|Error codes - GSM MAP]]&lt;br /&gt;
#[[#Error codes - CAMEL|Error codes - CAMEL]]&lt;br /&gt;
&lt;br /&gt;
==Error codes - GSM MAP==&lt;br /&gt;
&lt;br /&gt;
Unless a dash appears in the optional parameters an extensionContainer can be added to an error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Optional parameters&lt;br /&gt;
|-&lt;br /&gt;
|unknownSubscriber&lt;br /&gt;
|1&lt;br /&gt;
|unknownSubscriberDiagnostic&lt;br /&gt;
|-&lt;br /&gt;
|unknownMSC&lt;br /&gt;
|3&lt;br /&gt;
|– &lt;br /&gt;
|-&lt;br /&gt;
|absentsubscriberSM&lt;br /&gt;
|6&lt;br /&gt;
|absentSubscriberDiagnosticSM, additionalAbsentSubscriberDiagnosticSM&lt;br /&gt;
|-&lt;br /&gt;
|unknownEquipment&lt;br /&gt;
|7&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|roamingNotAllowed&lt;br /&gt;
|8&lt;br /&gt;
|additionalRoamingNotAllowedCause&lt;br /&gt;
|-&lt;br /&gt;
|illegalSubscriber&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bearerServiceNotProvisioned&lt;br /&gt;
|10&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|teleserviceNotProvisioned&lt;br /&gt;
|11&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|illegalEquipment&lt;br /&gt;
|12&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|callBarred&lt;br /&gt;
|13&lt;br /&gt;
|'''Mandatory: callBarringCause''', unauthorisedMessageOriginator&lt;br /&gt;
|-&lt;br /&gt;
|cug-Reject&lt;br /&gt;
|15&lt;br /&gt;
|cug-RejectCause&lt;br /&gt;
|-&lt;br /&gt;
|illegalSS-Operation&lt;br /&gt;
|16&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|ss-ErrorStatus&lt;br /&gt;
|17&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|ss-NotAvailable&lt;br /&gt;
|18&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|ss-SubscriptionViolation&lt;br /&gt;
|19&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|ss-Incompatibility&lt;br /&gt;
|20&lt;br /&gt;
|ss-Code, basicService, ss-Status&lt;br /&gt;
|-&lt;br /&gt;
|facilityNotSupported&lt;br /&gt;
|21&lt;br /&gt;
|shapeOfLocationEstimateNotSupported, neededLcsCapabilityNotSupportedInServingNode&lt;br /&gt;
|-&lt;br /&gt;
|absentSubscriber&lt;br /&gt;
|27&lt;br /&gt;
|absentSubscriberReason&lt;br /&gt;
|-&lt;br /&gt;
|subscriberBusyForMT-SMS&lt;br /&gt;
|31&lt;br /&gt;
|gprsConnectionSuspended&lt;br /&gt;
|-&lt;br /&gt;
|sm-DeliveryFailure&lt;br /&gt;
|32&lt;br /&gt;
|'''Mandatory: sm-EnumeratedDeliveryFailureCause''', diagnosticInfo&lt;br /&gt;
|-&lt;br /&gt;
|messageWaitingListFull&lt;br /&gt;
|33&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|pw-RegistrationFailure	&lt;br /&gt;
|37&lt;br /&gt;
|'''Mandatory: reason value'''&lt;br /&gt;
|-&lt;br /&gt;
|negativePW-Check&lt;br /&gt;
|38&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|noRoamingNumberAvailable&lt;br /&gt;
|39&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|tracingBufferFull&lt;br /&gt;
|40&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|busySubscriber	&lt;br /&gt;
|45&lt;br /&gt;
|ccbs-Possible, ccbs-Busy&lt;br /&gt;
|-&lt;br /&gt;
|noSubscriberReply&lt;br /&gt;
|46&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|unauthorizedRequestingNetwork&lt;br /&gt;
|52&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Error Codes - CAMEL==&lt;br /&gt;
Unless a dash appears in the optional parameters an extensionContainer can be added to an error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Optional parameters&lt;br /&gt;
|-&lt;br /&gt;
|cancelled&lt;br /&gt;
|0&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|cancelFailed&lt;br /&gt;
|1&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|eTCFailed&lt;br /&gt;
|3&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|improperCallerResponse&lt;br /&gt;
|4&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|missingCustomerRecord&lt;br /&gt;
|6&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|missingParameter&lt;br /&gt;
|7&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|parameterOutOfRange&lt;br /&gt;
|8&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|requestedInfoError&lt;br /&gt;
|10&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|systemFailure&lt;br /&gt;
|11&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|taskRefused&lt;br /&gt;
|12&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|unavailableResource&lt;br /&gt;
|13&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedComponentSequence&lt;br /&gt;
|14&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedData&lt;br /&gt;
|15&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedParameter&lt;br /&gt;
|16&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unknownLegID&lt;br /&gt;
|17&lt;br /&gt;
|–&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Error_codes</id>
		<title>Error codes</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Error_codes"/>
				<updated>2013-09-02T12:32:40Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents:&lt;br /&gt;
#[[#Error codes - GSM MAP|Error codes - GSM MAP]]&lt;br /&gt;
#[[#Error codes - CAMEL|Error codes - CAMEL]]&lt;br /&gt;
&lt;br /&gt;
==Error Codes - GSM MAP==&lt;br /&gt;
&lt;br /&gt;
Unless a dash appears in the optional parameters an extensionContainer can be added to an error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Optional parameters&lt;br /&gt;
|-&lt;br /&gt;
|unknownSubscriber&lt;br /&gt;
|1&lt;br /&gt;
|unknownSubscriberDiagnostic&lt;br /&gt;
|-&lt;br /&gt;
|unknownMSC&lt;br /&gt;
|3&lt;br /&gt;
|– &lt;br /&gt;
|-&lt;br /&gt;
|absentsubscriberSM&lt;br /&gt;
|6&lt;br /&gt;
|absentSubscriberDiagnosticSM, additionalAbsentSubscriberDiagnosticSM&lt;br /&gt;
|-&lt;br /&gt;
|unknownEquipment&lt;br /&gt;
|7&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|roamingNotAllowed&lt;br /&gt;
|8&lt;br /&gt;
|additionalRoamingNotAllowedCause&lt;br /&gt;
|-&lt;br /&gt;
|illegalSubscriber&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bearerServiceNotProvisioned&lt;br /&gt;
|10&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|teleserviceNotProvisioned&lt;br /&gt;
|11&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|illegalEquipment&lt;br /&gt;
|12&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|callBarred&lt;br /&gt;
|13&lt;br /&gt;
|'''Mandatory: callBarringCause''', unauthorisedMessageOriginator&lt;br /&gt;
|-&lt;br /&gt;
|cug-Reject&lt;br /&gt;
|15&lt;br /&gt;
|cug-RejectCause&lt;br /&gt;
|-&lt;br /&gt;
|illegalSS-Operation&lt;br /&gt;
|16&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|ss-ErrorStatus&lt;br /&gt;
|17&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|ss-NotAvailable&lt;br /&gt;
|18&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|ss-SubscriptionViolation&lt;br /&gt;
|19&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|ss-Incompatibility&lt;br /&gt;
|20&lt;br /&gt;
|ss-Code, basicService, ss-Status&lt;br /&gt;
|-&lt;br /&gt;
|facilityNotSupported&lt;br /&gt;
|21&lt;br /&gt;
|shapeOfLocationEstimateNotSupported, neededLcsCapabilityNotSupportedInServingNode&lt;br /&gt;
|-&lt;br /&gt;
|absentSubscriber&lt;br /&gt;
|27&lt;br /&gt;
|absentSubscriberReason&lt;br /&gt;
|-&lt;br /&gt;
|subscriberBusyForMT-SMS&lt;br /&gt;
|31&lt;br /&gt;
|gprsConnectionSuspended&lt;br /&gt;
|-&lt;br /&gt;
|sm-DeliveryFailure&lt;br /&gt;
|32&lt;br /&gt;
|'''Mandatory: sm-EnumeratedDeliveryFailureCause''', diagnosticInfo&lt;br /&gt;
|-&lt;br /&gt;
|messageWaitingListFull&lt;br /&gt;
|33&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|pw-RegistrationFailure	&lt;br /&gt;
|37&lt;br /&gt;
|'''Mandatory: reason value'''&lt;br /&gt;
|-&lt;br /&gt;
|negativePW-Check&lt;br /&gt;
|38&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|noRoamingNumberAvailable&lt;br /&gt;
|39&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|tracingBufferFull&lt;br /&gt;
|40&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|busySubscriber	&lt;br /&gt;
|45&lt;br /&gt;
|ccbs-Possible, ccbs-Busy&lt;br /&gt;
|-&lt;br /&gt;
|noSubscriberReply&lt;br /&gt;
|46&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|unauthorizedRequestingNetwork&lt;br /&gt;
|52&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Error Codes - CAMEL==&lt;br /&gt;
Unless a dash appears in the optional parameters an extensionContainer can be added to an error.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Optional parameters&lt;br /&gt;
|-&lt;br /&gt;
|cancelled&lt;br /&gt;
|0&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|cancelFailed&lt;br /&gt;
|1&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|eTCFailed&lt;br /&gt;
|3&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|improperCallerResponse&lt;br /&gt;
|4&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|missingCustomerRecord&lt;br /&gt;
|6&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|missingParameter&lt;br /&gt;
|7&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|parameterOutOfRange&lt;br /&gt;
|8&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|requestedInfoError&lt;br /&gt;
|10&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|systemFailure&lt;br /&gt;
|11&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|taskRefused&lt;br /&gt;
|12&lt;br /&gt;
|	&lt;br /&gt;
|-&lt;br /&gt;
|unavailableResource&lt;br /&gt;
|13&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedComponentSequence&lt;br /&gt;
|14&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedData&lt;br /&gt;
|15&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unexpectedParameter&lt;br /&gt;
|16&lt;br /&gt;
|–&lt;br /&gt;
|-&lt;br /&gt;
|unknownLegID&lt;br /&gt;
|17&lt;br /&gt;
|–&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Operation_codes</id>
		<title>Operation codes</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Operation_codes"/>
				<updated>2013-09-02T12:31:45Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contents:&lt;br /&gt;
#[[#Operation codes - GSM MAP|Operation codes - GSM MAP]]&lt;br /&gt;
#[[#Operation codes - CAMEL|Operation codes - CAMEL]]&lt;br /&gt;
&lt;br /&gt;
==Operation codes - GSM MAP==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Impl.&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|updateLocation&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|cancelLocation&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|provideRoamingNumber&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|insertSubscriberData&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deleteSubscriberData&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|registerSS&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|eraseSS&lt;br /&gt;
|11&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|activateSS&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deactivateSS&lt;br /&gt;
|13&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|interrogateSS&lt;br /&gt;
|14&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|authenticationFailureReport&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|registerPassword&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|getPassword&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|updateGprsLocation&lt;br /&gt;
|23&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendRoutingInfoForGprs&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|failureReport&lt;br /&gt;
|25&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reset&lt;br /&gt;
|37&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|forwardCheckSS-Indication&lt;br /&gt;
|38&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mt-forwardSM&lt;br /&gt;
|44&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendRoutingInfoForSM&lt;br /&gt;
|45&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|mo-forwardSM&lt;br /&gt;
|46&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reportSM-DeliveryStatus&lt;br /&gt;
|47&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|activateTracemMode&lt;br /&gt;
|50&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deactivateTraceMode&lt;br /&gt;
|51&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendAuthenticationInfo&lt;br /&gt;
|56&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|restoreData&lt;br /&gt;
|57&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendIMSI&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|processUnstructuredSS-Request&lt;br /&gt;
|59&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unstructuredSS-Request&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unstructuredSS-Notify&lt;br /&gt;
|61&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|informServiceCentre&lt;br /&gt;
|63&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|alertServiceCentre&lt;br /&gt;
|64&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|readyForSM&lt;br /&gt;
|66&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|purgeMS&lt;br /&gt;
|67&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|provideSubscriberInfo&lt;br /&gt;
|70&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|anyTimeInterrogation&lt;br /&gt;
|71&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|setReportingState&lt;br /&gt;
|73&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|statusReport&lt;br /&gt;
|74&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendRoutingInfoForLCS&lt;br /&gt;
|85&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Operation codes - CAMEL==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Impl.&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|initialDP&lt;br /&gt;
|0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|assistRequestInstructions&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|establishTemporaryConnection&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|disconnectForwardConnection&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|connectToResource&lt;br /&gt;
|19&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|connect&lt;br /&gt;
|20&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|releaseCall&lt;br /&gt;
|22&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|requestReportBCSMEvent&lt;br /&gt;
|23&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|eventReportBCSM&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|31&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|resetTimer&lt;br /&gt;
|33&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|furnishChargingInformation&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|applyCharging&lt;br /&gt;
|35&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|applyChargingReport&lt;br /&gt;
|36&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|callInformationReport&lt;br /&gt;
|44&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|callInformationRequest&lt;br /&gt;
|45&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendChargingInformation&lt;br /&gt;
|46&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendChargingInformation&lt;br /&gt;
|47&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|promptAndCollectUserInformation&lt;br /&gt;
|48&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|specializedResourceReport&lt;br /&gt;
|49&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|cancel&lt;br /&gt;
|53&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|activityTest&lt;br /&gt;
|55&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Operation_codes</id>
		<title>Operation codes</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Operation_codes"/>
				<updated>2013-09-02T12:31:20Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page&lt;br /&gt;
*[[#Operation codes - GSM MAP|Operation codes - GSM MAP]]&lt;br /&gt;
*[[#Operation codes - CAMEL|Operation codes - CAMEL]]&lt;br /&gt;
&lt;br /&gt;
==Operation codes - GSM MAP==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Impl.&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|updateLocation&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|cancelLocation&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|provideRoamingNumber&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|insertSubscriberData&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deleteSubscriberData&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|registerSS&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|eraseSS&lt;br /&gt;
|11&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|activateSS&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deactivateSS&lt;br /&gt;
|13&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|interrogateSS&lt;br /&gt;
|14&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|authenticationFailureReport&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|registerPassword&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|getPassword&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|updateGprsLocation&lt;br /&gt;
|23&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendRoutingInfoForGprs&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|failureReport&lt;br /&gt;
|25&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reset&lt;br /&gt;
|37&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|forwardCheckSS-Indication&lt;br /&gt;
|38&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mt-forwardSM&lt;br /&gt;
|44&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendRoutingInfoForSM&lt;br /&gt;
|45&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|mo-forwardSM&lt;br /&gt;
|46&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reportSM-DeliveryStatus&lt;br /&gt;
|47&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|activateTracemMode&lt;br /&gt;
|50&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deactivateTraceMode&lt;br /&gt;
|51&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendAuthenticationInfo&lt;br /&gt;
|56&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|restoreData&lt;br /&gt;
|57&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendIMSI&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|processUnstructuredSS-Request&lt;br /&gt;
|59&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unstructuredSS-Request&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unstructuredSS-Notify&lt;br /&gt;
|61&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|informServiceCentre&lt;br /&gt;
|63&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|alertServiceCentre&lt;br /&gt;
|64&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|readyForSM&lt;br /&gt;
|66&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|purgeMS&lt;br /&gt;
|67&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|provideSubscriberInfo&lt;br /&gt;
|70&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|anyTimeInterrogation&lt;br /&gt;
|71&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|setReportingState&lt;br /&gt;
|73&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|statusReport&lt;br /&gt;
|74&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendRoutingInfoForLCS&lt;br /&gt;
|85&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Operation codes - CAMEL==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Impl.&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|initialDP&lt;br /&gt;
|0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|assistRequestInstructions&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|establishTemporaryConnection&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|disconnectForwardConnection&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|connectToResource&lt;br /&gt;
|19&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|connect&lt;br /&gt;
|20&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|releaseCall&lt;br /&gt;
|22&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|requestReportBCSMEvent&lt;br /&gt;
|23&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|eventReportBCSM&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|31&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|resetTimer&lt;br /&gt;
|33&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|furnishChargingInformation&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|applyCharging&lt;br /&gt;
|35&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|applyChargingReport&lt;br /&gt;
|36&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|callInformationReport&lt;br /&gt;
|44&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|callInformationRequest&lt;br /&gt;
|45&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendChargingInformation&lt;br /&gt;
|46&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendChargingInformation&lt;br /&gt;
|47&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|promptAndCollectUserInformation&lt;br /&gt;
|48&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|specializedResourceReport&lt;br /&gt;
|49&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|cancel&lt;br /&gt;
|53&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|activityTest&lt;br /&gt;
|55&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Operation_codes</id>
		<title>Operation codes</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Operation_codes"/>
				<updated>2013-09-02T12:30:51Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On this page&lt;br /&gt;
*[[#Operation codes - GSM MAP|Operation codes - GSM MAP]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Operation codes - GSM MAP==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Impl.&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|updateLocation&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|cancelLocation&lt;br /&gt;
|3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|provideRoamingNumber&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|insertSubscriberData&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deleteSubscriberData&lt;br /&gt;
|8&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|registerSS&lt;br /&gt;
|10&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|eraseSS&lt;br /&gt;
|11&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|activateSS&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deactivateSS&lt;br /&gt;
|13&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|interrogateSS&lt;br /&gt;
|14&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|authenticationFailureReport&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|registerPassword&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|getPassword&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|updateGprsLocation&lt;br /&gt;
|23&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendRoutingInfoForGprs&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|failureReport&lt;br /&gt;
|25&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reset&lt;br /&gt;
|37&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|forwardCheckSS-Indication&lt;br /&gt;
|38&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|mt-forwardSM&lt;br /&gt;
|44&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendRoutingInfoForSM&lt;br /&gt;
|45&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|mo-forwardSM&lt;br /&gt;
|46&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|reportSM-DeliveryStatus&lt;br /&gt;
|47&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|activateTracemMode&lt;br /&gt;
|50&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deactivateTraceMode&lt;br /&gt;
|51&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendAuthenticationInfo&lt;br /&gt;
|56&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|restoreData&lt;br /&gt;
|57&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sendIMSI&lt;br /&gt;
|58&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|processUnstructuredSS-Request&lt;br /&gt;
|59&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unstructuredSS-Request&lt;br /&gt;
|60&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|unstructuredSS-Notify&lt;br /&gt;
|61&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|informServiceCentre&lt;br /&gt;
|63&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|alertServiceCentre&lt;br /&gt;
|64&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|readyForSM&lt;br /&gt;
|66&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|purgeMS&lt;br /&gt;
|67&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|provideSubscriberInfo&lt;br /&gt;
|70&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|anyTimeInterrogation&lt;br /&gt;
|71&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|setReportingState&lt;br /&gt;
|73&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|statusReport&lt;br /&gt;
|74&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendRoutingInfoForLCS&lt;br /&gt;
|85&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Operation codes - CAMEL==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left; color: green;&amp;quot;&lt;br /&gt;
|Name&lt;br /&gt;
|Code&lt;br /&gt;
|Impl.&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|initialDP&lt;br /&gt;
|0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|assistRequestInstructions&lt;br /&gt;
|16&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|establishTemporaryConnection&lt;br /&gt;
|17&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|disconnectForwardConnection&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|connectToResource&lt;br /&gt;
|19&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|connect&lt;br /&gt;
|20&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|releaseCall&lt;br /&gt;
|22&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|requestReportBCSMEvent&lt;br /&gt;
|23&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|eventReportBCSM&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|continue&lt;br /&gt;
|31&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|resetTimer&lt;br /&gt;
|33&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|furnishChargingInformation&lt;br /&gt;
|34&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|applyCharging&lt;br /&gt;
|35&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|applyChargingReport&lt;br /&gt;
|36&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|callInformationReport&lt;br /&gt;
|44&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|callInformationRequest&lt;br /&gt;
|45&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendChargingInformation&lt;br /&gt;
|46&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|sendChargingInformation&lt;br /&gt;
|47&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|promptAndCollectUserInformation&lt;br /&gt;
|48&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|specializedResourceReport&lt;br /&gt;
|49&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|cancel&lt;br /&gt;
|53&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-	&lt;br /&gt;
|activityTest&lt;br /&gt;
|55&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/ActivityTest</id>
		<title>ActivityTest</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/ActivityTest"/>
				<updated>2013-08-28T12:25:39Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:activityTest}}&lt;br /&gt;
==Capability: Camel==&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
This operation is used to check for the continued existence of a relationship between the gsmSCF and gsmSSF, gsmSCF and gsmSRF or gsmSCF and assistSSF. If the relationship is still in existence, then the gsmSSF, gsmSRF or assistSSF will respond.&lt;br /&gt;
&lt;br /&gt;
==Expected actions==&lt;br /&gt;
&lt;br /&gt;
* When receiving this operation, the receiving end will respond the this invocation in order to acknowledge that the connection is still in existence.&lt;br /&gt;
&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
This operation hasn't any invoke parameters.&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
&lt;br /&gt;
This operation expects a result.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
 	&amp;lt;component remoteCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;activityTest&amp;quot;/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/Cancel</id>
		<title>Cancel</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/Cancel"/>
				<updated>2013-08-28T12:25:15Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:cancel}}&lt;br /&gt;
==Capability: Camel== &lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
This operation is used by the gsmSCF to request the gsmSRF to cancel a correlated previous operation. The operation to be deleted can be either a PlayAnnouncement or a PromptAndCollectUserInformation operation. It can also be used to cancell all outstanding requests.&lt;br /&gt;
&lt;br /&gt;
==Expected actions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
* The operation contains one of the following parameters:&lt;br /&gt;
** '''invokeID''' – specifies the operation to be cancelled&lt;br /&gt;
** '''allRequests''' – indicates that all active requests for EventReportBCSM, ApplyChargingReport and CallInformationReport shall be cancelled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
&lt;br /&gt;
This operation does not expect a result.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
 	&amp;lt;component localCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;cancel&amp;quot;&amp;gt;&lt;br /&gt;
      		&amp;lt;cancelArg&amp;gt;&lt;br /&gt;
       		&amp;lt;allRequests/&amp;gt;&lt;br /&gt;
     		&amp;lt;/cancelArg&amp;gt;&lt;br /&gt;
   	&amp;lt;/component&amp;gt;&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	<entry>
		<id>https://ss7api.null.ro/index.php/SpecializedResourceReport</id>
		<title>SpecializedResourceReport</title>
		<link rel="alternate" type="text/html" href="https://ss7api.null.ro/index.php/SpecializedResourceReport"/>
				<updated>2013-08-28T12:24:55Z</updated>
		
		<summary type="html">&lt;p&gt;Monica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:specializedResourceReport}}&lt;br /&gt;
==Capability: Camel== &lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
This operation is used by the gsmSRF to indicate as a response to the gsmSCF that a “PlayAnnouncement” operation that the announcement was completed when a report indication was set.&lt;br /&gt;
&lt;br /&gt;
==Expected actions==&lt;br /&gt;
&lt;br /&gt;
==Invoke parameters==&lt;br /&gt;
&lt;br /&gt;
This operation has not any Invoke parameters.&lt;br /&gt;
&lt;br /&gt;
==Result parameters==&lt;br /&gt;
&lt;br /&gt;
This operation does not expect a result.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
 	&amp;lt;component localCID=&amp;quot;1&amp;quot; type=&amp;quot;Invoke&amp;quot; operationCode=&amp;quot;specializedResourceReport&amp;quot;/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Monica</name></author>	</entry>

	</feed>