<div class="gmail_quote">On Tue, Mar 16, 2010 at 7:45 AM, Daniel Grotti <span dir="ltr"><<a href="mailto:daniel.grotti@klarya.it" target="_blank">daniel.grotti@klarya.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Hi Murf,<br>
this is what I get from CLI if I type : "[.]" instead of ".":<div><br>
<br>
[example]<br>
exten => test.skype/example[.]skype,1, NoOp(nothing)<br>
exten => test.skype/example[.]skype,n, Hangup() <br></div></div></blockquote><div><br>Daniel--<br><br>OK, I went and looked thru the source. The code doing this to your CID<br>number is ast_shrink_phone_number(). It gets called on your cid number<br>
and dutifully does this:<br><br>"remove '(', ' ', ')', non-trailing '.' and '-' not in square brackets.<br><br>Because the . is not at the end of the pattern, it gets wiped by this routine.<br>
There seems little to do about it, as is. The call to ast_shrink_phone_number() <br>is not optional or conditional. Apparently, asterisk is expecting plain phone numbers<br>with stuff like (715) 693-4855, or 715.693.4855, and will remove the cruft for you. That <br>
it's preserving dashes inside of brackets (and brackets, too), means it is expecting <br>to see patterns here.<br><br>So, I'd file a bug, and say that a dot in brackets should survive, too, along with a <br>dash in brackets. ...that to limit dots in the cid pattern to the last character is<br>
not good behavior.<br><br>Because of this, I wonder if your CID should begin with an "_".... you'll have to test<br>it out if they go and add the few lines to that routine they would need to, to allow<br>dots in the pattern string. My memory is failing me and I don't have enough time<br>
to go playing in the source code.<br><br>murf<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"><div>
<br></div>
CLI> show dialplan example<div><br>
[ Context 'example' created by 'pbx_config' ]<br></div>
'test.skype' (CID match <b>'example[]skype'</b>) => 1.
NoOp(nothing) [pbx_config]<br>
2. Hangup()
[pbx_config]<br>
<br>
<br>
As you can see the only "." has been erased.<br>
There is no problem on DID ("." notations works fine), but only in CID
field.<br>
I'm usign Asterisk 1.4.26.2<br>
<br>
Thanks,<br>
<br>
Daniel<br>
<p style="margin-bottom: 0cm;"><br>
</p>
<br>
Il 16/03/2010 14.19, Steve Murphy ha scritto:
<div><div></div><div><blockquote type="cite">Daniel--<br>
<br>
Haven't tried this myself, but have you tried '[.]' instead of just '.'
in the string (as a pattern search)?<br>
<br>
So,<br>
<br>
[example]<br>
exten => _test[.]skype/e[x]ample[.]skype,1, NoOp(nothing)<br>
exten => _test[.]skype/e[x]ample[.]skype,n, Hangup() <br>
<br>
If you don't really mean the cid matching (denoted with /), you have to
also 'escape' the '/'...<br>
<br>
and watch out for N,X,Z in the pattern, they mean something, and will
have to be 'escaped'<br>
like the '.' if you want them to match literally. I can't remember how
case is handled at the<br>
moment, so... just for safety, you can 'escape' the little 'x' also...<br>
<br>
murf<br>
<br>
<br>
<div class="gmail_quote">On Tue, Mar 16, 2010 at 5:59 AM, Daniel
Grotti <span dir="ltr"><<a href="mailto:daniel.grotti@klarya.it" target="_blank">daniel.grotti@klarya.it</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Hi all,<br>
using Skype for Asterisk I have the following problem.<br>
In my dialplan I need to have a CID matching (example.skype) over a DID
(test.skype) :<br>
<br>
[example]<br>
exten => test.skype/example.skype,1, NoOp(nothing)<br>
exten => test.skype/example.skype,n, Hangup() <br>
<br>
Where test.skype and example.skype are Skype business account.<br>
In this case, when I get a :<br>
<br>
CLI> show dialplan example<br>
<br>
I get:<br>
<br>
[ Context 'example' created by 'pbx_config' ]<br>
'<b>test.example</b>' (CID match '<b>danexample</b>') => 1.
NoOp(nothing) [pbx_config]<br>
2. Hangup()
[pbx_config]<br>
<br>
<br>
As you can see, the "." (dot) is disappeared and, of course, CID
matching doesn't work as I aspected.<br>
I've try to escape "." with something like that "\.", but nothing. <br>
It seems that asterisk doesn't consider "." in DID/CID evaluations.<br>
This is an important point, because many Skype account uses "dot"
notation.<br>
<br>
It seems to work, instead, with "_" or "-".<br>
<br>
Any clues?<br>
<br>
Regards,<br>
<br>
Daniel<br>
<div>
<p style="margin-bottom: 0cm;"><br>
</p>
</div>
</div>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a>
--<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Steve Murphy<br>
ParseTree Corp<br>
<br>
</blockquote>
</div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Steve Murphy<br>ParseTree Corp<br>
<br>