Aaron wrote:Three new dialplan variables have been added now:
${fromname} - Is the SIP header From name received in the original request,
${fromuriuser} - Is the SIP header From URI user received in the original header,
${username} - Is the username used in the SwitchCall command. Itdoes not provide any extra information and is provided for convenience.
When an incoming call arrives the above variable map to the SIP From header as:
From: ${fromname} <sip:${fromuriuser}@siphost.com>
Applying to:
From: "Joe Bloggs" <sip:012345@siphost.com>
${fromname} = "Joe Bloggs"
${fromuriuser} = 012345
An example of using these parameters to get incoming callerid passed through on an incoming call. Note that some providers use the From URI user for authentication so the below will need to be adjusted depending on the provider.
exten = user,1,Switch(anon,,1234@sip.blueface.ie,${fromname} <sip:${fromuriuser}@sip.mysipswitch.com>)
Aaron wrote:multiple contacts can now be recognised as belonging to a sipswitch user account for incoming calls. The approach for this is to register the contact name as:
<custom string>.<username>@sip.mysipswitch.com
The sipswitch will match on the <username> portion to determine the owner and then lookup an entry in their dialplan for <custom string>.<username>. If no entry is found the default behaviour is again to use the registered devices.