[asterisk-users] How to keep difference between 2 SIP-accounts/trunks from same server ??
Dovid Bender
asteriskusers at dovid.net
Thu Oct 8 16:21:15 CDT 2009
----- Original Message -----
From: jonas kellens
To: Asterisk Mailing
Sent: Thursday, October 08, 2009 15:20
Subject: [asterisk-users] How to keep difference between 2 SIP-accounts/trunks from same server ??
Hey list,
I have a problem when I host 2 SIP-accounts on the same Asterisk-server. Asterisk picks out the SIP-account on alphabetic order A --> Z.
In my sip.conf :
register => user1:passwd1 at server/user1
register => user2:passwd2 at server/user2
[YOCAN-3starsnet]
type=peer
host=server
username=user1
secret=passwd1
fromuser=user1
accountcode=user1_in
[ITCENTER-3starsnet]
type=peer
host=server
username=user2
secret=passwd2
fromuser=user2
accountcode=ITCin
The Asterisk CLI shows :
[Oct 8 15:06:03] -- Executing [s at macro-getiaxaccount:5] MYSQL("SIP/ITCENTER-3starsnet-0764cdb0", ...
[Oct 8 15:06:03] -- Executing [s at macro-getiaxaccount:6] MacroExit("SIP/ITCENTER-3starsnet-0764cdb0", ...
[Oct 8 15:06:03] -- Executing [s at 092:9] NoOp("SIP/ITCENTER-3starsnet-0764cdb0", "...
[Oct 8 15:06:03] -- Executing [s at 09:10] Dial("SIP/ITCENTER-3starsnet-0764cdb0", "...
Notice the SIP/ITCENTER-3starsnet.
Now when I put [ITCENTER-3starsnet] in comment in sip.conf, the CLI shows :
[Oct 8 15:16:08] -- Executing [s at macro-getiaxaccount:5] MYSQL("SIP/YOCAN-3starsnet-0764e7b0", "...
[Oct 8 15:16:08] -- Executing [s at macro-getiaxaccount:6] MacroExit("SIP/YOCAN-3starsnet-0764e7b0", "...
[Oct 8 15:16:08] -- Executing [s at 092779077:9] NoOp("SIP/YOCAN-3starsnet-0764e7b0", "...
[Oct 8 15:16:08] -- Executing [s at 092779077:10] Dial("SIP/YOCAN-3starsnet-0764e7b0", "...
Notice the SIP/YOCAN-3starsnet.
How can I keep the SIP-connection for user1 apart from the SIP-connection of user2 ???
When I activate the SIP-account for user2, an incoming call always goes via this second SIP-account !!
Thanks for the feedback.
Jonas.
Jonas,
How about breaking it up in extensions.conf. The /user1 at the end of the registration tells the device on the other end to send the call to user1 at Your_IP_Address. You may want to try:
sip.conf
register => user1:passwd1 at server/line1
register => user2:passwd2 at server/line2
extensions.conf
Exten => line1,1,Playback(hello)
Exten => line2,1,Playback(tt-monkeys)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091008/8c51dc20/attachment.htm
More information about the asterisk-users
mailing list