You can start by explaining what the error is and perhaps a log that shows the incoming invite.

On 07/06/2011 06:52 PM, Roman Gelfand wrote:
It seems that the following logic in itsp routable is not working. Can you tell me what is wrong with it.
    if ( ds.length == 12 && ds.charAt(0) == '9' )
       {
        profile.sipMessage.setRequestUriUser(ds.substring(1));
        profile.sipMessage.setFromUser("1XXXXXXXXX6");
        profile.bridge("1XXXXXXXXX6", "passwd1");
       }
    else if ( ds.length == 11 && ds.charAt(0) == '9' )
       {
        profile.sipMessage.setRequestUriUser('1' + ds.substring(1));
        profile.sipMessage.setFromUser("1XXXXXXXXX6");
        profile.bridge("1XXXXXXXXX6", "passwd1");
       }
    else if ( ds.length == 8 && ds.charAt(0) == '9' )
       {
        profile.sipMessage.setRequestUriUser('1732' + ds.substring(1));
        profile.sipMessage.setFromUser("1XXXXXXXXX6");
        profile.bridge("1XXXXXXXXX6", "passwd1");
       }
    else if ( ds.length == 11 && ds.charAt(0) == '1' )
       {
        profile.sipMessage.setFromUser("1XXXXXXXXX0");
        profile.bridge("1XXXXXXXXX0", "passwd2");
       }
    else if ( ds.length == 10 )
       {
        profile.sipMessage.setRequestUriUser('1' + ds);
        profile.sipMessage.setFromUser("1XXXXXXXXX0");
        profile.bridge("1XXXXXXXXX0", "passwd2");
       }
    else if ( ds.length == 7 )
       {
        profile.sipMessage.setRequestUriUser('1732' + ds);
        profile.sipMessage.setFromUser("1XXXXXXXXX0");
        profile.bridge("1XXXXXXXXX0", "passwd2");
       }
    else return false;
Thanks in advance


_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/

_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/

Reply via email to