Below is a sample configuration to a YeaStar MyPBX 'service provider' trunk in the MyPBX interface.
MyPBX IP = 192.168.1.252
SmartNode IP = 192.168.1.251
Default Gateway = 192.168.1.1
DNS = 192.168.1.1
NTP Server = 192.168.1.10
Hint: search & replace the IP addresses above within notepad or similar text editor to customise.
#----------------------------------------------------------------# # # SN4114/JO/EUI # R6.6 2014-11-06 H323 SIP FXS FXO # #----------------------------------------------------------------# cli version 3.20 clock local default-offset +12:00 dns-client server 192.168.1.1 dns-relay webserver port 80 language en snmp community public ro sntp-client sntp-client server primary 192.168.1.10 port 123 version 4 system hostname sn4114 system ic voice 0 low-bitrate-codec g729 profile ppp default profile call-progress-tone NZ_Dialtone play 1 5000 400 -15 profile call-progress-tone NZ_Alertingtone play 1 400 400 -15 450 -15 pause 2 200 play 3 400 400 -15 450 -15 pause 4 2000 profile call-progress-tone NZ_Busytone play 1 500 400 -15 pause 2 500 profile call-progress-tone NZ_SDTone play 1 10000 425 -19 620 -19 profile call-progress-tone NZ_Callwaiting play 1 200 400 -15 pause 2 200 profile call-progress-tone NZ_Releasetone play 1 250 400 -15 pause 2 250 profile tone-set default profile tone-set NZ map call-progress-tone dial-tone NZ_Dialtone map call-progress-tone ringback-tone NZ_Alertingtone map call-progress-tone busy-tone NZ_Busytone map call-progress-tone waiting-tone NZ_Callwaiting map call-progress-tone release-tone NZ_Releasetone map call-progress-tone congestion-tone NZ_Releasetone profile voip default codec 1 g711alaw64k rx-length 20 tx-length 20 codec 2 g711ulaw64k rx-length 20 tx-length 20 codec 3 g729 rx-length 20 tx-length 20 fax transmission 1 relay t38-udp fax transmission 2 bypass g711alaw64k rx-length 10 tx-length 10 profile pstn default profile sip default no autonomous-transitioning profile aaa default method 1 local method 2 none context ip router interface eth0 ipaddress 192.168.1.251 255.255.255.0 tcp adjust-mss rx mtu tcp adjust-mss tx mtu context ip router route 0.0.0.0 0.0.0.0 192.168.1.1 0 context cs switch routing-table called-e164 TAB-OUT route .%T dest-interface IF_ASTERISK routing-table called-e164 TAB-IN route .T dest-service FXOHUNT interface sip IF-SIP route call dest-table TAB-IN remote 192.168.1.252 interface sip IF-INBOUND0 bind context sip-gateway GW-SIP route call dest-table TAB-IN remote 192.168.1.252 privacy address-translation outgoing-call from-header user-part call host-part local-ip interface sip IF-INBOUND1 bind context sip-gateway GW-SIP route call dest-table TAB-IN remote 192.168.1.252 address-translation outgoing-call to-header user-part fix INBOUND host-part fix 192.168.1.252 interface sip IF-INBOUND2 bind context sip-gateway GW-SIP route call dest-table TAB-IN remote 192.168.1.252 address-translation outgoing-call to-header user-part fix INBOUND host-part fix 192.168.1.252 interface sip IF-INBOUND3 bind context sip-gateway GW-SIP route call dest-table TAB-IN remote 192.168.1.252 address-translation outgoing-call to-header user-part fix INBOUND host-part fix 192.168.1.252 interface sip IF_ASTERISK bind context sip-gateway GW-SIP route call dest-table TAB-IN remote 192.168.1.252 address-translation outgoing-call from-header user-part call host-part fix 192.168.1.251 address-translation outgoing-call to-header user-part call host-part fix 192.168.1.252 interface fxo IF_FXO0 route call dest-interface IF-INBOUND0 disconnect-signal loop-break disconnect-signal busy-tone ring-number on-caller-id use profile tone-set NZ interface fxo IF_FXO1 route call dest-interface IF-INBOUND1 disconnect-signal loop-break disconnect-signal busy-tone use profile tone-set NZ interface fxo IF_FXO2 route call dest-interface IF-INBOUND2 disconnect-signal loop-break disconnect-signal busy-tone use profile tone-set NZ interface fxo IF_FXO3 route call dest-interface IF-INBOUND3 disconnect-signal loop-break disconnect-signal busy-tone use profile tone-set NZ service hunt-group FXOHUNT drop-cause normal-unspecified drop-cause no-circuit-channel-available drop-cause network-out-of-order drop-cause temporary-failure drop-cause switching-equipment-congestion drop-cause access-info-discarded drop-cause circuit-channel-not-available drop-cause resources-unavailable drop-cause user-busy drop-cause destination-out-of-order route call 1 dest-interface IF_FXO3 route call 2 dest-interface IF_FXO2 route call 3 dest-interface IF_FXO1 route call 4 dest-interface IF_FXO0 context cs switch no shutdown context sip-gateway GW-SIP interface IF_ASTERISK bind interface eth0 context router port 5060 context sip-gateway GW-SIP no shutdown port ethernet 0 0 medium auto encapsulation ip bind interface eth0 router no shutdown port fxo 0 0 flash-hook-duration 50 use profile fxo nz encapsulation cc-fxo bind interface IF_FXO0 switch no shutdown port fxo 0 1 flash-hook-duration 50 use profile fxo nz encapsulation cc-fxo bind interface IF_FXO1 switch no shutdown port fxo 0 2 flash-hook-duration 50 use profile fxo nz encapsulation cc-fxo bind interface IF_FXO2 switch no shutdown port fxo 0 3 flash-hook-duration 50 use profile fxo nz encapsulation cc-fxo bind interface IF_FXO3 switch no shutdown