<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; CHARSET=UTF-8">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=jonas.kellens@telenet.be href="mailto:jonas.kellens@telenet.be">jonas
kellens</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-users@lists.digium.com
href="mailto:asterisk-users@lists.digium.com">Asterisk Mailing</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, October 08, 2009
15:20</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [asterisk-users] How to keep
difference between 2 SIP-accounts/trunks from same server ??</DIV>
<DIV><BR></DIV>Hey list,<BR><BR>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.<BR><BR>In my sip.conf :<BR><BR><FONT size=2>register =>
user1:<A href="mailto:passwd1@server">passwd1@server</A>/user1</FONT><BR><FONT
size=2>register => user2:<A
href="mailto:passwd2@server">passwd2@server</A>/user2</FONT><BR><BR><FONT
size=2>[YOCAN-3starsnet]</FONT><BR><FONT size=2>type=peer</FONT><BR><FONT
size=2>host=server</FONT><BR><FONT size=2>username=user1</FONT><BR><FONT
size=2>secret=passwd1</FONT><BR><FONT size=2>fromuser=user1</FONT><BR><FONT
size=2>accountcode=user1_in</FONT><BR><BR><FONT
size=2>[ITCENTER-3starsnet]</FONT><BR><FONT size=2>type=peer</FONT><BR><FONT
size=2>host=server</FONT><BR><FONT size=2>username=user2</FONT><BR><FONT
size=2>secret=passwd2</FONT><BR><FONT size=2>fromuser=user2</FONT><BR><FONT
size=2>accountcode=ITCin</FONT><BR><BR>The Asterisk CLI shows :<BR><BR><FONT
size=2>[Oct 8 15:06:03] -- Executing
[s@macro-getiaxaccount:5] MYSQL("</FONT><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT><FONT size=2>-0764cdb0",
...</FONT><BR><FONT size=2>[Oct 8 15:06:03] --
Executing [s@macro-getiaxaccount:6] MacroExit("</FONT><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT><FONT size=2>-0764cdb0",
...</FONT><BR><FONT size=2>[Oct 8 15:06:03] --
Executing [s@092:9] NoOp("</FONT><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT><FONT size=2>-0764cdb0",
"...</FONT><BR><FONT size=2>[Oct 8 15:06:03] --
Executing [s@09:10] Dial("</FONT><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT><FONT size=2>-0764cdb0",
"...</FONT><BR><BR>Notice the <B><FONT
size=2>SIP/ITCENTER-3starsnet</FONT></B>.<BR><BR>Now when I put <FONT
size=2>[ITCENTER-3starsnet]</FONT> in comment in sip.conf, the CLI shows
:<BR><BR><FONT size=2>[Oct 8 15:16:08] --
Executing [s@macro-getiaxaccount:5] MYSQL("</FONT><FONT
size=2><B>SIP/YOCAN-3starsnet</B></FONT><FONT size=2>-0764e7b0",
"...</FONT><BR><FONT size=2>[Oct 8 15:16:08] --
Executing [s@macro-getiaxaccount:6] MacroExit("</FONT><FONT
size=2><B>SIP/YOCAN-3starsnet</B></FONT><FONT size=2>-0764e7b0",
"...</FONT><BR><FONT size=2>[Oct 8 15:16:08] --
Executing [s@092779077:9] NoOp("</FONT><FONT
size=2><B>SIP/YOCAN-3starsnet</B></FONT><FONT size=2>-0764e7b0",
"...</FONT><BR><FONT size=2>[Oct 8 15:16:08] --
Executing [s@092779077:10] Dial("</FONT><FONT
size=2><B>SIP/YOCAN-3starsnet</B></FONT><FONT size=2>-0764e7b0",
"...</FONT><BR><BR>Notice the <B><FONT
size=2>SIP/YOCAN-3starsnet</FONT></B>.<BR><BR>How can I keep the
SIP-connection for user1 apart from the SIP-connection of user2
???<BR><BR>When I activate the SIP-account for user2, an incoming call
<U>always</U> goes via this second SIP-account !!<BR><BR><BR>Thanks for the
feedback.<BR><BR>Jonas.
<P></P></BLOCKQUOTE></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jonas,</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial>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 </FONT><A href="mailto:user1@Your_IP_Address"><FONT
face=Arial>user1@Your_IP_Address</FONT></A><FONT face=Arial>. You may want to
try:</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>sip.conf</FONT></DIV>
<DIV><FONT face=Arial>register => user1:</FONT><A
href="mailto:passwd1@server"><FONT face=Arial>passwd1@server</FONT></A><FONT
face=Arial>/line1<BR><FONT size=2>register => user2:<A
href="mailto:passwd2@server">passwd2@server</A>/line2</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>extensions.conf</FONT></DIV>
<DIV><FONT face=Arial size=2>Exten => line1,1,Playback(hello)</FONT></DIV>
<DIV><FONT face=Arial size=2>Exten =>
line2,1,Playback(tt-monkeys)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>