Problem when send message with linphone

Hi everyone, im new to asterisk and i want to install asterisk to use with linphone android client, i install it with this tutorial:

note that i dont need voice mail so i didnt add the voice mail part.

the calling is work correctly but when i want to send message using linphone, i see this error:

[Jan 29 12:03:27] NOTICE[28294][C-00000003]: chan_sip.c:30834 sip_request_call: Asked to get a channel without offering any format
[Jan 29 12:03:27] WARNING[28294][C-00000003]: app_dial.c:2663 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 58 - Bearer capability not available)

i really appreciate any help

Without you providing the configuration, it will not be possible for us to provide you feedback that might help you…

To me it looks like you have either made an error in your dialplan, or you have misconfigured sip.conf or pjsip.conf…

So, the more info you provide the better the forum will be able to help you.

Thanks for replying, here it is my sip.conf:

[general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
disallow=all
allow=ulaw
alwaysauthreject=yes
canreinvite=no
nat=yes
session-timers=refuse
localnet=192.168.0.0/255.255.255.0

[7001]
type=friend
host=dynamic
secret=7001
context=internal

[7002]
type=friend
host=dynamic
secret=7002
context=internal

and my extensions.conf:

[internal]
exten => 7001,1,Answer()
exten => 7001,2,Dial(SIP/7001,60)
exten => 7001,3,Hangup()

exten => 7002,1,Answer()
exten => 7002,2,Dial(SIP/7002,60)
exten => 7002,3,Hangup()

Your tutorial is obsolete (if it says use type=friend as standard, it is also broken), as chan_sip is not in the latest version of Asterisk. (It also shouldn’t be suggesting the use of canreinvite, as that was renamed about a decade ago, although the old name is still accepted in those older versions of Asterisk. which still include chan_sip.)

I’d say your problem was that you haven’t enabled any codecs (NB do not enable all).

type=friend should only be used in certain special cases.

Oh, so can you help me to run this on a new asterisk? i installed the asterisk 20 and i dont know how to make two users to communicate with each other, also there is a pjsip instead of sip and i dont have any idea about that.

When you google “asterisk configure pjsip” you will find loads of examples information…

PJSIP Configuration Sections and Relationships - Asterisk Documentation

res_pjsip Configuration Examples - Asterisk Documentation

The above mentioned search will also suggest youtube lessons, if you are into video lessons.

First start there, then if you still have issues ask the community again.

Good luck.

1 Like

I didn’t notice the mention of message in your subject, and none of the code you have presented handles out of dialogue messages. I think you may be trying to handle an out of dialogue message as though it were a voice call, although I thought that would have faulted earlier.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.