<br><br><div class="gmail_quote">On Tue, May 25, 2010 at 12:48 PM, RR <span dir="ltr"><<a href="mailto:ranjtech@gmail.com">ranjtech@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello I want to follow up on this example from YEARS ago. I had tried using the variable "destination_number" but that didn't work, and I figured that it was because the To: header doesn't have the destination_number but has just the URI, so I thought I'd use sip_to_user instead.<div>
<br></div><div>We have calls coming in with the following info in the INVITE</div><div><br></div><div>From: "16469NNNNNN" <sip:16469NNNNNN;phone-context=+1@67.1x.xxx.xxx:5060;user=phone>;tag=SDru6fc01-gK0c10a887.</div>
<div>To: <sip:011390NNNNNNNNNN;phone-context=+39@xxx.xxx.xxx.xxx:5060;user=phone>.</div><div>(N and x are obviously being masked for privacy)</div><div><br></div><div>I use this info in the dialplan like so</div><div>
<br></div><div><div><include></div><div> <extension name="DIDtest"></div><div> <condition field="ani" expression="^(\+?|\+1?|1?)(6469NNNNNN).*$" break="never"></div>
<div> <action application="set" data="effective_caller_id_number=$2"/></div><div> <action application="set" data="effective_caller_id_name=$2"/></div><div>
</condition></div><div> <condition field="${sip_to_user}" expression="^(\+?|\+1?|1?|011?)(390NNNNNNNNNN).$" break="never"></div><div> <action application="set" data="continue_on_fail=false"/></div>
<div> <action application="set" data="hangup_after_bridge=true"/></div><div> <action application="set" data="domain_name=$${domain}"/></div><div> <action application="set" data="bypass_media=true"/></div>
<div> <action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/blade2/$2"/></div><div> </condition></div><div> </extension></div><div></include></div>
<div><br></div></div><div>However, the calls aren't passing the condition in this dialplan and thus not being forwarded to "blade2" server. In fact, even the 011 is not being stripped off. </div><div><br></div>
<div>What am I doing wrong?</div></blockquote><div><br>Create a quick test extension that only does an info dump. (See 9992 in default.xml for an example.) Make a call, look at the info dump, and make sure that what you think you are getting is really what you are getting. :)<br>
<br>-MC<br></div></div><br>