Cant diail out to sip trunk

Hi there. Im very new to asterix. I have registered a voip account. and registered a softphone on my android. I can receive calls from outside to my android phone. but my android phone cant call out to normal phone numbers using the trunk.

sorry to bug you all. I have troubles finding a right howto on the web,

sip.conf
[general]
register => #######:##########@tel.12connect.com:5060

[12connect]
type=friend
secret=##########
username=########
host=tel.12connect.com
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
context=12connect

users.conf
[6000]
fullname = Bram
secret = ########
hassip = yes
context = users
host = dynamic
type=friend

extentions.conf

[12connect]
exten => s,1,Log(NOTICE, Incoming call from ${CALLERID(all)})
exten => s,n,Dial(SIP/6000)
exten => s,n,Hangup()
; End of the "incoming" context

[users]
exten => _.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN:0})
exten => _.,n,Dial(SIP/12connect/${EXTEN:0},60,Ttm)
exten => _.,n,Hangup()

You haven’t actually stated or shown what happens when you try to call.

the logs are not clear due to loads of failed logins. i setup fail2ban and then try to get a good log.

[2021-03-01 10:37:13] NOTICE[1507][C-000029e0]: Ext. 0235287407:1 @ users: Dialing out from “Bram” <6000> to (myphonenumber) [2021-03-01 10:37:14] NOTICE[1507][C-000029e0]: Ext. h:1 @ users: Dialing out from “Bram” <6000> to h

That log line is not sufficient and in fact is confusing, because it is the result of a misconfiguration that wouldn’t have stopped the original call going out. You should not use _. as an extension pattern, as it also matches all the one character special extensions, in this case the h extension, that is run after hangup.

oke. i fixed the -. issue, Still dont see a nice way to include all numbers and + anway i found verbose and have now more logging.

  == Using SIP RTP CoS mark 5
       > 0xad858f30 -- Strict RTP learning after remote address set to: 192.168.2.3:48840
    -- Executing [0614331929@users:1] Log("SIP/6000-00000093", "NOTICE, Dialing out from "Bram" <6000> to 0614331929") in new stack
[2021-03-01 16:39:55] NOTICE[11333][C-00002dfb]: Ext. 06########:1 @ users:  Dialing out from "Bram" <6000> to 06########
    -- Executing [0614331929@users:2] Dial("SIP/6000-00000093", "SIP/12connect/06########,60,Ttm") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/12connect/06########
    -- Started music on hold, class 'default', on channel 'SIP/6000-00000093'
       > 0xad985a58 -- Strict RTP learning after remote address set to: 109.71.104.49:12020
    -- SIP/12connect-00000094 answered SIP/6000-00000093
    -- Stopped music on hold on SIP/6000-00000093
    -- Channel SIP/12connect-00000094 joined 'simple_bridge' basic-bridge <e3dacf59-a3d5-4635-b505-490475feffa2>
    -- Channel SIP/6000-00000093 joined 'simple_bridge' basic-bridge <e3dacf59-a3d5-4635-b505-490475feffa2>
       > 0xad858f30 -- Strict RTP qualifying stream type: audio
       > 0xad858f30 -- Strict RTP switching source address to 86.94.15.84:48840
    -- Channel SIP/12connect-00000094 left 'simple_bridge' basic-bridge <e3dacf59-a3d5-4635-b505-490475feffa2>
    -- Channel SIP/6000-00000093 left 'simple_bridge' basic-bridge <e3dacf59-a3d5-4635-b505-490475feffa2>

Using PJSIP instead of SIP would be advised.

oke i tried PJSIP instead of SIP.
I think i need some PJSIP configuration.

[2021-03-02 08:44:15] ERROR[28036]: chan_pjsip.c:2469 request: Unable to create PJSIP channel - endpoint '12connect' was not found
[2021-03-02 08:44:15] WARNING[28035][C-00003ecf]: app_dial.c:2507 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)

oH it works.

I had to add prepaid credits to the provider

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