Function sofia contact

From FreeSWITCH Wiki

Revision as of 19:29, 21 March 2012 by Crienzo (Talk | contribs)
Jump to: navigation, search

Sofia_contact is a function that returns the contact string of a sofia user. If it's not registered, the contact string is "error/user_not_registered".

You can use this function to trigger, for example, a specific message if the user is not registered or you could fire up some actions to find that user on another switch in a clustered environment.

sofia_contact profile/user@domain

Example.

sofia_contact internal/820383@sip.foo.com

Additional Examples:

^222 is equivalent to from a request uri to somewhere different:

<action application="bridge" data="${sofia_contact(internal/100@sys.local)}^222" />
<action application="bridge" data="{sip_route_uri=222}${sofia_contact(internal/100@sys.local)}" /> 

or, if you want to change the sip from user:

<action application="bridge" data="{sip_from_user=222}${sofia_contact(internal/100@sys.local)}" />
Personal tools

Community
Support FreeSWITCH