kamailio:k43-async-sip-routing-nodejs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
kamailio:k43-async-sip-routing-nodejs [2015/09/07 12:21] – [Kamailio Config File] adminkamailio:k43-async-sip-routing-nodejs [2015/09/07 12:34] – [SIP Routing] admin
Line 22: Line 22:
 The tutorial here is aiming to offer a basic example, which should help building more complex external applications for deciding the SIP routing to be performed by Kamailio. The tutorial here is aiming to offer a basic example, which should help building more complex external applications for deciding the SIP routing to be performed by Kamailio.
  
 +==== RTJSON Routing Document ====
 +
 +The structure for RTJSON routing document is detailed at:
 +
 +  * [[http://kamailio.org/docs/modules/stable/modules/rtjson.html#rtjson.json-routing-structure|RTJSON Readme - Document Structure]]
 +
 +Next is a partial example, with the attributes for one destination:
 +
 +<code javascript>
 +{
 + "version": "1.0",
 + "routing": "serial",
 + "routes":
 +  [
 +   {
 +     "uri": "sip:127.0.0.1:5080",
 +     "dst_uri": "sip:127.0.0.1:5082",
 +     "path": "<sip:127.0.0.1:5084>, <sip:127.0.0.1:5086>",
 +     "socket": "udp:127.0.0.1:5060",
 +     "headers": {
 +       "from": {
 +         "display": "Alice",
 +         "uri": "sip:alice@wonderland.com"
 +       },
 +       "to": {
 +         "display": "Bob",
 +         "uri": "sip:bob@wonderland.com"
 +       },
 +       "extra": "X-Hdr-A: abc\r\nX-Hdr-B: bcd\r\n"
 +     },
 +     "branch_flags": 8,
 +     "fr_timer": 5000,
 +     "fr_inv_timer": 30000
 +   },
 +...
 +  ]
 +}
 +</code>
 +
 +The **routing** field specify if Kamailio has to do serial or parallel forking. After that, the relevant routing information is an array of destinations stored in **routes** field.
 +
 +Each destination corresponds to a SIP branch that is going to be created by Kamailio. For each branch can be specified values to set:
 +
 +  * request uri
 +  * outbound proxy address (dst uri)
 +  * display name and uri for From/To headers
 +  * extra headers
 +  * retransmission and ringing timeouts
 +  * local socket or the path to be followed
 ===== Presentations ===== ===== Presentations =====
  

100%


Copyright 2010-2020 Asipto.com