Ian Cowley
2006-Jan-27 08:09 UTC
[Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN
Have asterisk@home 1.2.1 The server is on an internal network eg 10.10.10.10 It is NAT'd 1:1 via Checkpoint firewall to external public IP eg 50.50.50.50 The remote IAX2 phone (ATCOM320) is configured to call 50.50.50.50 on extension 1055. Outbound calls to 1055 work perfectly. Inbound calls from 1055 get picked up as if it were an external call (see below) and goes straight to the ring group macro. The same phone either on the same internal network to the asterisk or on a VPN to said network work fine. Obviously asterisk thinks this call is external. How do change this? asterisk1*CLI> -- Accepting AUTHENTICATED call from 99.99.99.212: {faked} > requested format = g729, > requested prefs = (), > actual format = g729, > host prefs = (g729|gsm|ulaw|alaw), > priority = mine -- Executing Macro("IAX2/1055-4", "rg-group|ringall|60||1000-1001-1007-1050-1450-1600") in new stack -- Executing Macro("IAX2/1055-4", "user-callerid") in new stack -- Executing DBget("IAX2/1055-4", "AMPUSER=DEVICE/1055/user") in new stack -- DBget: varname=AMPUSER, family=DEVICE, key=1055/user -- DBget: set variable AMPUSER to 1055 -- Executing DBget("IAX2/1055-4", "AMPUSERCIDNAME=AMPUSER/1055/cidname") in new stack -- DBget: varname=AMPUSERCIDNAME, family=AMPUSER, key=1055/cidname -- DBget: set variable AMPUSERCIDNAME to EXTERNAL-CALLER -- Executing GotoIf("IAX2/1055-4", "0?5") in new stack -- Executing SetCallerID("IAX2/1055-4", ""EXTERNAL-CALLER" <1055>") in new stack -- Executing NoOp("IAX2/1055-4", "Using CallerID "EXTERNAL-CALLER" <1055>") in new stack -- Executing GotoIf("IAX2/1055-4", "0?4:3") in new stack -- Goto (macro-rg-group,s,3) -- Executing SetCIDName("IAX2/1055-4", "EXTERNAL-CALLER") in new stack -- Executing SetVar("IAX2/1055-4", "RGPREFIX=") in new stack -- Executing SetCIDName("IAX2/1055-4", "EXTERNAL-CALLER") in new stack -- Executing SetVar("IAX2/1055-4", "RecordMethod=Group") in new stack -- Executing Macro("IAX2/1055-4", "record-enable|1|Group") in new stack -- Executing GotoIf("IAX2/1055-4", "0 > 0?2:4") in new stack -- Goto (macro-record-enable,s,4) -- Executing AGI("IAX2/1055-4", "recordingcheck|20060126-193156|1138303916.91") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck -- AGI Script recordingcheck completed, returning 0 -- Executing NoOp("IAX2/1055-4", "No recording needed") in new stack -- Executing SetVar("IAX2/1055-4", "RingGroupMethod=ringall") in new stack -- Executing Macro("IAX2/1055-4", "dial|60|tr|1000-1001-1007-1050-1450-1600") in new stack -- Executing GotoIf("IAX2/1055-4", "1?4:2") in new stack -- Goto (macro-dial,s,4) -- Executing AGI("IAX2/1055-4", "dialparties.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com _______________________________________________________________________ This e-mail message and any attachments may be confidential and may also be a privileged communication. It is intended solely for the person(s)to whom it is addressed. If you are not the intended addressee of the message you must take no action based on it. Please reply to this message to let us know you received it in error and also delete the message from your system. This disclaimer confirms that MessageLabs have swept e-mail and attachments for viruses on behalf of RSM Moffat Ltd. However it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. #### RSM MOFFAT LTD Registered in UK. support@moffat.co.uk ####
Francesco Peeters (Asterisk)
2006-Jan-27 08:22 UTC
[Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN
On Fri, January 27, 2006 16:09, Ian Cowley said:> Have asterisk@home 1.2.1 > The server is on an internal network eg 10.10.10.10 > It is NAT'd 1:1 via Checkpoint firewall to external public IP eg > 50.50.50.50 > > The remote IAX2 phone (ATCOM320) is configured to call 50.50.50.50 on > extension 1055. > Outbound calls to 1055 work perfectly. > Inbound calls from 1055 get picked up as if it were an external call > (see below) and goes straight to the ring group macro. > The same phone either on the same internal network to the asterisk or on > a VPN to said network work fine. Obviously asterisk thinks this call is > external. > How do change this? ><SNIP> The actual iax.conf part pertaining to this phone might be helpful here... -- F Peeters PIII 450 - 1 GB - * 1.2 - BRIstuff 0.3.0 Pre 1 - Florz patch 2 Sweex HFC-PCI modes=2 sync_slave=2 timer_card=0 Cologne HFC-S pins #52, #54, #55 connected in parallel for synching. AMD Duron 1GHz - 1GB - * 1.2.1 2 Sweex HFC-PCI cards
Ian Cowley
2006-Jan-27 08:44 UTC
[Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN
-----Original Message----- From: Ian Cowley Sent: 27 January 2006 15:10 To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: [Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN Have asterisk@home 1.2.1 The server is on an internal network eg 10.10.10.10 It is NAT'd 1:1 via Checkpoint firewall to external public IP eg 50.50.50.50 The remote IAX2 phone (ATCOM320) is configured to call 50.50.50.50 on extension 1055. Outbound calls to 1055 work perfectly. Inbound calls from 1055 get picked up as if it were an external call (see below) and goes straight to the ring group macro. The same phone either on the same internal network to the asterisk or on a VPN to said network work fine. Obviously asterisk thinks this call is external. How do change this? asterisk1*CLI> -- Accepting AUTHENTICATED call from 99.99.99.212: {faked} > requested format = g729, > requested prefs = (), > actual format = g729, > host prefs = (g729|gsm|ulaw|alaw), > priority = mine -- Executing Macro("IAX2/1055-4", "rg-group|ringall|60||1000-1001-1007-1050-1450-1600") in new stack -- Executing Macro("IAX2/1055-4", "user-callerid") in new stack -- Executing DBget("IAX2/1055-4", "AMPUSER=DEVICE/1055/user") in new stack -- DBget: varname=AMPUSER, family=DEVICE, key=1055/user -- DBget: set variable AMPUSER to 1055 -- Executing DBget("IAX2/1055-4", "AMPUSERCIDNAME=AMPUSER/1055/cidname") in new stack -- DBget: varname=AMPUSERCIDNAME, family=AMPUSER, key=1055/cidname -- DBget: set variable AMPUSERCIDNAME to EXTERNAL-CALLER -- Executing GotoIf("IAX2/1055-4", "0?5") in new stack -- Executing SetCallerID("IAX2/1055-4", ""EXTERNAL-CALLER" <1055>") in new stack -- Executing NoOp("IAX2/1055-4", "Using CallerID "EXTERNAL-CALLER" <1055>") in new stack -- Executing GotoIf("IAX2/1055-4", "0?4:3") in new stack -- Goto (macro-rg-group,s,3) -- Executing SetCIDName("IAX2/1055-4", "EXTERNAL-CALLER") in new stack -- Executing SetVar("IAX2/1055-4", "RGPREFIX=") in new stack -- Executing SetCIDName("IAX2/1055-4", "EXTERNAL-CALLER") in new stack -- Executing SetVar("IAX2/1055-4", "RecordMethod=Group") in new stack -- Executing Macro("IAX2/1055-4", "record-enable|1|Group") in new stack -- Executing GotoIf("IAX2/1055-4", "0 > 0?2:4") in new stack -- Goto (macro-record-enable,s,4) -- Executing AGI("IAX2/1055-4", "recordingcheck|20060126-193156|1138303916.91") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck -- AGI Script recordingcheck completed, returning 0 -- Executing NoOp("IAX2/1055-4", "No recording needed") in new stack -- Executing SetVar("IAX2/1055-4", "RingGroupMethod=ringall") in new stack -- Executing Macro("IAX2/1055-4", "dial|60|tr|1000-1001-1007-1050-1450-1600") in new stack -- Executing GotoIf("IAX2/1055-4", "1?4:2") in new stack -- Goto (macro-dial,s,4) -- Executing AGI("IAX2/1055-4", "dialparties.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com _______________________________________________________________________ This e-mail message and any attachments may be confidential and may also be a privileged communication. It is intended solely for the person(s)to whom it is addressed. If you are not the intended addressee of the message you must take no action based on it. Please reply to this message to let us know you received it in error and also delete the message from your system. This disclaimer confirms that MessageLabs have swept e-mail and attachments for viruses on behalf of RSM Moffat Ltd. However it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. #### RSM MOFFAT LTD Registered in UK. support@moffat.co.uk ####
Ian Cowley
2006-Jan-27 09:23 UTC
[Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN
Iax.conf [general] ;bindport = 4569 ; Port to bind to (IAX is 4569) bindport = 5036 ; Port to bind to (IAX is 4569) bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine) disallow=all allow=g729 ; 4 simultaneous allowed allow ilbc ; prefered for iax2 allow=gsm ; 13 Kbps (full rate), 20ms frame size allow=ulaw ;(g711)64 Kbps, sample-based allow=alaw ;(g711)64 Kbps, sample-based mailboxdetail=yes jitterbuffer=yes context=from-internal #include iax_additional.conf #include iax_custom.conf iax_additional.conf [1055] username=1055 type=friend secret=##################### record_out=Adhoc record_in=Adhoc qualify=yes port=4569 notransfer=yes mailbox=1055@device host=dynamic context=from-internal callerid=device <1055> Regards ianC -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Francesco Peeters (Asterisk) Sent: 27 January 2006 15:22 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN On Fri, January 27, 2006 16:09, Ian Cowley said:> Have asterisk@home 1.2.1 > The server is on an internal network eg 10.10.10.10 > It is NAT'd 1:1 via Checkpoint firewall to external public IP eg > 50.50.50.50 > > The remote IAX2 phone (ATCOM320) is configured to call 50.50.50.50 on > extension 1055. > Outbound calls to 1055 work perfectly. > Inbound calls from 1055 get picked up as if it were an external call > (see below) and goes straight to the ring group macro. > The same phone either on the same internal network to the asterisk oron> a VPN to said network work fine. Obviously asterisk thinks this callis> external. > How do change this? ><SNIP> The actual iax.conf part pertaining to this phone might be helpful here... -- F Peeters PIII 450 - 1 GB - * 1.2 - BRIstuff 0.3.0 Pre 1 - Florz patch 2 Sweex HFC-PCI modes=2 sync_slave=2 timer_card=0 Cologne HFC-S pins #52, #54, #55 connected in parallel for synching. AMD Duron 1GHz - 1GB - * 1.2.1 2 Sweex HFC-PCI cards _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ________________________________________________________________________ This Inbound email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com ________________________________________________________________________ ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com _______________________________________________________________________ This e-mail message and any attachments may be confidential and may also be a privileged communication. It is intended solely for the person(s)to whom it is addressed. If you are not the intended addressee of the message you must take no action based on it. Please reply to this message to let us know you received it in error and also delete the message from your system. This disclaimer confirms that MessageLabs have swept e-mail and attachments for viruses on behalf of RSM Moffat Ltd. However it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. #### RSM MOFFAT LTD Registered in UK. support@moffat.co.uk ####
Francesco Peeters (Asterisk)
2006-Jan-27 09:54 UTC
[Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN
On Fri, January 27, 2006 17:23, Ian Cowley said:> Iax.conf > > [general] > ;bindport = 4569 ; Port to bind to (IAX is 4569) > bindport = 5036 ; Port to bind to (IAX is 4569) > bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine) > disallow=all > allow=g729 ; 4 simultaneous allowed > allow ilbc ; prefered for iax2 > allow=gsm ; 13 Kbps (full rate), 20ms frame size > allow=ulaw ;(g711)64 Kbps, sample-based > allow=alaw ;(g711)64 Kbps, sample-based > mailboxdetail=yes > jitterbuffer=yes > > context=from-internal > > #include iax_additional.conf > #include iax_custom.conf > > iax_additional.conf > [1055] > username=1055 > type=friend > secret=##################### > record_out=Adhoc > record_in=Adhoc > qualify=yes > port=4569 > notransfer=yes > mailbox=1055@device > host=dynamic > context=from-internal > callerid=device <1055> > > Regards > ianC > >Looks like you are using AMP / A@H... As far as I can tell, this should work correctly... There might be something going on in the translation by the Checkpoint NAT control... Have you tried iax2 debug to see what it is receiving? the first few packets should give you sufficient information... Good luck! -- F Peeters PIII 450 - 1 GB - * 1.2 - BRIstuff 0.3.0 Pre 1 - Florz patch 2 Sweex HFC-PCI modes=2 sync_slave=2 timer_card=0 Cologne HFC-S pins #52, #54, #55 connected in parallel for synching. AMD Duron 1GHz - 1GB - * 1.2.1 2 Sweex HFC-PCI cards
Ian Cowley
2006-Jan-27 10:05 UTC
[Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN
From The CLI with iax debug (IP address faked) asterisk1*CLI> Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW Timestamp: 00000ms SCall: 22774 DCall: 00000 [99.99.99.212:1720] CALLING NUMBER : 1055 CALLING NAME : 1055 FORMAT : 256 CAPABILITY : 271 USERNAME : 1055 CALLED NUMBER : 1 DNID : 1 Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: AUTHREQ Timestamp: 00002ms SCall: 00003 DCall: 22774 [99.99.99.212:1720] AUTHMETHODS : 3 CHALLENGE : 361908915 USERNAME : 1055 Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX Subclass: AUTHREP Timestamp: 00500ms SCall: 22774 DCall: 00003 [99.99.99.212:1720] MD5 RESULT : 07051d0879d814b279c1ed58ba8a04b4 -- Accepting AUTHENTICATED call from 99.99.99.212: > requested format = g729, > requested prefs = (), > actual format = g729, > host prefs = (g729|gsm|ulaw|alaw), > priority = mine Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX Subclass: ACCEPT Timestamp: 00520ms SCall: 00003 DCall: 22774 [99.99.99.212:1720] FORMAT : 256 -- Executing Macro("IAX2/1055-3", "rg-group|ringall|30||1000-1007-1050-1450-1600") in new stack -- Executing Macro("IAX2/1055-3", "user-callerid") in new stack -- Executing DBget("IAX2/1055-3", "AMPUSER=DEVICE/1055/user") in new stack ######################################################################## ### As we can see I jumps straight to the rg-group macro and not from-internal as expected ######################################################################## #### extensions.conf [from-internal] ;allow phones to use applications include => app-userlogonoff include => app-directory include => app-dnd include => app-callforward include => app-callwaiting include => app-messagecenter include => app-calltrace include => parkedcalls include => from-internal-custom ;allow phones to dial other extensions include => ext-fax include => ext-local include => ext-group include => ext-queues include => ext-zapbarge include => ext-meetme include => ext-record include => ext-test ;allow phones to access trunks include => outbound-allroutes exten => s,1,Macro(hangupcall) exten => h,1,Macro(hangupcall) -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Francesco Peeters (Asterisk) Sent: 27 January 2006 16:54 To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] External IAX2 phone defined as internal behaving as from PSTN On Fri, January 27, 2006 17:23, Ian Cowley said:> Iax.conf > > [general] > ;bindport = 4569 ; Port to bind to (IAX is 4569) > bindport = 5036 ; Port to bind to (IAX is 4569) > bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine) > disallow=all > allow=g729 ; 4 simultaneous allowed > allow ilbc ; prefered for iax2 > allow=gsm ; 13 Kbps (full rate), 20ms frame size > allow=ulaw ;(g711)64 Kbps, sample-based > allow=alaw ;(g711)64 Kbps, sample-based > mailboxdetail=yes > jitterbuffer=yes > > context=from-internal > > #include iax_additional.conf > #include iax_custom.conf > > iax_additional.conf > [1055] > username=1055 > type=friend > secret=##################### > record_out=Adhoc > record_in=Adhoc > qualify=yes > port=4569 > notransfer=yes > mailbox=1055@device > host=dynamic > context=from-internal > callerid=device <1055> > > Regards > ianC > >Looks like you are using AMP / A@H... As far as I can tell, this should work correctly... There might be something going on in the translation by the Checkpoint NAT control... Have you tried iax2 debug to see what it is receiving? the first few packets should give you sufficient information... Good luck! -- F Peeters PIII 450 - 1 GB - * 1.2 - BRIstuff 0.3.0 Pre 1 - Florz patch 2 Sweex HFC-PCI modes=2 sync_slave=2 timer_card=0 Cologne HFC-S pins #52, #54, #55 connected in parallel for synching. AMD Duron 1GHz - 1GB - * 1.2.1 2 Sweex HFC-PCI cards _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ________________________________________________________________________ This Inbound email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com ________________________________________________________________________ ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com _______________________________________________________________________ This e-mail message and any attachments may be confidential and may also be a privileged communication. It is intended solely for the person(s)to whom it is addressed. If you are not the intended addressee of the message you must take no action based on it. Please reply to this message to let us know you received it in error and also delete the message from your system. This disclaimer confirms that MessageLabs have swept e-mail and attachments for viruses on behalf of RSM Moffat Ltd. However it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. #### RSM MOFFAT LTD Registered in UK. support@moffat.co.uk ####