SIP query for CNAM and LNP
From Yate Documentation
(Difference between revisions)
(→Configuration file) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 127: | Line 127: | ||
; A value of -1 will use the SIP channel defaults | ; A value of -1 will use the SIP channel defaults | ||
;flags=-1 | ;flags=-1 | ||
+ | |||
+ | |||
+ | '''See also''' | ||
+ | |||
+ | * [http://en.wikipedia.org/wiki/Caller_id Caller Name] | ||
+ | * [http://en.wikipedia.org/wiki/Local_number_portability Local Number Portability] | ||
+ | * [[Telephony]] | ||
+ | |||
+ | [[Category:SIP]] [[Category:CNAM]] [[Category:LNP]] [[Category:Routing]] |
Latest revision as of 12:31, 4 November 2013
This routing module allows querying Name and Local Number Portability databases over the SIP protocol.
For each of the queries an INVITE without media is sent to the designated server. From the SIP answer (which is supposed to be a 3xx Redirect) the information is extracted according to the query type.
Parameters of the actual call are substituted in the template from the config file. This allows flexibility in how queries are performed.
Contents |
[edit] CNAM Message parameters
On call.preroute the module performs CNAM queries.
Input parameters:
- caller - required, must be in E.164 format to perform the query
- callername - if set (even empty) a query is not performed unless overridden
- querycnam - overrides the automatic decision if a query is to be made
Output parameters:
- callername - set from answer if query succeeds and returns a non-empty string
- querycnam - set to false if the query succeeds
[edit] LNP Message parameters
The LNP query is performed on the call.route message.
Input parameters:
- called - required, must be in E.164 format to perform the query
- npdi - if true a query is not performed unless overridden
- querylnp - overrides the automatic decision if a query is to be made
Output parameters:
- routing - set to the Routing Number from answer if query succeeds and rn=... is present
- npdi - set to true or false depending how npdi is set or present in answer
- querylnp - set to false if the query succeeds
[edit] Configuration
[edit] Enable loading of sip_cnam_lnp module
IMPORTANT: This feature module is not loaded automatically, it needs a line in yate.conf:
[postload] ${modulepath}/sip/sip_cnam_lnp${modsuffix}=yes
[edit] Configuration file
File sip_cnam_lnp.conf :
; IMPORTANT! ; This feature module is not loaded automatically, it needs a line in yate.conf: ; [postload] ; ${modulepath}/sip/sip_cnam_lnp${modsuffix}=yes [priorities] ; These settings that are read only at first initialization! ; Sets the priorities for installing relevant message handlers ; call.preroute: int: Priority of the call.preroute handler ; Should be set between 10 and 90 ;call.preroute=50 ; call.route: int: Priority of the call.route handler ; Should be set between 10 and 90 ;call.route=50 [cnam] ; Controls how CNAM queries are performed, a SIP 3xx answer is expected ; CNAM is taken from the description of P-Asserted-Identity URI ; Query is performed on call.preroute when callername is missing and caller is E.164 ; Parameters modified: callername, querycnam ; Actual call parameters ${...} are substituted in the strings ; callto: string: Template for the resource of the CNAM request ; This parameter is required for CNAM functionality ; Example: callto=sip/sip:${caller}@10.0.0.1 ;callto= ; caller: string: Template for the caller party number of the request ; It should not be modified ;caller=${caller} ; called: string: Template for the called party number of the request ; It can be used to force anonymous requests ;called=${called} ; timeout: int: Overall timeout of the SIP request in milliseconds ; It is limited to range 1000-30000 (1s to 30s) ;timeout=5000 ; flags: int: Miscellaneous flags for the SIP messages ; A value of -1 will use the SIP channel defaults ;flags=-1 [lnp] ; Controls how LNP queries are performed, a SIP 3xx answer is expected ; Routing Number and NPDI are taken from the Contact URI ; Query is performed on call.route when npdi is not true ; Parameters modified: routing, npdi, querylnp ; Actual call parameters ${...} are substituted in the strings ; callto: string: Template for the resource of the LNP request ; This parameter is required for LNP functionality ; Example: callto=sip/sip:${called}@10.0.0.2 ;callto= ; caller: string: Template for the caller party number of the request ; It can be used to force anonymous requests ;caller=${caller} ; called: string: Template for the called party number of the request ; It should not be modified ;called=${called} ; timeout: int: Overall timeout of the SIP request in milliseconds ; It is limited to range 1000-30000 (1s to 30s) ;timeout=5000 ; flags: int: Miscellaneous flags for the SIP messages ; A value of -1 will use the SIP channel defaults ;flags=-1
See also