2

So i have a rather complicated issue I am trying to connect my Asterisk with a client 3cx phone system

So there is a sip phone connected to 3cx system with extension 351

On my Asterisk I have added client 3cx system to sip.conf as follows:

[3cx]
type=friend
host=151.236.XX.XXX
username=400
secret=secret
context=main
canreinvite=no
;authname=authname
;fromuser=fromuser
;fromdomain=fromdomain
insecure=port,invite
trustrpid=yes
disallow=all
allow=alaW

In my extensions.conf i have following line

exten => _X.,n,Dial(SIP/${EXTEN}@3cx,,ro)

However when it attempts to dial 'SIP/351@3cx' using landline that routes to my asterisk I am getting the following output

[Oct  4 20:05:22] VERBOSE[22119] chan_sip.c:
<--- SIP read from UDP:151.236.XX.XXX:5060 --->
SIP/2.0 404 User unknown.
Via: SIP/2.0/UDP 85.13.XXX.XXX:5060;branch=z9hG4bK17f3106e
To: <sip:351@151.236.XX.XXX>;tag=9e38f119
From: "+442084526XXX"<sip:+442084526XXX@85.13.XXX.XXX>;tag=as33bb12fb
Call-ID: 5cc7443b00658b746ff822895e557d3c@85.13.XXX.XXX:5060
CSeq: 103 INVITE
User-Agent: 3CXPhoneSystem 14.0.49169.513 (48654)
Content-Length: 0

However I have downloaded a soft phone (MicroSIP) to my desktop and registered ths soft phone directly with client 3cx system. When i dial 351 I am connected straight to the agent.

I was looking online for solutions and i have found that adding register to sip.conf (so essentially i register my asterisk as sip phone to 3cx system) should help but it did not work.

my sip.conf register entry:

register => 400:secret@151.236.XX.XXX

I am slightly lost here so any help greatly appreciated

Thanks

1

Make sure to add the fromdomain=<your 3x domain> and qualify=yes to your sip.conf, and it's type=peer for your task. Final sip.conf

register=>400:secret@151.236.XX.XXX/from-3cx

[3cx]
type=peer
dtmfmode=rfc2833
insecure=port,invite
qualify=yes
canreinvite=no
directmedia=yes
disallow=all
allow=ulaw
allow=g729
defaultuser=400
secret=secret
context=from-3cx

[phone-connected-to-asterisk]
type=friend
host=dynamic
transport=udp
secret=secret
disallow=all
allow=ulaw
context=from-asterisk
insecure=port,invite

And make sure to add incoming context to your extensions.conf. Final extensions.conf:

[general]
static=yes
writeprotect=yes
clearglobalvars=yes

[default]
include => incoming

[incoming]
include => from-3cx

[from-asterisk]
exten => _X.,1,Dial(SIP/${EXTEN}@3cx,45)

[from-3cx]
exten => _X.,1,Progress()
exten => _X.,n,Dial(SIP/${EXTEN},60,gt)
exten => _X.,n,Hangup()
  • Yup that fromdomain parameter did the trick. Thank you :) – Maciej Cygan Oct 4 '16 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.