Name
	ussd scrule create

SYNOPSIS
	ussd scrule create <short-code> <url> <flag> <protocol> <network-id>

DESCRIPTION
	This command is used to create a new routing rule for a short code for 
	PULL case only. This is not applicable for PUSH case.
	You can create a separate routing rule for an equal short code for each networkId.
	This means that a short code and networkId pair is used as a routing rule identifier.

	Standard Parameters

	short-code        - USSD short code which when dialed by user and received 
                        by USSD Gw, will forward request to configured URL
                        
    url               - If rule is configured as HTTP, this should be the URL
                        where HTTP POST with XML payload should be forwarded to.
                        If rule is configured as SIP, INVITE will be sent to this 
                        ip:port
                        
    Optional Parameters
    
    flag              - flag is either true or false, default is true. If true that 
                        means this is exact match. If false, that means the dialed 
                        short-code begins with configured short-code. For example 
                        if you created below rule, and user dials *123*7776543*223#, 
                        it will match the rule and request will be forwarded to the 
                        URL http://myip:8080/mobiussd/recharge

                        ussd scrule create *123* http://myip:8080/mobiussd/recharge false
                        
    protocol          - USSD Gateway supports 2 protocols - HTTP and SIP (3GPP Specification 
                        24.390). If not specified default is HTTP. If protocol is HTTP, gateway
                        will forward request as HTTP POST. If its SIP, INVITE will be sent 
                        SIP Client.  
                        
    networkid         - USSD Gateway can be connected to multiple operators/network at same time
                        and each operator exposing same or different short-code. Each operator 
                        (jSS7 stack configured) has its unique networkid assigned and incoming
                        request can be matched with configured networkid here. Only if short-code 
                        and networkid match's, request is forwarded to corresponding url. Default
                        value is 0.                                                
	                                             
		

EXAMPLES
    ussd scrule create *519# http://localhost:8080/ussddemo/test

	The above command will create a new routing rule in the USSD Gateway for
	the short code *519#. When the user dials the short code *519#, the USSD
	Gateway will direct the HTTP POST request to the URL
	http://localhost:8080/ussddemo/test as specified by the routing rule.
	This rule will belong to the default networkId 0.

    ussd scrule create *916* http://localhost:8080/ussddemo/test2 true HTTP 2	

	The above command will create a new routing rule in the USSD Gateway for
	the short codes that are started from *916*. 
	Gateway will direct the HTTP POST request to the URL
	http://localhost:8080/ussddemo/test2 as specified by the routing rule.
	This rule will belong to the networkId 2.

    ussd scrule create *123* 127.0.0.1:5065 true SIP

	The above command will create a new routing rule in the USSD Gateway for
	the short codes that are started from *123*.
	Gateway will direct the SIP INVITE request to 127.0.0.1:5065.
	This rule will belong to the default networkId 0.

    ussd scrule create *321# 127.0.0.1:5066 SIP 4

	The above command will create a new routing rule in the USSD Gateway for
	the short code *321#.
	Gateway will direct the SIP INVITE request to 127.0.0.1:5066.
	This rule will belong to the networkId 4.

SEE ALSO
	ussd scrule, ussd scrule delete, ussd scrule modify, ussd scrule show

