[asterisk-dev] Callerid(num) limitations on chan_iax

dimas at dataart.com dimas at dataart.com
Tue Aug 4 10:51:17 CDT 2009


Hello.

Like many of us now :) I'm playing with Skype for Asterisk. I believe lots of people will be integrating it into their systems so I'd like to discuss one integration 'issue' I already seen. I believe we need some way to work around the issue.

The thing is that Skype ID of the calling user is received in CALLERID(num) variable. If you try sending the call further to other Asterisks by IAX you will quickly see that some IDs gets modified. Then you will find that check_access of chan_iax does call to ast_shrink_phone_number with calling number for some reason. The comment for this function says:

/*! \brief Clean up phone string
 * remove '(', ' ', ')', non-trailing '.', and '-' not in square brackets.
 * Basically, remove anything that could be invalid in a pattern.
 */
void ast_shrink_phone_number(char *n)


This function is probably good for numbers but it makes Skype IDs unusable ("test.test" becomes "testtest").

Obviously I could just remove that call to ast_shrink_phone_number but I wanted to discuss the thing first. After all someone put it there so there was reason.

So questions are:
1. What is the sense for chan_iax to do this kind of shrinking? I do not see where it does the same to called number, only calling gets modified...
2. Isn't it better to let callerid being anything you want within Asterisk and only "shrinking" it before sending to PRI or something?

Thanks.

Dmitry Andrianov



More information about the asterisk-dev mailing list