Voip numbers strange behaviour

Hi all
i have a strange behaviour on a new box…
I have registered 3 Voip Numbers and all went fine…i could receive calls with each…
But on cli i noticed that i’ve always a call from first registered number to the number i’m calling even if i’m calling by a cell phone…
I’m calling number2 but on cli i have SIP/number1

Executing [number2@from-voip:1] Answer("SIP/number1

The call goes to the right place on dialplan but when i launc : sip show inuse
i always get 1/0/0 from wrong number…not the number i have dialed…

Sorry…i don’t understand…

Sounds like you have three separate accounts with the same ITSP, rather than a proper DID configuration (one account with multiple destination numbers). Asterisk will not be able to tell them apart because they all have the same source IP address.

Sigh…
Is there a way to count effective incoming calls?
I have to check how many attive calls are on a specific channels…

You can use GROUP&GROUP_COUNT for this.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_GROUP

https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_GROUP_COUNT

We could have several pubblic IP…Is it possibile to use different Wan IP?

I don’t understand your request and how different WAN IP’s apply to it.

You asked how to count incoming calls, The GROUP function can be used to do that, The IP does not matter?

My very problem is multiple Sip account with same ITSP…with same source IP…Astersik treats them as they were coming from the same number…i’m trying to bypass this with any workarounds…

Are you using SIP or PJSIP? Can you show the SIP Invite Header information received on your Asterisk server? Perhaps you could identify the user portion of the SIP URI since the IP is the same.

Hi David…
for my information only…if i would put a proxy like kamailio between wan and asterisk to register voip numbers and route sip incoming calls and …do you think this problem would be solved?

How will the proxy distinguish between them?