A call is being passed around between two servers

Hi, everyone

I have a following prroblem:
Our asterisk used to have a number (lets say 111111111) configured as local extension. A while ago we have removed this extension, however the SIP provider that offers a SIP trunk for all external calls for us still has this extension (111111111) configured as though it is ours.

So, every time we have a call from any local extension to 111111111, out asterisk box passes it to our SIP trunk, and then, our provider send an INVITE back to us (because according to its configuration this is out number). And so, it goes around in circles. We flood each other first with INVITE packet, and then with CANCEL packets.

Could I do something about it? For example, could I put a limit on Dial retries (when such a call is in progress, I see a whole bunch of Dial() executing on the console).

Thanks in advance

Best solution: get the provider to fix their system.

Next best: define the extension, but make it go to a voice announcement, or just hanugup.

Asterisk will not see the multiple invites as being related.

Thanks a lot for your reply.
My intention is to figure out what is the correct flow of events that should be happening. I mean, our asterisk starts sending a whole bunch of INVITES to provider’s server really fast (as I have written earlier, there are a whole bunch of Dial() commands being executed). Is that what it should do or it is a misconfiguration? Is it possible to set a limit on a number of such retries?

They are not retries. The call is looping, but each time round the loop it looks like a different call.

There is no mechanism to limit the total number of concurrent calls.

Asterisk has no way of knowing they are really the same call.

Hi

If you are working with 2 systems like this , you can use groupcount to count the number of intersystem calls or use switch statement

switch: A switch statement allows an Asterisk server to search for extensions outside of
the local dialplan. The only currently implemented use is the IAX switch, though other
uses of this feature are planned. The IAX switch uses the IAX protocol to find
extensions on a remote dialplan and connect them. If a caller dials an extension that is
not accesable in the local dialplan, and a switch statement is present in the callers
present context, the extension will be tried against the remote server or servers
specified. The switch statement includes as an argument a context, which will be the
context within the remote dialplan that will be searched.

Examples
To look for a remote extension using the IAX protocol:
switch => IAX/username:password@server/context
Alternately, if RSA is turned on (see iax.conf) you may replace the password with
a keyname, which will be the key sent to the remote server.
switch => IAX/username:[password]@server/context

Ian