<!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>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 ?</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 Users Mailing List -
Non-Commercial Discussion</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, October 09, 2009
09:37</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [asterisk-users] How to keep
difference between 2 SIP-accounts/trunks from same server ??</DIV>
<DIV><BR></DIV>What I have tried is :<BR><BR><FONT size=2><FONT
color=#000000>register => user1:<A
href="mailto:passwd1@server">passwd1@server</A>/yocan</FONT></FONT><BR><FONT
size=2><FONT color=#000000>register => user2:<A
href="mailto:passwd2@server">passwd2@server</A>/itcenter</FONT></FONT><FONT
color=#000000> </FONT><BR><BR><FONT color=#000000>extensions.conf
:</FONT><BR><BR><FONT color=#000000><FONT
size=2>[default]</FONT></FONT><BR><FONT color=#000000><FONT size=2>exten =>
yocan,1,GoTo(user1,s,1)</FONT></FONT><BR><FONT color=#000000><FONT
size=2>exten => itcenter,1,GoTo(user2,s,1)</FONT></FONT><BR><BR><FONT
color=#000000><FONT size=2>[user1]</FONT></FONT><BR><FONT color=#000000><FONT
size=2>...</FONT></FONT><BR><FONT color=#000000><FONT
size=2>[user2]</FONT></FONT><BR><FONT color=#000000><FONT
size=2>...</FONT></FONT><BR><BR><FONT color=#000000>But the CLI shows
:</FONT><BR><BR><FONT color=#000000><FONT size=2>[Oct 9
09:28:52] -- Executing [s@macro-getiaxaccount:5]
MYSQL("</FONT></FONT><FONT color=#000000><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT></FONT><FONT color=#000000><FONT
size=2>-076e4700", "...</FONT></FONT><BR><FONT color=#000000><FONT
size=2>[Oct 9 09:28:52] -- Executing
[s@macro-getiaxaccount:6] MacroExit("</FONT></FONT><FONT color=#000000><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT></FONT><FONT color=#000000><FONT
size=2>-076e4700",...</FONT></FONT><BR><FONT color=#000000><FONT
size=2>[Oct 9 09:28:52] -- Executing
[</FONT></FONT><FONT color=#000000><FONT
size=2><B>s@user1</B></FONT></FONT><FONT color=#000000><FONT size=2>:9]
NoOp("</FONT></FONT><FONT color=#000000><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT></FONT><FONT color=#000000><FONT
size=2>-076e4700", "...</FONT></FONT><BR><FONT color=#000000><FONT
size=2>[Oct 9 09:28:52] -- Executing
[</FONT></FONT><FONT color=#000000><FONT
size=2><B>s@user1</B></FONT></FONT><FONT color=#000000><FONT size=2>:10]
Dial("</FONT></FONT><FONT color=#000000><FONT
size=2><B>SIP/ITCENTER-3starsnet</B></FONT></FONT><FONT color=#000000><FONT
size=2>-076e4700", "...</FONT></FONT><BR><BR><FONT color=#000000>So the call
comes into the right context... that's not the problem.</FONT><BR><BR><FONT
color=#000000>But my CDR is messed up. The accountcode that I have set for
user1 is always replaced for the </FONT><FONT
color=#000000><U>accountcode</U></FONT><FONT color=#000000> I've set for user
2.</FONT><BR><BR><FONT size=2>[YOCAN-3starsnet]</FONT><BR><FONT
size=2>type=peer</FONT><FONT size=2><FONT color=#000000>
</FONT></FONT><BR><FONT size=2>accountcode=user1_in</FONT><FONT size=2><FONT
color=#000000> </FONT></FONT><BR><BR><FONT
size=2>[ITCENTER-3starsnet]</FONT><BR><FONT size=2>type=peer</FONT><BR><FONT
size=2>accountcode=</FONT><FONT size=2><FONT
color=#000000>user2_in</FONT></FONT><BR><BR><FONT color=#000000>Is there yet
another workaround ?!</FONT><BR><BR><FONT color=#000000>Is it not meant to
host several SIP-accounts on 1 Asterisk-box that register to a SIP- provider
???</FONT><BR><BR><FONT color=#000000>Jonas.</FONT><BR><BR><BR>On Thu,
2009-10-08 at 23:21 +0200, Dovid Bender wrote:<BR>
<BLOCKQUOTE TYPE="CITE"> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2></FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><FONT size=2>----- Original Message -----
</FONT></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><B><FONT size=2>From:</FONT></B><FONT size=2> <A
href="mailto:jonas.kellens@telenet.be">jonas kellens</A>
</FONT></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><B><FONT size=2>To:</FONT></B><FONT size=2> <A
href="mailto:asterisk-users@lists.digium.com">Asterisk Mailing</A>
</FONT></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><B><FONT size=2>Sent:</FONT></B><FONT size=2> Thursday,
October 08, 2009 15:20</FONT> </BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><B><FONT size=2>Subject:</FONT></B><FONT size=2>
[asterisk-users] How to keep difference between 2 SIP-accounts/trunks from
same server ??</FONT> </BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><BR><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">
<BLOCKQUOTE><FONT size=2>Hey list,</FONT><BR><BR><FONT size=2>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.</FONT><BR><BR><FONT size=2>In my sip.conf :</FONT><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><FONT size=2>The Asterisk CLI shows
:</FONT><BR><BR><FONT size=2>[Oct 8
15:06:03] -- Executing [s@macro-getiaxaccount:5]
MYSQL("</FONT><B><FONT size=2>SIP/ITCENTER-3starsnet</FONT></B><FONT
size=2>-0764cdb0", ...</FONT><BR><FONT size=2>[Oct 8
15:06:03] -- Executing [s@macro-getiaxaccount:6]
MacroExit("</FONT><B><FONT size=2>SIP/ITCENTER-3starsnet</FONT></B><FONT
size=2>-0764cdb0", ...</FONT><BR><FONT size=2>[Oct 8
15:06:03] -- Executing [s@092:9]
NoOp("</FONT><B><FONT size=2>SIP/ITCENTER-3starsnet</FONT></B><FONT
size=2>-0764cdb0", "...</FONT><BR><FONT size=2>[Oct 8
15:06:03] -- Executing [s@09:10]
Dial("</FONT><B><FONT size=2>SIP/ITCENTER-3starsnet</FONT></B><FONT
size=2>-0764cdb0", "...</FONT><BR><BR><FONT size=2>Notice the
</FONT><B><FONT size=2>SIP/ITCENTER-3starsnet</FONT></B><FONT
size=2>.</FONT><BR><BR><FONT size=2>Now when I put [ITCENTER-3starsnet] in
comment in sip.conf, the CLI shows :</FONT><BR><BR><FONT size=2>[Oct
8 15:16:08] -- Executing [s@macro-getiaxaccount:5]
MYSQL("</FONT><B><FONT size=2>SIP/YOCAN-3starsnet</FONT></B><FONT
size=2>-0764e7b0", "...</FONT><BR><FONT size=2>[Oct 8
15:16:08] -- Executing [s@macro-getiaxaccount:6]
MacroExit("</FONT><B><FONT size=2>SIP/YOCAN-3starsnet</FONT></B><FONT
size=2>-0764e7b0", "...</FONT><BR><FONT size=2>[Oct 8
15:16:08] -- Executing [s@092779077:9]
NoOp("</FONT><B><FONT size=2>SIP/YOCAN-3starsnet</FONT></B><FONT
size=2>-0764e7b0", "...</FONT><BR><FONT size=2>[Oct 8
15:16:08] -- Executing [s@092779077:10]
Dial("</FONT><B><FONT size=2>SIP/YOCAN-3starsnet</FONT></B><FONT
size=2>-0764e7b0", "...</FONT><BR><BR><FONT size=2>Notice the
</FONT><B><FONT size=2>SIP/YOCAN-3starsnet</FONT></B><FONT
size=2>.</FONT><BR><BR><FONT size=2>How can I keep the SIP-connection for
user1 apart from the SIP-connection of user2 ???</FONT><BR><BR><FONT
size=2>When I activate the SIP-account for user2, an incoming call
</FONT><U><FONT size=2>always</FONT></U><FONT size=2> goes via this second
SIP-account !!</FONT><BR><BR><BR><FONT size=2>Thanks for the
feedback.</FONT><BR><BR><FONT size=2>Jonas.
</FONT><BR><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2>Jonas,</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2>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 <A
href="mailto:user1@Your_IP_Address">user1@Your_IP_Address</A>. You may want
to try:</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2>sip.conf</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE">register => user1:<A
href="mailto:passwd1@server">passwd1@server</A>/line1<BR><FONT
size=2>register => user2:<A
href="mailto:passwd2@server">passwd2@server</A>/line2</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2>extensions.conf</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2>Exten =>
line1,1,Playback(hello)</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><FONT size=2>Exten =>
line2,1,Playback(tt-monkeys)</FONT> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"> </BLOCKQUOTE>
<BLOCKQUOTE TYPE="CITE"><PRE>_______________________________________________
-- Bandwidth and Colocation Provided by <A href="http://www.api-digital.com">http://www.api-digital.com</A> --
AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: <A href="http://www.astricon.net">http://www.astricon.net</A>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<A href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A>
</PRE></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>-- Bandwidth and
Colocation Provided by http://www.api-digital.com --<BR><BR>AstriCon 2009 -
October 13 - 15 Phoenix, Arizona<BR>Register Now:
http://www.astricon.net<BR><BR>asterisk-users mailing list<BR>To UNSUBSCRIBE
or update options visit:<BR>
http://lists.digium.com/mailman/listinfo/asterisk-users</BLOCKQUOTE></BODY></HTML>