[Freeswitch-users] Connecting Freeswitch and Asterisk with outgoing registration
Markus Bönke
mbodbg at gmx.net
Wed Sep 2 02:25:44 MSD 2015
Hello,
I’ve connected freeswitch with an asterisk server via sip trunk with the following configuration in my test environment:
Freeswitch side:
<gateway name="sip.testprovider.com">
<param name="username" value="MyCustomSipTrunk1"/>
<param name="password" value="easy123"/>
<param name="extension" value="trunk"/>
<param name="register" value="true"/>
<param name="from_domain" value="sip.testprovider.com"/>
</gateway>
Asterisk side:
sip.conf
[MyCustomSipTrunk1]
type=peer
callerid="MyCustomSipTrunk1" <MyCustomSipTrunk1>
host=dynamic
nat=no
username=MyCustomSipTrunk1
fromdomain=sip.testprovider.com
directmedia=no
disallow=all
allow=gsm
allow=ulaw
allow=alaw
secret=easy123
context=kamailio
extensions.conf
[kamailio]
exten => _X.,1,Dial(SIP/${EXTEN}@MyCustomSipTrunk1,60,tr)
If I send a call from asterisk to freeswitch, I can see the following in the log:
2015-09-02 00:06:28.877729 [DEBUG] sofia.c:9001 IP 192.168.1.202 Rejected by acl "domains". Falling back to Digest auth.
2015-09-02 00:06:28.877729 [WARNING] sofia_reg.c:2827 Can't find user [MyCustomSipTrunk1 at sip.testprovider.com] from 192.168.1.202
You must define a domain called 'sip.testprovider.com' in your directory and add a user with the id="MyCustomSipTrunk1" attribute
and you must configure your device to use the proper domain in it's authentication credentials.
If I create the user in the directory for the domain, it works - but why do I need to create this user however the gateway is already already registered and authenticated with the asterisk server?
Thanks
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150902/553c3f69/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list