Single number rings a SIP and an IAX2 extension?


I am running into a problem which I didn’t think would happen and hoping I could get some help and guidance.

I am trying to setup Asterisk so that when a call comes in on a certain number is rings a local SIP extension and a remote IAX2 extension.

This is my current macro.

exten => s,1,Dial(IAX2/,acFgrtTkK,)
exten => s,n,Hangup(SIP/100)

What is currently happening is that both extensions ring, but only the IAX2 extension can take the call. If you try and answer on the SIP extension nothing happens.

Also I can not get the SIP extension to hangup no matter what I try. It will ring continuously until someone picks up the receiver and hangs up. Even after the IAX2 call hangs up.

I tried swapping the positions of the SIP & IAX2 extensions in the Dial() command but it didn’t do anything. Neither has any combination of options.

We are using version 1.6.1 of Asterisk. I don’t like upgrading since everything is working, but if I have to in order to get this working no problem.

Thanks in advance!

exten => s,1,Dial(IAX2/,acFgrtTkK,)


exten => s,1,Dial(IAX2/,20,acFgrtTkK)

Thanks but no change. I’m having it ring the SIP client first and if no one answers ring the IAX2 client for the time being.

I’m not sure if what I want is actually possible considering how IAX2 works.


Create a queue, add both as members then it will work as you want .

Thank you for the suggestion.

I went ahead and made a simple queue with static members and oddly enough the same thing happens. The local SIP client rings but can not take the call. And it rings continuously until the receiver is reset.

timeout = 60
member => SIP/100
member => IAX2/

exten => 5551212,1,Macro(queue)

exten => s,1,Answer
exten => s,n,Ringing
exten => s,n,Wait(2)
exten => s,n,Set(_doVoicemail=no)
exten => s,n,Queue(sampleq,rtTk)
exten => s,n,Hangup

I have tried commenting out the 3 middle lines above but it did not have any effect.


I figured out my problem and the queue does in fact work.

The original IAX2 extension I was designating was in fact another macro that rings all the extensions at our remote location which of course has an Answer() statement.

I plugged in actual direct extensions and all is good.

Thanks again! I appreciate it.