Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example shows that the setting2 setting was added to the existing section of the configuration file.

If the section you're adding to appears more than once in the config, such as an endpoint and aor named the same in a pjsip.conf file, the section added to will be the first one defined unless you add a filter qualifier.

Without a qualifier:

Code Block
titleThis will fail because default_expiration isn't valid for an endpoint
[101]
type=endpoint
allow=ulaw
 
[101]
type=aor
default_expiration=1200
 
[101](+)
default_expiration=1200

 

With qualifiers:

Code Block
titleThis works because the filters ensure that the additions are to the correct objects.
[101]
type=endpoint
allow=ulaw
 
[101]
type=aor
default_expiration=1200
 
[101](+type=aor)
default_expiration=1200

[101](+type=endpoint)
allow=g722

 

You'r e not limited to filtering by the type parameter and you can even use regular expressions in the name or value.

Code Block
titleA weird and not so useful example
[101]
type=endpoint
allow=ulaw
 
[101]
type=aor
default_expiration=1200
 
[101](+default_.*=36[0-9][0-9])
default_expiration=1200

[101](+type=endpoint)
allow=g722