Unfortunately, this did not work. I was getting the entire text within parentheses as DID on Asterisk end. For example, InboundCallRoute sp2(1234567890;ui=2223334444) gave 1234567890;ui=2223334444 as DID on Asterisk side which did not match any configured route and went to catch all.
sp2(1234567890;ui=$1) was giving 1234567890;ui=` (yes, $1 was replaced with `).
When I tried SP2(1234567890@192.168.1.5:5060;ui=2223334444), Asterisk gave the following errors. $1 instead of 2223334444 caused backquote (`) to be sent in its place
---
[2014-09-11 23:10:34] WARNING[4089][C-00000033]: chan_sip.c:16376 check_auth: username mismatch, have <gvtrunk>, digest has <2223334444>
[2014-09-11 23:10:34] NOTICE[4089][C-00000033]: chan_sip.c:25528 handle_request_invite: Failed to authenticate device <sip:2223334444@192.168.1.5>;tag=SP229f7fbffe954544
---
You mentioned about this error earlier, but I do have a trunk created for obi110. It looks like I got it wrong. Can you please send me some pointers.
BTW, sp2(1234567890) worked just fine for InboundCallRoute on SP1 which is configured with Google Voice.
thanks