Unable to dial extention 7654: Channel 'SIP/13249' is not available

Hi all,

I’m trying to use openfire 3.3.2 with asterisk-im 1.3.1 and spark 2.5.6.

The asterisk configuration is right (work with softphones):

My sip.conf:

type=friend

username=fernando.ribeiro

secret=mypass

auth=md5

nat=no

host=dynamic

reinvite=no

canreinvite=no

qualify=1000

dtmfmode=rfc2833

disallow=all

allow=all

context=default

mailbox=7654

type=friend

username=fernando.voip

secret=mypass

auth=md5

nat=no

host=dynamic

reinvite=no

canreinvite=no

qualify=1000

dtmfmode=rfc2833

disallow=all

allow=all

context=default

mailbox=13249

My extensions.conf:

exten => 7654,1,Dial(SIP/7654,20,rtTm)

exten => 13249,1,Dial(SIP/13249,20,rtTm)

I can to see the manager working with:

jabberix*CLI> show manager connected

Username IP Address

jabber 10.1.0.240

In the Openfire Asterisk-IM i have one asterisk server connected fine and these phone mappings:

Username

Device

Extension

Call ID

fernando.voip

SIP/13249

13249

13249

fernando.ribeiro

SIP/7654

7654

7654

While i try one call to user using spark, the spark debugger return this error:

<iq id=“1maK7-65” to="fernando.voip@jabber.mydomain.com/spark" from=“phone.jabber.mydomain.com” type=“error”>

<error code=“500” type=“CANCEL”>

<undefined-condition xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>

<text xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas” xml:lang=“en”>Unable to dial extention 7654: Channel ‘SIP/13249’ is not available</text>

</error>

</iq>

Can somebody help me?

Thank you.

Best Regards,

Fernando Ribeiro

Hi,

It seems you Openfire server is not connected to Asterisk. Make sure your login data is correct, reload the Asterisk-IM plugin while watching the Asterisk console in verbose mode to see if there are any errors or if firewall rules prevent it from connecting.

Do you see the green light next to your Asterisk server in the Openfire console?

=Stefan

Edit: Umm or is jabber the username of your Openfire server? Do you get notification of inbound calls in Spark?

Message was edited by: srt

Hi Stefan,

The openfire is connected to asterisk how returned by “show manager connected”

jabberix*CLI> show manager connected

Username IP Address

jabber 10.1.0.240

My openfire server is “10.1.0.240” and the username is “jabber”.

I can see the green light next my Asterisk server.

Is my phone mapping right?

With “sip debug” in asterisk i cannt to receive any spark request.

Thank you.

Best regards,

Fernando Ribeiro

Any idea?

Hi Mr. Stefan,

My Openfire server is connected to Asterisk.

jabberix*CLI> show manager connected

Username IP Address

jabber 10.1.0.240

Where “jabber” is my username in manager.conf and “10.1.0.240” is my openfire server.

This is my manager.conf:

secret = jabber

deny=0.0.0.0/0.0.0.0

permit=10.1.0.240/255.255.255.255

In openfire log i have this informations:

2007.10.08 18:59:11 Connecting to 10.1.3.200:5038

2007.10.08 18:59:11 Connected via Asterisk Call Manager/1.0

2007.10.08 18:59:11 Successfully logged in

2007.10.08 18:59:11 Determined Asterisk version: Asterisk 1.0

2007.10.08 18:59:11 Successfully reconnected.

2007.10.08 18:59:11 Initializing done

I can see the green light nexto to my Asterisk Server in the Openfire console.

http://www.nerdgroup.org/fernando/files/general-settings.png

Here my phone mappings:

http://www.nerdgroup.org/fernando/files/phone-mappings.png

While call using spark, i don’t receive inbound calls.

In the Smack Debug Window i receive this sequence:

<iq id=“R48N1-38” to=“phone.jabber.conab.gov.br” type=“get”>

<query xmlns=“http://jabber.org/protocol/disco#info” node=“fernando.ribeiro”/>

</iq>

<iq id=“R48N1-38” to="fernando.voip@jabber.conab.gov.br/spark" from=“phone.jabber.conab.gov.br” type=“result”>

<query xmlns=“http://jabber.org/protocol/disco#info” node=“fernando.ribeiro”>

<identity category=“directory” name=“phone” type=“phone”/>

&lt;feature var="http://jabber.org/protocol/disco#info"/&gt;

&lt;feature var="http://jivesoftware.com/phone"/&gt;

</query>

</iq>

<iq id=“R48N1-39” to=“phone.jabber.conab.gov.brfrom="fernando.voip@jabber.conab.gov.br/spark" type=“set”>

<phone-action xmlns=“http://jivesoftware.com/xmlns/phone” type=“DIAL”>

&lt;jid&gt;fernando.ribeiro@jabber.conab.gov.br&lt;/jid&gt;

</phone-action>

</iq>

<iq id=“R48N1-39” to="fernando.voip@jabber.conab.gov.br/spark" from=“phone.jabber.conab.gov.br” type=“error”>

<error code=“500” type=“CANCEL”>

<undefined-condition xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>

<text xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas” xml:lang=“en”>Unable to dial extention 7654: Channel ‘SIP/13249’ is not available</text>

</error>

</iq>

I don’t receive data in asterisk while calling.

I openfire debug level i receive this error:

2007.10.08 20:10:55

org.jivesoftware.phone.PhoneException: Unable to dial extention 7654: Channel ‘SIP/13249’ is not available

at org.jivesoftware.phone.asterisk.CustomAsteriskServer.dial(CustomAsteriskServer. java:200)

at org.jivesoftware.phone.asterisk.AsteriskPhoneManager.dial(AsteriskPhoneManager. java:200)

at org.jivesoftware.phone.BasePhoneManager.originate(BasePhoneManager.java:204)

at org.jivesoftware.phone.xmpp.PacketHandler.handleDial(PacketHandler.java:93)

at org.jivesoftware.phone.xmpp.PacketHandler.processPacket(PacketHandler.java:52)

at org.jivesoftware.phone.PhonePlugin.processPacket(PhonePlugin.java:206)

at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponent. process(InternalComponentManager.java:490)

at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:250)

at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)

at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:289)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler .java:79)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:254)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:703)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:62)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:200)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :266)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:326)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Thread.java:595)

Caused by: org.asteriskjava.live.NoSuchChannelException: Channel ‘SIP/13249’ is not available

at org.asteriskjava.live.internal.AsteriskServerImpl.originate(AsteriskServerImpl. java:346)

at org.asteriskjava.live.internal.AsteriskServerImpl.originateToExtension(Asterisk ServerImpl.java:286)

at org.asteriskjava.live.DefaultAsteriskServer.originateToExtension(DefaultAsteris kServer.java:141)

at org.jivesoftware.phone.asterisk.CustomAsteriskServer.dial(CustomAsteriskServer. java:196)

Have you any idea how to fix this?

Thanks