[pjsip] Tips: difference between --proxy and --outbound options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

Please see this (new) article in PJSIP FAQ:
   http://www.pjsip.org/trac/wiki/FAQ#proxy-outbound

The --proxy option in pjsua application corresponds to 
pjsua_acc_config.proxy setting in PJSUA-LIB. This specifies the 
route set that is specific for the particular SIP account.

The --outbound option corresponds to pjsua_config.outbound_proxy 
setting in PJSUA-LIB. This specifies a global route set that is 
applicable for the whole endpoint (rather than a particular 
account), and will be used for all accounts in the application.

When --service-route option (this option corresponds to 
pjsua_acc_config.enable_service_route setting in PJSUA-LIB) is 
enabled for the account (default is disabled), the --proxy settings 
will be updated with the content of Service-Route header in 
successful REGISTER response. In other words, if Service-Route 
header is not present in 2xx REGISTER response, the --proxy settings 
for the account will be cleared.

Unlike --proxy option, the route settings in --outbound option are 
not be affected by Service-Route processing.

Both --proxy and --outbound options can be specified multiple times 
in pjsua command line to specify more than one servers.

When both settings are present, the initial total route set for a 
particular account is built by appending the servers in --proxy 
option to the servers in --outbound option.

For example:

Account A has the following --proxy setting:

  --proxy sip:PA1;lr
  --proxy sip:PA2;lr

Account B has the following --proxy setting:

  --proxy sip:PB;lr

And the --outbound setting is the following:

  --outbound sip:PO;lr

With the above settings, the initial route set for account A will be 
computed as:

  Route: <sip:PO;lr>, <sip:PA1;lr>, <sip:PA2;lr>

While the initial route set for account B will be computed as:

  Route: <sip:PO;lr>, <sip:PB;lr>

If --service-route option is enabled for both accounts, and suppose 
the 2xx REGISTER responses for both accounts do not have 
Service-Route header, then the route sets for both accounts will be 
updated to contain only the outbound proxy:

  Route: <sip:PO;lr>


-- 
Benny Prijono
http://www.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux