[Spce-user] Network Configuration

Deon Vermeulen vermeulen.deon at gmail.com
Mon Apr 22 07:22:22 EDT 2013


Hi Anreas

Thank you for pointing that out.
It was indeed the problem.

What is very odd is that ngcpcfg apply updated the information, and show 
that it loaded the IPs:Ports, but netstat does not reflect as such.


Executing action for 
/etc/ngcp-config/templates/etc/kamailio/lb/ngcpcfg.services
Restarting kamailio-lb:
loading modules under /usr/lib/kamailio/modules_k:/usr/lib/kamailio/modules
Listening on
              udp: 192.168.10.250 [192.168.10.250]:6095
              udp: 172.16.0.250 [172.16.0.250]:5060
              udp: 10.222.0.250 [10.222.0.250]:6090
              udp: 192.168.0.250 [192.168.0.250]:6090
              tcp: 192.168.10.250 [192.168.10.250]:6095
Aliases:

kamailio error, failed to start.
insert new socket port_5060=udp:172.16.0.250:5060 from config into db
insert new socket port_6090=udp:10.222.0.250:6090 from config into db
insert new socket port_6090=udp:192.168.0.250:6090 from config into db
OK
Synchronizing data from /etc/ngcp-config/constants.yml
Checking state of /etc files
OK:   nothing to commit.
root at sbc01:/home/deon# netstat -utldp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         
State       PID/Program name
tcp        0      0 *:sunrpc                *:*                     
LISTEN      1450/portmap
tcp        0      0 *:59696                 *:*                     
LISTEN      1797/sshd
tcp        0      0 *:www                   *:*                     
LISTEN      1674/apache2
tcp        0      0 localhost:smtp          *:*                     
LISTEN      2633/exim4
tcp        0      0 192.168.10.250:8090  *:*                     
LISTEN      19829/sems
tcp        0      0 *:4443                  *:*                     
LISTEN      1674/apache2
tcp        0      0 *:https                 *:*                     
LISTEN      1674/apache2
tcp        0      0 *:8000                  *:*                     
LISTEN      16748/kamailio
tcp        0      0 *:5443                  *:*                     
LISTEN      1674/apache2
tcp        0      0 192.168.10.250 :5062  *:*                     
LISTEN      16753/kamailio
tcp        0      0 *:51335                 *:*                     
LISTEN      1464/rpc.statd
tcp6       0      0 [::]:59696              [::]:*                  
LISTEN      1797/sshd
tcp6       0      0 ip6-localhost:smtp      [::]:*                  
LISTEN      2633/exim4
udp        0      0 localhost:5040          
*:*                                 19829/sems
udp        0      0 192.168.10.250:5062  
*:*                                 16734/kamailio
udp        0      0 192.168.10.250:5080  
*:*                                 19829/sems
udp        0      0 *:25826                 
*:*                                 2151/collectd
udp        0      0 *:48101                 
*:*                                 1464/rpc.statd
udp        0      0 *:sunrpc                
*:*                                 1450/portmap
udp        0      0 192.168.0.250:ntp 
*:*                                 1829/ntpd
udp        0      0 10.222.0.250:ntp *:*                                 
1829/ntpd
udp        0      0 192.168.10.250:ntp   
*:*                                 1829/ntpd
udp        0      0 localhost:ntp           
*:*                                 1829/ntpd
udp        0      0 *:ntp                   
*:*                                 1829/ntpd
udp        0      0 *:792                   
*:*                                 1464/rpc.statd
udp6       0      0 192.168.10.250:2222  
[::]:*                              17146/mediaproxy-ng
udp6       0      0 192.168.0.250:2222 
[::]:*                              17043/mediaproxy-ng
udp6       0      0 10.222.0.250:2222 
[::]:*                              16959/mediaproxy-ng
udp6       0      0 192.168.10.250:2223  
[::]:*                              17146/mediaproxy-ng
udp6       0      0 192.168.0.250:2223 
[::]:*                              17043/mediaproxy-ng
udp6       0      0 10.222.0.250:2223 
[::]:*                              16959/mediaproxy-ng
udp6       0      0 fe80::6ab5:99ff:fe6:ntp 
[::]:*                              1829/ntpd
udp6       0      0 fe80::6ab5:99ff:fe6:ntp 
[::]:*                              1829/ntpd
udp6       0      0 ip6-localhost:ntp       
[::]:*                              1829/ntpd
udp6       0      0 fe80::6ab5:99ff:fe6:ntp 
[::]:*                              1829/ntpd
udp6       0      0 [::]:ntp                
[::]:*                              1829/ntpd


Thanks again

Kind Regards
Deon

> Andreas Granig <mailto:agranig at sipwise.com>
> April 22, 2013 10:37 AM
> Hi,
>
>
> Do you properly indent them? From the snipped above, it looks like 
> your extra sockets are on the same level as the "extra_sockets" tag. 
> It must look like this:
>
> kamailio:
>   lb:
>     extra_sockets:
>       port_6090: something
>       port_5060: something
>
> This is crucial, please double-check. If indented properly, it works 
> for me (tm).
>
> Andreas
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> Deon Vermeulen <mailto:vermeulen.deon at gmail.com>
> April 22, 2013 10:27 AM
> I managed to figure out the local routing problem.
>
> I have another challenge with the additional sockets does not apply 
> when I apply ngcpcfg.
>
> This is what my config.yml looks like.
>
> kamailio:
>   lb:
>     extra_sockets:
>     port_6090: udp:192.168.0.250:6090
>     port_6095: udp:10.222.0.250:6095
>     port_5060: udp:172.16.0.250:5060
>
> When the ngcpcfg apply comes to the stage to restart kamailio these 
> additional IPs:ports do not reflect there.
> When I do a netstat -utldp it also not reflected there.
>
> I manually entered them in vi 
> /etc/ngcp-config/templates/etc/kamailio/lb/kamailio.cfg.customtt.tt2
>
> [% FOREACH ip IN sip_ext_ips -%]
> listen=udp:[% ip %]:[% kamailio.lb.port %]
> listen=tcp:[% ip %]:[% kamailio.lb.port %]
> listen=udp:192.168.0.250:6090
> listen=udp:10.222.0.250:6095
> listen=udp:172.16.0.250:5060
>
>
> Please correct me if I'm wrong, but if the later is loaded via ngcpcfg 
> apply then sems should also be updated with the additional IPs?
>
> I checked the ngcpcfg.log in realtime while ngcpcfg apply is running, 
> but it returns no errors or any information why kamailio is not loaded 
> with the additional IPs and Ports.
>
>
> Thank you for any assistance.
>
> Kind Regards
> Deon
>
> Deon Vermeulen <mailto:vermeulen.deon at gmail.com>
> April 19, 2013 6:43 PM
> I fixed the character and now the rewrite rules are called and the 
> rewrites are done.
>
> Attached is the latest call trace.
>
> What I still don't understand is that why does spce call the SIP 
> Peering when the destination is +44113001417 at 10.222.0.250 which is 
> hosted local on the spce?
>
> Again my scenario is as follows:
>
> subscriber I'm testing from is 0839999989 at 192.168.10.200
> The fake/dummy subscriber to the carrier is 0839999999 at 10.222.0.250
> The Alias +44113001417 is set on the fake/dummy subscriber 
> 0839999999 at 10.222.0.250.
>
> I don't have any SIP Peerings configured as calls to International 
> Destinations should route via Aliases set on the fake/dummy subscriber.
>
>
> Thanks agin for the assistance.
>
>
> Kind Regards
> Deon
>
>
>
> Jon Bonilla (Manwe) <mailto:jbonilla at sipwise.com>
> April 19, 2013 4:53 PM
> El Fri, 19 Apr 2013 16:34:27 +0100
>
>
> It might be that you are not using the right '^' character.
>
> Look at this:
>
> '^' vs '^'
>
> The second character (smaller) is a non-ascii character and it's 
> copied from
> your mysql output. The first one is written by me and it's the circumflex
> character which is valid for regular expressions.
>
> From wikipedia:
>
> For historical reasons, there is a similar but larger character, U+005E ^
> circumflex accent, which is also included in ASCII but often referred 
> to as
> caret instead. It is, however, unsuitable for use as a diacritic on modern
> computer systems, as it is a spacing character. Another spacing circumflex
> character in Unicode is the smaller U+02C6 ^ modifier letter 
> circumflex, mainly
> used in phonetic notations -- or as a sample of the diacritic in 
> isolation.
>
>
> I think you are using U+02C6 instead of U+005E character and that's 
> why your
> regular expressions don't match.
>
> https://en.wikipedia.org/wiki/Circumflex
> Deon Vermeulen <mailto:vermeulen.deon at gmail.com>
> April 19, 2013 4:34 PM
> Hi Jon
>
> NP. Here you go.
>
> mysql -e "select * from kamailio.dialplan where dpid=9\G"
> *************************** 1. row ***************************
>        id: 1
>      dpid: 9
>        pr: 0
>  match_op: 1
> match_exp: ^(00|\+)([1-9][0-9]+)$
> match_len: 0
> subst_exp: ^(00|\+)([1-9][0-9]+)$
>  repl_exp: \2
>     attrs:
> *************************** 2. row ***************************
>        id: 2
>      dpid: 9
>        pr: 1
>  match_op: 1
> match_exp: ^0([1-9][0-9]+)$
> match_len: 0
> subst_exp: ^0([1-9][0-9]+)$
>  repl_exp: $avp(s:caller_cc)\1
>     attrs:
> *************************** 3. row ***************************
>        id: 3
>      dpid: 9
>        pr: 2
>  match_op: 1
> match_exp: ^([1-9][0-9]+)$
> match_len: 0
> subst_exp: ^([1-9][0-9]+)$
>  repl_exp: $avp(s:caller_cc)$avp(s:caller_ac)\1
>     attrs:
>
>
> mysql -e "select * from kamailio.dialplan where dpid=10\G"
> *************************** 1. row ***************************
>        id: 4
>      dpid: 10
>        pr: 1
>  match_op: 1
> match_exp: ^(00|\+)([1-9][0-9]+)$
> match_len: 0
> subst_exp: ^(00|\+)([1-9][0-9]+)$
>  repl_exp: \2
>     attrs:
> *************************** 2. row ***************************
>        id: 5
>      dpid: 10
>        pr: 2
>  match_op: 1
> match_exp: ^0([1-9][0-9]+)$
> match_len: 0
> subst_exp: ^0([1-9][0-9]+)$
>  repl_exp: $avp(s:caller_cc)\1
>     attrs:
> *************************** 3. row ***************************
>        id: 6
>      dpid: 10
>        pr: 3
>  match_op: 1
> match_exp: ^([1-9][0-9]+)$
> match_len: 0
> subst_exp: ^([1-9][0-9]+)$
>  repl_exp: $avp(s:caller_cc)$avp(s:caller_ac)\1
>     attrs:
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130422/8f5df05f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130422/8f5df05f/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1144 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130422/8f5df05f/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1221 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130422/8f5df05f/attachment-0005.jpg>


More information about the Spce-user mailing list