[asterisk-users] How to keep difference between 2 SIP-accounts/trunks from same server ??
Dovid Bender
asteriskusers at dovid.net
Fri Oct 9 06:19:48 CDT 2009
I don't think there is much you can do since Asterisk matched it based on the IP of your carrier. Maybe there is some sort of variable that you can set in the dial plan ?
----- Original Message -----
From: jonas kellens
To: Asterisk Users Mailing List - Non-Commercial Discussion
Sent: Friday, October 09, 2009 09:37
Subject: Re: [asterisk-users] How to keep difference between 2 SIP-accounts/trunks from same server ??
What I have tried is :
register => user1:passwd1 at server/yocan
register => user2:passwd2 at server/itcenter
extensions.conf :
[default]
exten => yocan,1,GoTo(user1,s,1)
exten => itcenter,1,GoTo(user2,s,1)
[user1]
...
[user2]
...
But the CLI shows :
[Oct 9 09:28:52] -- Executing [s at macro-getiaxaccount:5] MYSQL("SIP/ITCENTER-3starsnet-076e4700", "...
[Oct 9 09:28:52] -- Executing [s at macro-getiaxaccount:6] MacroExit("SIP/ITCENTER-3starsnet-076e4700",...
[Oct 9 09:28:52] -- Executing [s at user1:9] NoOp("SIP/ITCENTER-3starsnet-076e4700", "...
[Oct 9 09:28:52] -- Executing [s at user1:10] Dial("SIP/ITCENTER-3starsnet-076e4700", "...
So the call comes into the right context... that's not the problem.
But my CDR is messed up. The accountcode that I have set for user1 is always replaced for the accountcode I've set for user 2.
[YOCAN-3starsnet]
type=peer
accountcode=user1_in
[ITCENTER-3starsnet]
type=peer
accountcode=user2_in
Is there yet another workaround ?!
Is it not meant to host several SIP-accounts on 1 Asterisk-box that register to a SIP- provider ???
Jonas.
On Thu, 2009-10-08 at 23:21 +0200, Dovid Bender wrote:
----- 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)
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
------------------------------------------------------------------------------
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091009/9ac9cad4/attachment.htm
More information about the asterisk-users
mailing list