On Tue, Feb 10, 2009 at 11:14 AM, Matthias Hardt < MHardt at berlinux-solutions.de> wrote: > Matthias, indeed pjsua_acc_find_for_incoming() is the function to select >> the account to use for incoming calls. The algorithm to select the account >> is to match the To URI of the incoming call as follows: >> >> /* Just return default account if To URI is not SIP: */ >> .. >> /* Find account which has matching username and domain. */ >> .. >> /* No matching account, try match domain part only. */ >> .. >> /* No matching account, try match user part (and transport type) only. */ >> .. >> /* Still no match, use default account */ >> >> I think that's quite a reasonable algo to get the correct account, so I >> wonder why it didn't get it in your case. >> >> cheers >> Benny >> > > Hi Benny, > > that's reasonable but in my case it lacks one matching-attempt. > I registered with my username. Then I call my account by using > the telephone number I got from my serviceprovider. The SIP- > INVITE contains this number + domain in the TO-Field. > That's why it isn't matched. > But the request-line contains my username, so you could try > this one too, before using the default account. > > > I think that makes sense. Perhaps a more elaborate effort is to retry all the steps above using the request URI if we couldn't match the To URI. Will put this in my (very long) backlog. :) cheers Benny -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090210/7fed5bba/attachment.html>