SIP request: Asked to get a channel without offering any format

Hi everyone,

I want to connect to a SIP provider to make outbound call to US phone numbers from our existing platform and receive inbound call to DIDs. I tried to do that with JAIN SIP (java lib) but only the signal part was successful, I couldn’t stream audio through RTP somehow (audience just don’t hear any sound). So, I installed Asterisk 18 & FreePBX 15 as ultimate solution, but I can’t make any outbound call due to below error:

[2023-07-02 14:35:55] ERROR[200062][C-00000014]: pbx_functions.c:612 ast_func_read: Dangerous function DB read blocked
[2023-07-02 14:35:55] ERROR[200062][C-00000014]: pbx_functions.c:655 ast_func_read2: Dangerous function DB read blocked
[2023-07-02 14:35:55] NOTICE[200062][C-00000014]: chan_sip.c:30836 sip_request_call: Asked to get a channel without offering any format
[2023-07-02 14:35:55] NOTICE[200062][C-00000014]: app_dial.c:2709 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 58 - Bearer capability not available)
== Everyone is busy/congested at this time (1:0/0/1)

I sent the Originate Action as below (asterisk-java v3.39):

OriginateAction originateAction = new OriginateAction();
originateAction.setChannel(“SIP/102”);
originateAction.setContext(“from-internal”);
originateAction.setCallerId(“1xxxxxxxxx”);
originateAction.setExten(“81yyyyyyyyyy”);
originateAction.setPriority(1);
originateAction.setCodecs(“ulaw”);

Could anyone help to identify what that error means?

FreePBX isn’t supported here. First time users of FreePBX should use their distribution, which contains a consistent combination of OS, Asterisk and FreePBX.

chan_sip isn’t supported. Use chan_pjsip

What is in your sip.conf for peer 102. My guess is nothing.

What is in the dialplan to support this extension?

Hi David,

Thanks for spending time to check my topic.
Let me update more details on my setup:

  • I already created a SIP trunk like this:
    Outgoing

disallow=all
allow=ulaw&g729
canreinvite=yes
context=from-internal
dtmfmode=rfc2833
host=xxx.xx.xxx.xx
nat=no
qualify=yes
type=peer

Incoming

canreinvite=yes
context=from-internal
dtmfmode=rfc2833
nat=no
qualify=yes
type=peer
host=xxx.xx.xxx.xx&yyy.yy.yyyy.yy

  • I want that SIP trunk to handle all out/in calls then i created an outbound route with simple dial patterns:

.

  • Also I created an inbound route to the Extensions 102.

Regarding your question

What is in the dialplan to support this extension?

I just replace numbers in my phone by “y” for privacy here.

You should not be using chan_sip. The equivalent of this is only possible with chan_pjsip, and there will be no chan_sip at all in the next release of Asterisk. If you must do this for chan_sip, only include yyy.yy.yyyy.yy as the first section will hande calls from the x’s.

What’s an “outbound route”. Sounds like something from FreePBX (as is quoting bits of sip.conf without the section names).

You are missing the codecs for the second section.

nat=no is really only needed for Cisco. The default is OK.

canreinvite is a very obsolete name for directmedia

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